Forums

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

How to ignore transition validator when resolution field is set to a given value

ruben beaujolais August 27, 2024

Hello,

For a given status :

  • I've configure a screen
  • I've configured a property for the user to set a resolution on transition.
  • And I've also configured a transition validator with a filed required (must not be empty). (An error message is also displayed in case field is empty in the screen)

How to ignore the validator when the user set a given resolution value within the screen.

I mean, I want the user to be able to go through the transition when he set the resolution to a given value in the screen (while the error message is currently displayed because the field is empty).

Thank you in advance.

2 answers

0 votes
Maciej Dudziak _Forgappify_
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.
August 28, 2024

Hi @ruben beaujolais 

You can create conditional validations with Jira expression-based validator. There are several options available on the Atlassian marketplace.

I am from Forgappify, and we developed Jira Expression Validator, which is part of the Workflow Building Blocks for Jira app. The expression you might use could look something like this:

issue.resolution != null && issue.resolution.name == 'Fixed' 
? true
: issue.customfield_xxxxx != null

You need to change the ID of the custom field to a valid one. In the editor, after 'issue.', start typing the name of the field, and you will get suggestions with the correct value.

I am leaving a link to the app's documentation if you are interested.

I hope it will help.

Cheers

 

0 votes
Chris Rainey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 27, 2024

Hi there,

To make sure I understand - you are looking for the validator to be ignored if a resolution is set on the screen that shows during the transition?

What is the behavior of this workflow status and transition currently?

ruben beaujolais August 28, 2024

Thank you for answering.

Yes.

At the moment, the user user have to provide a value to pass the validator while this value is not needed, because not relevant for the chosen resolution.

 

Chris Rainey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2024

Ah okay - so this is a separate field with a validator, not the resolution field. And this validator needs to be skipped depending on option in the resolution field at the time of the transition? 

ruben beaujolais August 28, 2024

Yes

 

Chris Rainey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2024

Is the resolution being set at this same screen or is it being set before this particular transition? It may also help if you were to share an image of the workflow.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events