Forums

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

Automation - Compiling unfinished subtask owners in a string

Tom
Contributor
July 3, 2025

We work in a multi-team environment with lots of interdependencies.   I'd like to have a field on a story/bug that has an up-to-date list of everyone who has a subtask remaining on the main story/bug ticket.

Example

  • Story PROJ-1011
    • Subtask PROJ-1022 assigned to Bob which is in "DONE" Status
    • Subtask PROJ-1027 assigned to Tim which is in "DONE" Status
    • Subtask PROJ-1035 assigned to Bob which is in "IN PROGRESS" Status
    • Subtask PROJ-1037 assigned to Bob which is in "TO DO" status
    • Subtask PROJ-1022 assigned to Sue which is in "TO DO" Status

Assuming we had the field "Notes" on the Story, I'd like the Notes string to be "Bob, Sue"

This excludes:

  • DONE status items
  • Dedupes Bob from appearing twice. (this part is optional, if we can get everything else working and have some duplication that's still a victory)

 

The trigger events are anytime a subtask class issue is created, updated or assigned, to cause a rebuild of the list on the parent story/bug.

I've had success with getting the string built with a branch to the parent and then a field update action with:

      {{issue.subtasks.assignee.emailAddress.substringBefore("@").join(", ")}}

But I've had no success after many tries at not including the Done items or deduping.  Any help or pointers would be appreciated.

 

Current setup:

  • Trigger: Multi-trigger on create/assigned/closed
  • Condition: Subtask class issue
  • Branch: Parent
  • Lookup issues: issueFunction in subtasksOf("key={{issue.key}}") AND NOT Status = Done
  • Edit field: {{issue.subtasks.assignee.emailAddress.substringBefore("@").join(", ")}}

1 answer

0 votes
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 3, 2025

Hi @Tom 

Removing the duplicates may be done using the distinct list function:

https://confluence.atlassian.com/automation/jira-smart-values-lists-993924868.html#Jirasmartvalueslists-list.distinctlist.distinct

Your current rule is triggered on a change to a Subtask, and so the lookup issues action should only return Subtasks which are siblings to the trigger issue, and not Done.

Once you have made that adjustment, please add the distinct before you join(", ") the values together.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer