Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation Populating Sprint as Multi-Select from Delivery Ticket -> JPD

Mahriah Alf
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 30, 2025

I'm working on trying to set up an automation to have visibility into which ideas in JPD are being worked on in which Sprints. I set up a multi-select field in my JPD project for Sprints, and pre-populated with the available sprint options. 

My problem is that I can't seem to figure out the right format to feed the list of sprints (from all linked delivery tickets) to the JPD custom field such that it will read them correctly. I keep on getting an error unless I send back a single value, e.g. the first value in the array / list.

Any help here would be appreciated!

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 30, 2025

Hi @Mahriah Alf -- Welcome to the Atlassian Community!

For a question like this, context is important for the community to help.  Please post the following:

  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution
  • explain what is not working as expected and why you believe that to be the case

Until we see those...

 

I recommend pausing to explain this scenario / need to your Jira Site Admin.  They may have other solution approaches to try, such as with dashboards, etc.

 

Next, from what you describe, you have hard-coded a set of Sprint names from one-or-more projects into the JPD multiple-select option field.  That likely will be a brittle solution to maintain over time.  Regardless of that...

To access the work items linked as "Delivery Tickets" to a JPD Idea, the rule scope will need to be multiple-project or global...and your Jira Site Admin will need to help change that.

With the scope changed, a rule could use the Lookup Work Items action to find the Delivery Tickets by their link type and association to the Idea.  Then the Sprint field in each item may be parsed to find the correct one.  Finally, those results may be iterated to create a JSON expression to update your multiple-selection field:

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Multi-select-custom-field

 

Kind regards,
Bill

Mahriah Alf
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 30, 2025

Thanks Bill. I do have the multi-project Admin capabilities and is set up that way. Thanks.

 

Completely agree on the "brittleness" of the solution. The only reason I'm doing multi-select vs. free text is because I can't filter or group by a free text field for any of my views and I would like that capability. I'm open to other options if there are suggestions!

 

Here is the configuration of the automation:Screenshot 2025-07-30 at 1.32.17 PM.png

This is just for the one-time batch update and testing the automation (I have a separate one that's triggered by any change in the Sprint field in the delivery tickets)

 

This is the error that I'm getting:Screenshot 2025-07-30 at 1.38.30 PM.png

And, yes, I've verified that the field has all of those as options in the multi-select field dropdown (and I've verified that it works if I only pass one value, it's only an issue when I pass multiple)Screenshot 2025-07-30 at 1.40.51 PM.png

 

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 30, 2025

Thank you for the additional details, @Mahriah Alf 

Earlier I noted the need to parse the Sprint values found, by work item, in the Lookup Work Items results.  This is necessary because...

  1. When a work item does not complete in one sprint, it might carry-over to the next one.  And thus another question is: which sprints do you want to select for the Idea's field?  Let us assume it is only for the current, "active" sprint for each work item.
  2. The Sprint field is a list of values (e.g., as noted above for carry-over).  Even when a work item has only been in one Sprint, that is a list of one item.  And the lookup result is a list of work items.  Thus, we have a list-of-lists that needs to be parsed.

 

Let's put those two concepts together using the Created Variable action to help:

  • trigger: scheduled
  • action: lookup work items
  • action: create variable
    • name: varActiveSprintNames
    • smart value:
{{#lookupIssues}}
{{#sprint}}
{{#if(equals(state, "active"))}}~~{{name}}{{/}}
{{/}}
{{/}}
  • create variable
    • name: varDistinctSprintNames
    • smart value:
{{varActiveSprintNames.substringAfter("~~").split("~~").trim.distinct.join(", ")}}
  • action: log, to see the distinct list
distinct active sprint names: {{varDistinctSprintNames}}
  • action: edit work items... use {{varDistinctSprintNames.split(", ")}} as the source for your iteration to update the field
{
"fields": {
"customfield_10507": [
{{#varDistinctSprintNames.split(", ")}}
{ "value": "{{.}}" }{{^last}}, {{/}}
{{/}}
]
}
}

 

Please try adding the additional actions and revise the edit to test the changes.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events