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.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @MEDITECH ADMIN TEAM ,
I'm glad to hear that you liked the suggested approach!
I will look forward your update!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.