I wanted to acheive below things :
Find out what is the next status.
All transitions that are coming to the next status.
Move issue to next status only if all above transitions are done.
i think you are trying to do auto transition issue by using post function, we tried that but it did't work. you can search in this forum lot of discussion has done on this
you can try this using script runner plugin
still if you want code let me know
You've already gone through part of this in a previous question you asked, the answer hasn't really changed.
I'm unclear on exactly what you are trying to do though. My instincts are telling me that you are trying to do something that has already been setup and documented somewhere, but I can't really tell.
Could you explain what you are really trying to do - forget the coding and technical side - what does the end-user get out of what you're doing?
Ok. I don't really see how your coding would help, trying to look at the start and end of transitions - it's a lot of work and doesn't really solve anything.
Also, your workflow simply will not work. If you block T5 because T6 has not executed, then the issue is in a dead-end - you can't execute T6 because the issue is in S4. Similarly, S5 is a dead end too.
To fix that, you need two more transitions - T9 from S4 to S5, and T10 from S5 to S4.
What you should then do is block T5 until T10 has been done, and block T6 until T9 has been done. You will need code to do this, but no need to read the transitions as you have been trying. You've got two much easier options (possibly more, my instincts are saying there are more)
Both solutions I've got are simple conditions.
1. Have a pair of fields called something like "T9 was done" and "T10 was done". Do not put them on any screens. When T9 or T10 run, use a post function to set the field. Then your condition can be simply "T9 must have data to let this transition run" on one, and the same for T10.
2. Write a condition that reads the issue HISTORY. All it needs to do is look for a change of status from S4 to S5, or S5 to S4 (it's really simple obvious text being stored, a simple API call to fetch it), and then allows the transition if it finds the right history record.
Thanks for your reply, can i acheive the same in below manner.
Before executing T5, i will see what is the Oytoging Status of T5(that is S6) and find out all the incoming transitions / status to S6 (that is S5 and S4) and check whether they are all completed or not, if they are completed then only i will execute T5.
No. That won't work. The problem is nothing to do with the landing status, the problem is that you can never get into that situation. If you use T5, you can never get to T6. If you use T6, you cannot get to T5.
Given your diagram, you can only ever run T5 OR T6, never both.
If you add more transitions to allow the use of both (or even run parallel transitions, which I'm not even sure work any more), then the end status of the transition is totally irrelevant, because you need to look at what has already happened to the issue, not what the transitions do.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
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