Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,647
Community Members
 
Community Events
176
Community Groups

[Script Runner] fast track transition when linked issuetype = XYZ

I am trying to integrate multiple workflows and one of the conditions I am trying to setup is that , workflow A triggers an issue creation for workflow B, however, when the new issue gets created in workflow B, I want it to drop directly in the "In progress" Status instead of "To-Do". how would i write up this condition in scriptrunner? 

 

Note - workflow/issuetype B is also used independently. 

2 answers

You can use the "fast track transition" script postfunction of script runner in the create tansition of the workflow B ... 

 

Captura.PNG

0 votes

I think you should add a customfield which will let you distinguish if the issue was created from workflow A or independently. Then you could use this custom field in your condition. For example, let 's say you create a field called "createStatus". And you fill it with value 1 if it is created from the workfow A and with value 2 if it is created independently. Then your condition would look like this:

def createStatus = ComponentAccessor.getCustomFieldManager().getCusomFieldObjectByName("createStatus")

issue.getCustomFieldValue(createStatus) == 1

Thank you for the approach @Alexey Matveev _Appfire_ , this i the one I would like to pursue. However, I am trying to setup the custom field here but again am stuck with the scripting part, I looked up the Scriptrunner documentation but could not find how to identify an issue if it is generated by another workflow or initiated by the current version.

 

Could you possibly point me in right direction if this data exists somewhere please?

 

Thanks

Ankit

You should create a usual custom field, not a scripted field. And then fill it in the post function which you use for creating issues from your workflow. How do you create issues from the workflow? What plugin do you use?

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events