Forums

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

Assign issue to epic in post function

Jon
Contributor
January 17, 2019

hi,

I have epics that have an assignee. is it possible to make a post function that will assign to the issue when it enters a certain status? I was looking at post functions but it seems most of the options are based around assigning to someone in a certain role and there is no option to set assignee on the issue to the same user as that is on the epic(parent) issue. 

 

If there is no assignee on the epic then the post function would not fire. 

 

is there any way to do this? 

 

 

1 answer

0 votes
Jan
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.
January 17, 2019

Hi Jon 

The post function "Update Issue field" has the option to change the assignee, then select a user. But, if you are looking to assign to the same user as another issue, this wouldn't work as it wouldn't know who that user is.assignee.JPG

Jon
Contributor
January 17, 2019

hi jan. 

so how would I do this is the assignee should be the same assignee on the parent issue? it could be one of several people in our team and its not he same with each epic/issue. 

Jan
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.
January 18, 2019

Hi Jon - Do you have any post function plugins? Like JSU, JMWE or Scriptrunner?

Jon
Contributor
January 18, 2019

hi jan, yeah I have script runner. I was looking at it but I didn't see anything where it will assign the issue automatically if the epic is assigned already. is there something there like this? 

Jan
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.
January 18, 2019

hi Jon - you could use the scriptrunner's custom script to write groovy script to accomplish this.  @Nic Brough -Adaptavist- do you know if this is possible with groovy scripts? 

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.
January 19, 2019

Yes, a script can do this.

Briefly, you'd get the content of the "Epic Link" custom field from the issue you want to change, which is a pointer to the Epic.  You can then read the Epic issue from there and just use mutableIssue.setAssignee(<epic>.getAssignee() ) directly

Like Jan likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events