I've seen several questions and associated answers to this question with the most interesting responses under https://answers.atlassian.com/questions/726.
Using ScriptRunner 3.1.4 under JIRA 6.4.11, I was able to get the post function: https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Transitionparentwhenallsubtasksareresolved to work under some conditions. First, this post function had to be the last post-function in the list. As well the current user resolving the last subtask had to be the same as the parent's Assignee user. i.e in the parent issue, the workflow conditions are such that only the Assignee or a user with a "Manager" project role can resolve the issue. In this case, the subtask was resolved by a third user who was assigned the subtask but was not a manager or the same user as the parent's Assignee. BTW, it would work if a "manager" resolved the subtask or it was the same user as the parent Assignee.
I guess I'll have to answer my own question based on my finding to date.
The current implementation requires a two pronged approach to resolving a parent issue:
This solution uses the ScriptRunner scripting technology but it has it’s fallbacks.
There are other plugins to investigate like Misc Workflow extension, etc but I'm sure they will have some gotchas as well.
You are right that this function respects the permissions/conditions for the parent workflow, and it executes as the user doing the subtask transition.
Perhaps it would be useful to be able to specify the user the parent transition happens as.
> There are other plugins to investigate like Misc Workflow extension, etc but I'm sure they will have some gotchas as well
I think it depends... previously this would have worked in ScriptRunner because it used a lower-level API than it does now. On balance, I think it's probably best to respect the permissions, but to allow executing as another user.
Also there is a note in the docs that the function may need to be large, although personally I have not found that.
I concur. Most of these other cookie cutter plugins assume a fairly generic workflow but when functionality from multiple plugins or some complex programming using ScriptRunner is being used then I'm not sure of the outcome. Documentation can be a killer as well. It looks like I'll just stick with ScriptRunner functionality. I wrote my own post-function which takes into account my workflow process and it is working fine.
There's now a very easy to configure way to transition parents and sub-tasks in sync using Automation for JIRA!
(this example transitions sub-tasks to "In Progress", but you could easily change this to "Closed" as well and make it so that the parent is updated when a sub-task changes)
Hi there! Shannon from Statuspage here. 👋 With Cyber Monday quickly approaching, we're looking to hear from Atlassian customers – specifically from teams who touch incident response li...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs