Can an automation that currently creates a sub-task if a checkbox equals a value, to instead send an error message to the user if a related field is empty? I don't see any action that looks like that.
The broader question is, is there a way of accomplishing this function? As I think about it, the automation can of course simply not create the sub-task if the related field isn't empty, but the user needs to see an error message.
Yeah, the main issue here is that Jira Automation cannot display error messages or prevent actions from happening.
The "standard" way to do this is with a validator, and but in your case, you will need a Custom Validator. You've mention two different scenarios:
So you would have a custom validator that says:
Unfortunately custom validators require a paid third-party app, and you might have to learn a little bit about Jira Expressions.
In this case it would be something like:
!!issue.customfield_20001.value && !!issue.customfield_20002.value
(I modified an example from Use cases for validators.)
Hi @Phil Bustin ,
In that case, You can add the workflow field required Validator on the create issue Transition. Make the field required and add a error message.
Go the workflow>>edit >>click on create transition>>click on validator>>Select Field required validator>>Add the field & error message which you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Manoj, but I think this is not the answer. To clarify, I can't unconditionally require field B, since it's only required if field A contains a specific value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have JWT Plugin then you can use the "Validation based on JQL query".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would have to ask for our first plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, as you mentioned you can just not create the sub-task if the field isn't empty and in that case notify the user the reason why the sub-task was not created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But notify how--add a comment?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Either by adding a comment to the trigger issue, or you have the option to send an email, or sending them a slack message if you are syncing the Slack ID to the user's property as described in this article.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'll look into that, but what I've been working on is this:
1) Position an "Automation message" field at the top of the form.
2) Create a separate automation (to avoid too much complexity in the current one) that interrogates all 7 checkbox/text field pairs and sets a single selection field (yes or no), if a discrepancy is found.
3) Set a condition in the existing automation that will create sub-tasks only if the aforementioned single selection field (that acts as a switch) is 'no' (for no discrepancy). Otherwise, populate the Automation message field with a message notifying the user that at least one discrepancy was found.
4) Create a validator in the transition that the switch must = 'yes'. (Possibly I will need to set a separate switch in the existing automation, and use that for the validator, but that's just a detail.)
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.