Hi all,
I have a custom field that has yes or no checkboxes. This field by default is checked no but when transitioning from one status to another, we would like to put in a validation that if the box is checked yes, that a certain field should be filled out. Does anyone know if this is possible to do or how to do this?
Thanks!
Lina
@Lina Abu-BakerI believe you can accomplish this using two validators.
The first you will set that the "Checkbox field" must be modified, and the second validator will garantee that the field has only one option checked.
If the default value is "No", then will need unselect the value "No" and check the value "Yes".
If you allow me, you could use two post functions if you need to change the option.
The first would be to clear the field and the other to set the value in the field to "Yes"
I hope I helped you.
If this post was helpful, mark it as Accepted solutions, so you can help others who may have the same difficulties.
If your question has not been resolved, please post again with more details.
Hi @Carlos Faddul ,
Thank you for your answer. I am not sure if I can use these options because I need it to check if the checkbox has been changed to yes before the transition happens.
Thanks,
Lina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why you do not use a post function to set the value of field ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Lina Abu-Baker no need for custom script :)
The configuration of post function it's very easy.
But you need to set correctly the post functions
First the mark yellow → you will clear any values in the custom field check box (because this is a multiple options field)
Second the mark green → you will set the value to "Yes" (or anything other value that you want)
I just recorded this video to help you with the post functions (need to order correctly they)
You only need to order correctly the post functions in order, to they executed to do what you want.
I hope I helped you.
If this post was helpful, mark it as Accepted solutions, so you can help others who may have the same difficulties.
If your question has not been resolved, please post again with more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Carlos Faddul thank you so much for the step by step video! It's very helpful.
The thing is the ticket does not always need to be checked yes. The user will determine whether or not the custom field should be checked yes or remain no. They would check yes and then click on "request approval." When they click on "request approval" is when I would need some sort of validation that the field changed from no to yes and if it did change, have the user go back and fill out a field called (if they did not already) "required URL."
Does this make more sense?
Thanks,
Lina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Lina Abu-Bakerto do this kind of validation, you will need a add-on, like JMWE or JWT to create Validators with conditions (this is possible to do with JMWE)
With the JMWE and a validator field, you will need to mark to run the validator if checked the condition (then you put your condition) (but unfortanally i cant show how to use this function of JMWE because i don't have in my personal instance or company instance) (i worked with jmwe at the past)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Carlos Faddul thanks for the recommendation, I will look into this. Do you think I could do it with scriptrunner? Or with automation conditions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Lina Abu-Baker with the scriptrunner you maybe can do this (i do not remember very well, because i am working with jira without app just under a year).
With the automation you can edit issues :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.