Hi,
I am using "Checklist" custom field in Jira named "Agreement". and I have 2 options for that one:
1) Agree
2) Read Later
Now, while creating issue I need to make sure that user has selected atleast one of them.
I have set this field as required in field configuration but it doesn't validate that any value is selected.
Also I tried checklist validator in "create issue" transition but it looks for all mandatory items, now I can't make any of them or both of them mandatory.
Also different validators like, field is not empty or field is required is also not working.
I am using Jira 7.7.2 version. any help is appreciated.
Thanks,
Mansi
If you want to enforce only 1 selection why not just make it a select list, which by definition is only 1 selection?
select list works technically but esthetically, Agree and Disagree should be checkbox.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could name the custom select list "Agree or Disagree?" and make it required. When the user drops down the list then the two options are shown. That would maintain the esthetics and keep the solution simple.
Otherwise you may need a JSOM script. I don't know how to write them yet, but I can picture the logic:
Set both checkboxes to "required"
Write a script that says "If Agree is checked then Disagree set to be not required. If Disagree is checked then Agree is set to not required,"
Hopefully someone here can tell us if this is possible, and if so help with the script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We need to be careful here. Do you genuinely mean a "checklist" field (as provided by an add-on), or is that you describing a standard "checkbox" field?
If it is a check-list, you have to use a validator on it, you can't make it mandatory in field config. But checkboxes do work, the will force the selection of one or more options.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic,
I want to enforce selection of only one option. I tried checkbox and checklist both with validations but its not working as expected.
Thanks,
Mansi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For a single option, use a "mandatory" radio button or select list field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Mansi.
If you change the field to required in the field configuration option, it should have a red asterisk alongside the field in the screen and the user should not be able to create or save the change in the issue without selecting something on the field.
In your project go to Project Settings > Fields and check if your "Agreement" field is listed there and if it's marked as "Yes" in the required column. Make sure that the field is linked to the screen you're testing.
Also, just to check and so I can replicate here, this field is a "Select List (single choice)" type, right?
Kind regards,
Maurício Karas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mauricio,
I am using Standard "Checklist" field. I want to make sure that user selects only one option out of 2 and making it required doesn't enforce that validation.
so is it any other way to make it work?
Thanks,
Mansi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline 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.