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)
If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...
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
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot