Forums

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

Trying to not recreate linked issues when re-transitioning an issue

MEDITECH ADMIN TEAM
Contributor
April 7, 2025

Using the JWT post function of Create issue link, I'm automatically creating and linking 4 new issues on a transition of the original issue from status A to status B. 
However, there are certain circumstances where the original issue needs to go back to status A. 

How do I prevent the post function from creating yet another set of linked issues (since they already exist) when moving back to status B?

Thank you for your time.

1 answer

1 accepted

0 votes
Answer accepted
Sergio García-Consuegra _Decadis AG_
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.
April 8, 2025

Hi @MEDITECH ADMIN TEAM ,

My name is Sergio and I'm a member of Decadis Support team.

In order to avoid new links to be created again, you can just adjust the Conditional Execution in that Create issue link post-function configuration.

This conditional execution it will depend on which are the types of the linked issues which you are creating.

For example, here you have an expression you can use in order to avoid new linked issues from being created:

count(linkedIssues("relates to")) = 0

This expression would work if your Create issue link post-function creates 4 new issues with the link type "relates to". You can just modify it with the type of the link you are currently linking to the current issue which execute the transition. Just replace "relates" for the link type you are currently using.

Also, another option would be using the following expression:

"Status B" NOT IN fieldHistory(%{issue.status}) 

In this expression, the parser function fieldHistory returns a list with all the different statuses this issue has had in the past. So, if the status B doesn't appear, then it will create the issue links. If this issue has been already in "Status B" , then the conditional execution will return false and it won't create again any linked issues. Just replace "Status B" for the status you use for creating the linked issues.

If this expression doesn't work for you or you would like to set a different kind of limitation, please let us know what kind of limitation you want to add (based on an issue type or any other condition that you would prefer to use here)

Thank you!

Best regards,
Sergio

MEDITECH ADMIN TEAM
Contributor
April 8, 2025

Thank you for the response. We have used a similar approach to your first option in the past, but I'd like to try that second option. That may be a better overall solution here. I'll update this when I've implemented the change.

Sergio García-Consuegra _Decadis AG_
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.
April 9, 2025

Hi @MEDITECH ADMIN TEAM ,

I'm glad to hear that you liked the suggested approach!

I will look forward your update!

MEDITECH ADMIN TEAM
Contributor
April 9, 2025

Thank you, Sergio. I went with your second option and it looks like that is the best way to handle this issue. Thank you very much.

Sergio García-Consuegra _Decadis AG_
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.
April 9, 2025

Hi @MEDITECH ADMIN TEAM ,

I'm happy to hear the solution worked for you!

If you have any other doubt JWT, I would like to suggest you creating a request in our customer portal, where we will gladly assist you with any doubt you have regarding JWT or about the rest of our apps! 

Hope you have a nice rest of the week!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events