I have a simple automation that takes the description of an issue emailed to us in JSM and adds it instead as an internal comment. It then deletes the description.
It has been working perfectly, except for one time where the first step of adding the comment failed because of the character limit on a comment. However, the next step proceeded.
I need to be able to ensure the automation does not continue if the comment is not added.
Is there a way to force the automation to stop if a step fails? This would also be very helpful in some of our other automations.
I know I could use an 'if then else' branch but a stop if fail would account for many other issues on other automations as well.
Hi @Evelyn Lewis ! Glad to have you in the community.
In automation you can make use of Smart Values to verify the lenghth of your description before executing the rest of your automation.
In this example, we would be using the smartvalue {{issue.description.length}}, which you can learn more about here-> Java documentation: Length
You rule would work the same as it was before:
Trigger: When field is edited [Description, during issue creation]
Conditional: Smartvalue condition-> If the issue description is smaller than 32767.
We use 32767 as it is the max character limit for a JIRA comment.
This way your rule won't execute in case of a character excess! Let me know if that helped!
Regards,
Jaime Escribano
Thanks Jaime. That was an option I was considering but it only accounts for one possible error. If the first step fails for another error then I'm back where I started!
Thanks for your help.
Cheers,
Evelyn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome. There isn't a direct fail and stop method. To simply the automation a bit. It's like a 2 or 3 part process. A trigger, condition, and an action. If a condition is not met, then don't take action.
Perhaps, you can break your automation into another rule. Basically, the 2nd rule would be trigger by a comment. If there isn't one, don't proceed. If there is one, compare it against some pattern to indicate that it's the comment from the description and not a regular comment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.