Forums

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

Is there a way to keep a "participants of an issue" custom field in sync between parent and subtask?

Rob Horan
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 1, 2020

I have a "participants of an issue" custom field for several issue types.  Each of these issue types may have subtasks. I would like to have a field in the subtasks that is in sync with the participants field from the parent issue.  Its not enough to copy the values over on create as the content of the field will change as people comment.

 

1 answer

0 votes
Nic Brough -Adaptavist-
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 1, 2020

Participants, assuming you're using the one from the Jira Toolkit, means "reporter, assignee and anyone who has commented".  It only applies to the issue the field is displayed on, it doesn't look at sub-tasks.

I think you'd need one of the scripting or automation apps to populate and update another field with that.

Rob Horan
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 2, 2020

I'd be fine with that - and I assume I could use ScriptRunner to copy the field from parent to subtask, with thanks for help you gave me previously.  If I need to populate a multi-user picker field on the subtask I would also copy from multiple user fields from the parent.  Might as well get everyone.

So then the bigger concern would be to keep that data in sync with the parent, so that if anyone is added/removed the change is synced to the child ticket.

Nic Brough -Adaptavist-
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 2, 2020

This probably needs your target field to be a multi-user picker (probably one that you never put on a create, edit or transition screen, so that it's effectively read-only to the users)

I would then write a scripted listener that picks up issue updated for the parent issues and sub-task creation and if it's one of the user fields you are interested in, iterates down over the subtasks to populate/update the field on them. 

Rob Horan
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 2, 2020

Nic - are you making a Udemy class on Scriptrunner?

 

Just sayin' - I'd buy it :)

 

Thank you so much for all your help!

Suggest an answer

Log in or Sign up to answer