Hi,
I was strucked up in making a Field as mandatory while moving from one transition to another.
Basically, I know it how to do by using a Validator 'Field Required'. But my concern is I already have an automation to update the field with some text while creating.
But I need to make the users to fill that information in field, then only they can be able to move the transition from one to other.
Please anyone suggest me with the solution.
Thanks in Advance
the problem is: how do you know if the user really answered the questions if they are just freeform text in the field? You could check that the length of the text in the field is greater than a certain number of characters (the initial length of the value that's pre-filled, plus a minimum expected number of characters the user must type) but that's no guarantee.
To check the length of the text, you can use a Build-your-own Validator with this code:
!!issue.customfield_12345 && issue.customfield_12345.length > 500
where issue.customfield_12345 needs to be replaced with the custom field ID, and 500 with the expected minimum length.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You would create a custom validator for that transition, but I am not a nunjucks expert and not sure of the syntax.
@David Fischer could you help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
We do have An add-on JMWE, But may i know how to work with that to get the required solution?
As this needs to be done for a single transition in a workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, that's a little more complicated then. One way to to use a third party add-on like JMWE or ScriptRunner to check the value/size of the field to see if it is larger character wise.
An out of the box solution might be to create another custom text field and populate it with the values of the Root Cause field when it gets updated. So an automation rule that triggers on Root Cause value changed, then do an action to Transition issue to "To Do". You would have a validator on the transition to "To Do" to make sure the new custom field is populated.
Or if you want the Root Cause to be the final field, start with the new custom field having the questions and needing to be updated, and then copy the value to the Root Cause field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
Thanks for your quick response.
I will explain you clearly.
I have a field named 'Root Cause' with auto filled text(Having Questions) while creation of issue.
So when I make a transition change from one status to other, I need to make sure that whether the text with questions are answered or not.
What is the procedure for doing so?
If I have added a field required validator, it is not working because the field is not empty, and already having some text there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am a little confused by your question.
Why can't you just add the validator to make the field required? It shouldn't have anything to do with your automation rule that fires on create, unless your validator is on the Create transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.