How can I get this to work?: when the last of >1 sub-tasks is finally resolved it transitions the parent to resolved, and not until all subtasks are resolved. This should work, in theory: in the sub-task workflow, on the 'resolve' transition, I set the _last_ post function to trigger an update of the parents resolution field to 'resolved'. All alone this does work, but the first subtask updated to resolved will resolve the parent even when other subtasks are open. So, on the parent task workflow for the resolve transition I set the "sub-task blocking condition" to restrict the resolve transition until all sub-tasks are themselves resolved. Expected Results: the first subtask to be resolved triggers an update of the parent which fails due to the parents' subtask blocking condition which requires all subtasks to be resolved before the parent can be resolved. When the last subtask is resolved, its post functions are triggered (commit comment, update self to resolved, index self, fire generic event, etc,) ending with the trigger to update parents resolution field to resolved. In theory, the subtask has updated itself (and reindexed) before the trigger fires so the parents' subtask blocking condition is satisfied and the parent should update. It doesn't. Again, if I remove the blocking condition on the parent the first subtask resolved resolves the parent, but that's not the goal.
This is available as one of the built-in scripts in the script runner plugin - Transition parent when all subtasks are resolved. As you say you put this as a post-function on the sub-task workflow. You can specify which transition to use on the parent issue and which resolution to use. It can also be used as a listener.
The plugin home page is here: Script Runner.
If you want to make your own hook work it sounds like you just need to check the sub-task siblings resolution.
Hi Jamie,
This is really a functionality that I'm also looking for. But the catch is I'm on JIRA Studio. Is this plugin somehow available on JIRA Studio as well
I couldn't find it on the plugins page in my Studio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
It's not available for jira studio, and very unlikely ever to be.
jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie - do you know if the parent transition mentioned above will do its associated post functions? I am using this to create more subtasks when the 1st set are all signed off and it's not working. any suggestions gratefully received
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep, the parent post-functions will run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie
Sorry to bug you again, but I can't seem to get this to work.
I have a parent task and it's associated workflow, within which I am creating subtasks on transition.
I have 2 further sub task issue types, each with their own workflow.
When all sub-tasks of type a are resolved, I am trying to create sub tasks of type b, and assign them using the create sub task on transition plugin from LLC. This plugin is working fine for the 1st transition, which is done manually, but I get the following error when I try to transition using your plugin.
2012-12-03 16:30:12,472 http-8081-1 ERROR busso2 990x2665x1 h1qtrv 10.144.42.120 /secure/WorkflowUIDispatcher.jspa [atlassian.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action 781 from workflow 10246 on issue 'DEAL-223'
java.lang.NullPointerException
Then:
2012-12-03 16:30:12,472 http-8081-1 ERROR busso2 990x2665x1 h1qtrv 10.144.42.120 /secure/WorkflowUIDispatcher.jspa [groovy.canned.utils.WorkflowUtils] Errors: {}
Error Messages: [null]
I have created two sub task workflows to handle the difference in parent action between the two sub tasks.
any advice gratefully accepted
Regards
Simon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie
All sorted out - I hadn't added the new sub task issue types to the custom fields I was trying to duplicate from the Parent to the sub tasks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie, I just updated ScriptRunner to version 3.1.4, but in the postfunctions I only see *transition parent issue* which require scripting. I did not find *Transition parent when all subtasks are resolved* as mentioned in your reply, am I missing something? Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Apologies, found the script in the Scripted functions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a good question - and it would be awesome to have a plugin where if the last subtask of an issue is resolved/closed it would resolve/close the parent task.
CustomWare does develop custom plugins like this, although we have not released such plugins publicly. Yet for a couple of days development we could put something together like this for you. If you are interested - email us at info_at_customware.net
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Move the post function that triggers the parent transition to be last (at the bottom) of all the other post functions on the transition - otherwise the database hasn't put the sub-task issue to the status that you have stated is allowed in the parent workflow's condition (or validator) yet. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the answer. That's exactly what I mentioned in the initail post, which is now 2 years old (wow). So, maybe it works now in later versions. Pls lmk if this works for you today and what version of JIRA you're using, and I'll give it another try.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the answer. That's exactly what I mentioned in the initail post, which is now 2 years old (wow). So, maybe it works now in later versions. Pls lmk if this works for you today and what version of JIRA you're using, and I'll give it another try.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Haha, sorry to bump it when it's so old (I was searching for some other questions when I came across it and noticed it didn't have an accepted answer yet) - yes, it works perfectly for me in our instance (we are on JIRA 5.2). If it's still not working, you might want to double check what you've set in the condition/validator and ensure that the situation fits (you might have an incorrect status selected?). :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.