-
Suggestion
-
Resolution: Unresolved
-
None
-
1
-
2
-
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
- Use Dynamic Forms Select customfield with a few options, e.g. "Option A", "Option X" (minimum configuration)
- 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
- 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}
- 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
- Create a Ticket in the portal - select Option X on the Dynamic form, note that the Assets field cannot find an object
- 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
- 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!
- links to
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.
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.
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: