Transition issue after all linked issues are closed
Dear Fidel, i am testing your plugin for Jira. I have this case: In my workflow i have status called „Product Pending” i want to make transition for issues that are in this status to status „In Progress”, but condition is that all linked issues has to be in status „Done”. How can i do this? I am trying this solution https://bitbucket.org/fcarmario/jira-workflow-toolbox/issues/653/transition-an-epic-automatically-when-all but it isn’t working for me, This is what i have got:
The following text parsed in basic mode will be copied to Issue status: In Progress Post-function will only be executed if the following boolean expression is satisfied: count(filterByStatus(linkedIssues("relates to", linkedIssues("relates to")), "Done")) = count(linkedIssues("relates to", linkedIssues("relates to"))) - 1 This feature will be run as user in field Current user.
Comments (13)
-
repo owner -
reporter I just want 2nd case. I know how to set validation, but i have problems with making transition from "Product Pending" to "In Progress" for parent issue.
-
repo owner I have realized that in the issue you are using as reference (Issue
#653) I made a big mistake: I used a wrong post-function. You should use "Write field on linked issues or subtasks" post-function. I have updated my post and corrected it.Please, read my new post at issue
#653and you will see how you should configure the post-function.BTW, the boolean expression you are using at conditional execution parameter is correct.
-
reporter I have set this: But post function isn't working.
-
repo owner You should add that post-function into transition to Done status in the workflow of 'child issues', so that when the last child issue is transitioned to Done status, it will move parent issue to In Progress status.
-
reporter I have set this in the workflow of 'child issues': But still isn't working. Maybe there is something i do wrong? Issue Types - which should i select? I selected all issues that are in 'parent'. Status - i choose only Product Pending (from parent issue). I have also added few things to conditions filter.
-
repo owner Try moving the post-function to first position in execution order.
-
reporter Tested this option too.
-
repo owner Try clearing parameter Conditional execution. Post-function should transition parent issue always, even if current child issue is not the last one being transitioned to Done status.
BTW, always keep your JWT post-functions before system post-functions in execution order.
-
reporter Conditional execution - cleared. I moved post-function to first position and when i'm trying to close child issue i get this error:
org.ofbiz.core.entity.GenericTransactionException: Commit failed, rollback previously requested by nested transaction.
-
repo owner Sorry, I forgot that you have a validation in the transition from "Product Pending" to "In Progress".
Do the following:
-
Keep conditional execution empty. You don't need it because of your validation that is blocking the transition in parent issue until all the child issues are in Done status.
-
Set target field to Issue status (delayed writing). This way the transition is executed on parent issue once the last child issue is actually in Done status.
-
Don't forget to keep your post-function before system post-functions.
-
-
reporter Now it is working. Thank you for your support.
-
reporter - changed status to resolved
- Log in to comment
Hi @Tennaen,
I don't understand exactly what you want to do:
Do you want to add a validation to your transition from "Product Pending" to "In Progress" in order to guarantee that all the issues linked as "relates to" are in status "Done".
Do you want that when you move your last linked issue to "Done" status, the "parent" linked issue automatically transitions from "Product Pending" to "In Progress".
Do you want both previous use cases?