Uploaded image for project: 'ERM Platform'
  1. ERM Platform
  2. ERM-1696

Add support for match + terms in simple search widget type

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      ERM Sprint 115, ERM Sprint 116
    • Development Team:
      ERM

      Description

      In order to allow users to search for text strings across one or more properties when using a simple search widget in the dashboard, we should add support for match + terms in the widget type.

      In the widget definition it should be possible to specify:

      • Whether the widget should include a term search option (it could be that some widgets do not want to include a term search)
      • Which properties should be offered to be used as "match" fields. Similar to filters this should include
        • name
        • label
        • path
      • Ideally, in addition when defining match fields it should be possible to say if they are selected by default. Multiple fields can be selected by default. If this is not possible we can still deliver useful term searching without a default selection.

      From the users perspective any widget instance configuration based on a widget definition with a term search option defined would have a new section in the widget instance configuration screen which allows them to type in a string (to be used as a `term` parameter and select which fields should be used as `match` parameters.

      The mockup below is for the new section of the instance configuration, for a widget definition that enables a term search and specifies three searchable fields. 

      With the text as entered in the search box, and the "Name" box selected as shown, this would  result in the following parameters being included in the request to the specified endpoint:

      match=name&term=%22UM%20%22

      If all three boxes were checked, additional `match` parameters would be included

      match=name&match=alternateNames.name&match=description&term=%22UM%20%22

       

       

      Dev task breakdown

      • We need to first add a "match" object to the definition. This will probably need to be of the shape
        ```
        matches:{
          defaultTerm: "abcde",
          termConfigurable: true/false,
          matchColumns: [
            {       <similar to filter fields but with a defaultSelected field, or similar>     }

          ]
        }
        ```

      This should allow us to set default matches and not allow the user to override, or to be fully configurable. No match object will be equivalent ot not allowing matches.

      • The above will need adding to the WidgetType (as a schema shape) AND WidgetDefs in mod-agreements/mod-licenses
      • Search bar needs adding to the SimpleSearch form components, and to depend on the WidgetDefinition shape.
        • Search component for term
        • Checkboxes component, flexbox columns?

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ostephens Owen Stephens
                Reporter:
                ostephens Owen Stephens
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases