Hi All ,
In the attached Screenshot, two values are shown for the project ID, and I want the custom field name to repeat itself twice and the custom field id to repeat itself twice as well.
I've added code snippet to what I've currently written for reference and
Output should look like this
map
project id list of number(integer)-2 items 18800 (number(integer))
12405 (number(integer))
customFieldName list of (Text)-2 items
"2nd Outreach" (Text)
customFieldId. List of Number (Integer) -2 items
28306 (number(integer))
a!localVariables( local!result: rule!LGH_intCustomFieldsGET(), local!rows: if( condition: index(local!result, "success", false), valueIfTrue: local!result.result.body.values, valueIfFalse: {} ), a!forEach( local!rows, a!map( projectId: index(fv!item, "projectIds", {}), name: index(fv!item, "name", {}), customFieldId:index(fv!item, "numericId", {}) ) ) )
Discussion posts and replies are publicly visible
Having fun with Jira?
a!localVariables( local!result: rule!LGH_intCustomFieldsGET(), local!rows: if( condition: index(local!result, "success", false), valueIfTrue: local!result.result.body.values, valueIfFalse: {} ), a!forEach( local!rows, a!map( projectId: { index(fv!item, "projectIds", {}), index(fv!item, "projectIds", {}) }, name: index(fv!item, "name", {}), customFieldId: { index(fv!item, "numericId", {}), index(fv!item, "numericId", {}) } ) ) )
Thanks for your response, can we make it ,dynamic based on the project id. The second map in the screenshot is showing four project ids.
Well, you can create that list using any logic you need.
yea let me check on this