The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

'Fields Required Validator (JMWE app)' Validator - field2 required if field1 has value X

Helena
Contributor
July 6, 2021

Can I add the following validator to transition into Close status:

If cascading list first value = Something, then custom field 'Field 2' is required

If cascading list first value = AnythingElse, then custom field 'Field 2' is not required

?

Was trying to use 'Fields Required Validator (JMWE app)' Validator,

selected the field: 'Field 2',

put the error message (optional),

selected 'Conditional validation', but can't get my condition working.

Also haven't found any similar example. Is it even possible to create sth like this?

Both fields are added on the screen.

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Suprija Sirikonda _Appfire_
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 Champions.
July 6, 2021

Hi @Helena ,

In the Field required validator, add the below code in the Conditional validation, which returns true if the parent value of the cascading field is equal to "Some value". 

issue.get("customfield_11601")?.get(null)?.value == "Some value"

customfield_11601 -> id of the cascading field. Modify the field id and the value as per your use case.

You can refer to "Issue Fields" tab in the Help section for snippets on how to access/test the value of fields.

JMWE conditional validation.png

Hope this helps!

Regards,

Suprija 

Helena
Contributor
July 7, 2021

Thank You Suprija! This worked.

I had altered the same condition wrongly (new to this syntax).

Like • Suprija Sirikonda _Appfire_ likes this
TAGS
AUG Leaders

Atlassian Community Events