validator or conditional check to have minimum 2 values in custom field with multiple input

Manu... July 21, 2020

Hi Team,

 

Could you please guide on how i can define a conditional check or validator before submission of request on having 2 values inputs at least in multiple input custom field with a comma as separator.

 i.e 

abc,cde 

 

If value given is only 1 than it should not allow the action to submit the request.

1 answer

0 votes
David Fischer
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 22, 2020

Are you on Jira server/Data Center our Jira Cloud?

 Also, what is the field type of the field you want to check?

rateodoros October 5, 2020

Hi, David! I'd like to enjoy the ride here... I also need to do the same.

I have a multi-select user picker to set approvers. It's Jira Cloud.

I need to be sure that user chooses at least 2 approvers. Is that possible with regex validator? What would you suggest?

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2020

I don't believe it's possible with a "regex" validator. But you can easily do this with JMWE's Build-your-own Validator with this code:

!!issue.customfield_10500 && issue.customfield_10500.length >= 2

where you need to replace  customfield_10500 with the field ID of your multi-user picker custom field.

Like # people like this
rateodoros October 5, 2020

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events