workflow transition does not work for sub tasks

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

This widget could not be displayed.

Post-functions are not capable of changing status safely.

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

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.

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.

>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)

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

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?

nope, it is not working :(

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.

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

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?

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.

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?

This widget could not be displayed.

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.

This widget could not be displayed.

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?

This widget could not be displayed.

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

This widget could not be displayed.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

176 views 1 3
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you