Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-14813

Assets placeholder compatibility with Dynamic Forms (Deviniti) select/multi select custom field

    • 1
    • 2
    • We collect Jira Service Desk feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Issue Summary

      This is reproducible on Data Center: (yes)

      A 3rd party addon, Dynamic Forms (vendor: Deviniti) can adjust the portal form according to a selection of value/s in its customfield.

      When used within an Asset Postfunction (set an objects attribute with a predefined value) - a customfield placeholder ( ${customfield_nnnn${0}} ) will set the correct value/s will be set as Text to a Text attribute;

      e.g. The Dynamic Forms customfield has 2 options selected: "Option A", "Option X" - the postfunction will set the value "Option A, Option X" to a text attribute.

      BUT, if used in the Portal/Jira Create or Edit screen - within an Assets Custom field's Filter Issue Scope, the placeholder is never replaced with any value (not option ID nor Label) and the Assets Field can never find objects using the plceholder within the Filter issue scope.

      Steps to Reproduce

      1. Use Dynamic Forms Select customfield with a few options, e.g. "Option A", "Option X" (minimum configuration)
      2. Create a few Assets objects, with name matching the Dynamic Form Select options "Option A", "Option X", add a Text attribute to this object type
      3. Configure an Assets customfield to populate any of these objects, with a Filter Issue Scope using a placeholder for the Dynamic Forms customfield (tested with .key, .id, .label, .name - same results): Name LIKE ${customfield_nnnn}
      4. configure a circular transition (from any status to itself) with a postfunction to populate the Text attribute of the object in the Assets field with the same placeholder used in the Filter Issue Scope
      5. Create a Ticket in the portal - select Option X on the Dynamic form, note that the Assets field cannot find an object
      6. Once the ticket was created (Assets Field is empty), remove the Filter Issue Scope from the custom field configuration, and edit the ticket by setting the object "Option X" in the Assets field
      7. execute the circular transition

      Expected Results

      Step 5 - Asset objects will be filtered according to the placehoder, allowing the object "Option X" to be selected

      Actual Results

      Step 5 - No objects found

      Step 7 - the Text Attribute of the object "Option X" IS populated with the string "Option X" coming from the Dynamic Forms placeholder!

      ...
      

      Workaround

      See elaborated workaround in comments. Thank you Steve!

            [JSDSERVER-14813] Assets placeholder compatibility with Dynamic Forms (Deviniti) select/multi select custom field

            Steve Letch added a comment - - edited

            Current workaround:

             

            Set the option ID's as an attribute against the object you wish to use the Dynamic Forms field to filter against.

             

            Get the Option ID of the field using an api call 

            https://baseurl/rest/api/2/issue/createmeta/projectkey/issuetypes/issuetypeid

            Or DB query

             

            Example of config for fields and objects:

             

            Dynamic Forms field 'Category' and it's options:

            AAA - Option ID is 11111

            BBB - Option ID is 22222

            CCC - Option ID is 33333

             

            Object type set up for object type 'Category':

            ID attribute set as label, ID corresponds to option ID's in the Category field.

             

            Category object type name ID (Label)
            AAA 11111
            BBB 22222
            CCC 33333

             

             

            Objects in Object type 'Module' that are used in Assets field 'Module', that you wish to filter based on the Category dynamic forms field option selected.

             

            Module object type name Category (object attribute)
            XXX 11111
            YYY 33333
            ZZZ 22222
            YZY 11111

             

             

            On Create screen

            Category Field Option selected - AAA

            Dynamic Forms configuration reveals Module field. and objects available will be:

            XXX

            YZY

             

            Category Field Option selected - BBB

            Dynamic Forms configuration reveals Module field. and objects available will be:

            ZZZ

             

            Ofcourse in an ideal world we wouldn't need the ID attribute against the category, the name of the category would be the label and the Module objects would look like:

             

            Module object type name Category (object attribute)
            XXX AAA
            YYY CCC
            ZZZ BBB
            YZY AAA

            Steve Letch added a comment - - edited Current workaround:   Set the option ID's as an attribute against the object you wish to use the Dynamic Forms field to filter against.   Get the Option ID of the field using an api call  https:// baseurl /rest/api/2/issue/createmeta / projectkey /issuetypes/ issuetypeid Or DB query   Example of config for fields and objects:   Dynamic Forms field 'Category' and it's options: AAA - Option ID is 11111 BBB - Option ID is 22222 CCC - Option ID is 33333   Object type set up for object type 'Category': ID attribute set as label, ID corresponds to option ID's in the Category field.   Category object type name ID (Label) AAA 11111 BBB 22222 CCC 33333     Objects in Object type 'Module' that are used in Assets field 'Module', that you wish to filter based on the Category dynamic forms field option selected.   Module object type name Category (object attribute) XXX 11111 YYY 33333 ZZZ 22222 YZY 11111     On Create screen Category Field Option selected - AAA Dynamic Forms configuration reveals Module field. and objects available will be: XXX YZY   Category Field Option selected - BBB Dynamic Forms configuration reveals Module field. and objects available will be: ZZZ   Ofcourse in an ideal world we wouldn't need the ID attribute against the category, the name of the category would be the label and the Module objects would look like:   Module object type name Category (object attribute) XXX AAA YYY CCC ZZZ BBB YZY AAA

              Unassigned Unassigned
              8cdc82c96fd5 Yinon Negev
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: