It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
When we create a subtask for any issue, we would like to automatically add the assignee of that subtask as a watcher on the parent issue. We have ScriptRunner, JJUPIN, etc installed but I can't find a specific post-function script for what we want.
Hi Moriah,
Try adding the following SIL script post-function on the create issue transition:
if(isNotNull(parent)) {
%parent%.watchers = addElementIfNotExist(%parent%.watchers, assignee);
}
Make sure that you put the SIL post-function last in the list of post-fuctions for the create issue transition, after the issue is created.
Kind Regards,
Alex
Sorry it took so long to try it. I actually couldn't get it to work. I copied your exact script, added it to the workflow and placed it last in the list of post-functions. (I also tried it in different positions on that list too.) The post function list includes:
Creates the issue originally.
Start your programs with code comments, this way it will show here (max 3 lines)
There is no post-function to be found for such a specific action.
You have to write your own post-function as a "groovy" or "java plugin" [1].
best regards,
Marc
1 : since you are already using scriptrunner, i would go with a groovy script.
Hi Moriah
I just added that postfunction to this plugin:
https://marketplace.atlassian.com/plugins/pt.lt.lfcribeiro.jira.jqlLTFunctions
Thx,
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreHey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.