workflow transition does not work for sub tasks

Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2014

I'm creating 3 subtasks as post function in workflow.

All the subtasks are using same workflow. On issue create I have post function which should take sub task to next status.

This is working for only last i.e. 3rd sub task not the 1 and 2nd. That transition is available for those 2 subtasks and i have to click manually to go to next status

5 answers

0 votes
Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2014

Jamie,

as per link https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Createasub-task

it is not supposed to go into workflow for the except the last sub task.

Can you suggest something or modify so that each subtask should go into the workflow.

0 votes
Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2014

no, it creates 3 subtasks on another transition

parent and subtask are using same workflow. On issue create there is post funciton which takes issue to next status

yes, the last one e.g. if i have 4 sub task it will work on only 4th one

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2014

Can you clarify this.

You have a workflow function on the parent issue that creates 3 subtasks, when the parent is created?

On the subtask workflow, you have a fast-track workflow function that should move them to the next state?

But it only works for the third, even though there is no difference between the 3 subtasks?

0 votes
Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2014

It's one workflow.

On Issue Create - I have post function - If priority = Imporant and Type = Subtask - action id xxx will take to status from unvetted to waiting for triage

Start -->Create Issue transition -> Unvetted (status) --> vetted transition -> waiting for triage (status)

This post function works only on last sub task created by issue type = "Access" and on "vetted access" transition.

Start -->Create Issue transition -> Unvetted (status) --> vetted access transition -> waiting for support (status) - This works without any issue and creats 3 sub tasks mentioned in post function of vetted access transition

please let me know if you need any additional information. Thank for looking into this.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2014

Post-functions are not capable of changing status safely.

Let's start there - how *exactly* are you doing this second transition?

Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2014

It's one workflow.

On Issue Create - I have post function - If priority = Imporant and Type = Subtask - action id xxx will take to status from unvetted to waiting for triage

Start -->Create Issue transition -> Unvetted (status) --> vetted transition -> waiting for triage (status)

This post function works only on last sub task created by issue type = "Access" and on "vetted access" transition.

Start -->Create Issue transition -> Unvetted (status) --> vetted access transition -> waiting for support (status) - This works without any issue and creats 3 sub tasks mentioned in post function of vetted access transition

please let me know if you need any additional information. Thank for looking into this.

Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2014

i also develope a custom listener to change status of issue type sub task however that also did not work

It throws error message:

java.lang.RuntimeException: You can not transition an issue with an invalid validation result.

even though that "vetted" transition avaiable for the issue.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2014

>I have post function - If priority = Imporant and Type = Subtask - action id xxx will take to status from unvetted to waiting for triage

That's the bit that does not usually work safely. What post-function are you using? (I suspect it's only blind luck that it's working in one case at all)

Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2014

It is perfectly working if it not sub task for all the issue.

Actual condition f priority = Imporant and Type = Subtask || Bug || IT Help - action id xxx

It is Fast-track transition

Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2014

screenshot

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2014

Ah, you should have said that a lot earlier. That is one of two methods that does work, and was where I was going to point you.

So, all working ok now?

Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2014

nope, it is not working :(

Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2014

my observation is - Generic event is not getting called for all the sub tasks which are getting created on "vetted access".

I don't receive any issue created notification for 1st and 2nd sub task however i receive 2 notification for 3rd sub tasks - issue created and another for status change.

I'm creating those sub task after "generic event" of "vetted access". If i create it before , none of the subtask is changing it's status.

Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2014

I belive - Fire a Issue Created event that can be processed by the listeners - is not getting called except for last sub task

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2014

Ok, I need to step back, as I'm getting myself knotted up. I'm sorry, I've confused myself.

First, you say "All the subtasks are using same workflow. On issue create I have post function which should take sub task to next status."

I assumed you mean that you're creating an issue, which then triggers the creation of 3 sub-tasks, which you then push to the next status. My initial question is if I've understood that correctly? And then a follow-up: why are you changing the status? Why not just create them in the right status to begin with?

Paresh Gandhi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2014

I'm creating those sub task on another transition and you are correct on issue creation there is post function which does the transtion.

Reason for changing is - if ticket is not critical or serious it can be moved to next status without waiting.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2014

Ok. So, you have

  • A post-function that runs in a transition on the parent issue to create three sub-tasks
  • A fast-track transition on the subtask workflow that should be transitioning them to a new status IF the priority is set high.

So, the next question - are the subtasks being created 100% correctly? They're all set to critical or serious? There's no edits/updates being made after creatiing them?

Suggest an answer

Log in or Sign up to answer