Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner (Jira Cloud) transition cloned Issue when cloned by Issue, is transitioned

Requirement: When a new issue is created in Project A,  I want to create a clone in Project B ( all ready accomplished) I'm facing challenges transitioning the cloned issue along with the parent issue (cloned by). for e.g. when the parent issue (cloned by) in Project A transitions from one status to another,  I want the cloned issue in project B to transition along with it as well, so its outward link direction.  

I'm still learning groovy and found this script but its for the inward link direction clones --> cloned by. 

https://bitbucket.org/snippets/Adaptavist/8exo75/script-console-transition-an-issue-when

Note: The cloned issue is just a place holder in  project B and wont be acted upon and should just transition along with the parent (cloned by) issue in project A. Also, both projects share the same workflow, so having different statuses wont be a problem

I even tried doing this with Jira automation but looks like I need to write rules for each transition and cannot be accomplished with just one rule (If-else).

Any help in the regard is highly appreciated.

3 answers

1 accepted

0 votes
Answer accepted

@Juan Manuel Ibarra appreciate your response. I tried the exact same thing but got an error:

Action details:

Transition issue

Destination status could not be resolved. If using a smart-value ensure this resolves to a numeric status ID or untranslated name for issues (with current status):

That error seems to be because the flows of both projects do not share a similar status or at least they do not have a way to get to the destination state from the state that is there now. Could you share the workflows?

@Juan Manuel IbarraI was using different workflows for the projects. Changed it to use a common one and it worked! thanks for your help!!

Hello, In this case, if both tickets have the same flows, it is not necessary to do an if else.

In the trigger you can leave the two options blank so that it is executed in all cases.

20210401_145539.jpg

 

Then within the branch of the related ticket you can select "Copy from trigger issue" so that it goes to the same status as the ticket triggered the automation

20210401_145511.jpg

@Juan Manuel Ibarra appreciate your response. I tried the exact same thing but got an error:

Action details:

Transition issue

Destination status could not be resolved. If using a smart-value ensure this resolves to a numeric status ID or untranslated name for issues (with current status):

That error seems to be because the flows of both projects do not share a similar status or at least they do not have a way to get to the destination state from the state that is there now. Could you share the workflows?

Hi @Romel 

Thank you for the question.

You can modify this script to be a post function and to transition an issue it will work as long as the transition id that you specifies is a valid transition in the workflow that the issue can take from its current status as you can only transition an issue if a valid transition exists as the API's require this. 

Thank you.

Kind Regards

Kate

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you