Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JMWE clone transition and not create duplicates

JiraYo
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.
November 30, 2018

Hi there i am making a transition to run when clicked that will clone an issue based on whether a field is populated or not.

However i can see a possible problem if someone tries to click the same button twice. The condition of the field being populated will STILL be true the second time, so i would imagine it would create the same issue over again.

 

How do i put a "check" in so that it will check to see if the issue (based on the summary field) is already created in the linked project? Preventing duplicate issues. Probably something in conditional execution field. Anyone know thanks.

2 answers

1 accepted

0 votes
Answer accepted
Vinu
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.
December 2, 2018

Hello

Instead of putting a conditional check on any cloned issue, the best way would be to disable global or reverse transition to the status.

For example : Let me say my Issue transitions from Status A --> Status B and I clone the issue when this transition happens.

Once the issue reaches Status B, if I do not give reverse transition to A, and not make Status A a global transition status, I can make sure that the issue does not go back to status A and in turn make sure I do not create a duplicate clone once it is transitioned again to B.

There are of course other options to consider. But let me know if this works. If not, we can think over the other options out there.

JiraYo
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.
December 3, 2018

Yes, well that is what i eventually decided to do in a way. I am redesigning the workflow. Basically, we have a parent work order that creates a bunch of child work orders in other work order systems.

I have simply decided that they will have a planning stage, and then it will only create new work orders when they click to make it to active (or whatever the status) and you will not be able to go back. So the agent has to make sure all the information is in there before they click the "generate work orders button". After they do this, if they want to add new data, they have to update the linked work orders manually, or manually create them if they didnt in the first place. So in a sense, you have the correct answer here even though i came to the same conclusion while re-imaging the business workflow of the users.

1 vote
David Fischer
Community Champion
December 3, 2018

Even though you might not need it anymore, here's the answer to your original question.

You would indeed use Conditional Execution to prevent creating the same issue over and over again, by testing if there is already a linked issue with the same Summary:

! issue.getLinkedIssues("link name").any {
it.summary == "The summary of the created issue that should not be recreated"

Suggest an answer

Log in or Sign up to answer