Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation that checks for field value and prompts user

Martin Härri July 7, 2023

Is it possible to write an automation which does the following:

- when a user hits the "save" button

- checks if a field meets a specific condition (e.g. Assignee is not empty)

- if that condition is not met, prompts the user with something like "Please add an Assignee before saving the issue"

- does not allow the user to save the issue until that condition is met

4 answers

1 accepted

0 votes
Answer accepted
Martin Härri August 10, 2023

In case someone is interested in how we eventually addressed that topic. 

Workflow cannot be used, as we want to perform such a check when a user updates an issue, not when it is moved in the workflow. So we decided to use Project Automation.

However, it is not possible to display a prompt, the best thing we could come up with was to send an e-mail to the user informing them about what they should fix.

3 votes
Anthony Morais
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.
July 7, 2023

Hi @Martin Härri 

 

You can do this through Workflow, it would be more or less following the step by step below:

 

Edit the workflow.

 

validators.png

Add a validator

add validator.png

 

Add a Field Required Validator

field required.png

 

Choose the Assignee field and put the desired message, after doing so, publish the Workflow

message workflow.png

 

I hope it helps!

 

Regards,

Anthony

1 vote
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 7, 2023

Hi @Martin Härri -

So, Jira implements "buttons" as transitions, that are part of a workflow, like @Anthony Morais laid out. These transitions can include validators that check that the Assignee field is not empty.

Normally these transitions are used to move an issue from one step to the next (Open -> In Progress -> Review -> Done).

But transitions can also be used as a workaround to the problem that @Alexander Pappert mentioned. Ever since Jira implemented Inline Editing, allowing changes to fields outside of transitions, it made it a little harder to prevent users from changing a field without proper validation.

The workaround to force a validation on edit is to:

  • Create different screens for View and Edit
  • Remove the mandatory field from the Edit screen
  • Create an Edit transition with the fields you want to check, and have this transition "loop back" to itself.

There's details on this here: How to Disable Inline Editing 

The screenshots are from Jira On-Prem, so if you are on Cloud, the "buttons" are now a drop-down menu. But functionally, the concepts are the same.

0 votes
Alexander Pappert
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.
July 7, 2023

don't think you can do it on issue edit

a mandatory field on edit just checks that some value is filled, but no specific value check

 

you can do this with automation addon after issue edit/creation and send a mail to the user who changed the issue that he needs to correct the value - but no guarantee that he will do this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events