Forums

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

Make a field mandatory for features when they are moved to any status.

Aniket Hande September 23, 2021

I need a validator or any solution where the field should be mandatory when entered a new status if the field is blank it should show a popup to enter the value.

2 answers

2 accepted

0 votes
Answer accepted
John Funk
Community Champion
September 23, 2021

HI Aniket - Welcome to he Atlassian Community!

I would create two transitions going to the status, one with a condition that says the field is not empty. And a second one that says the field is empty. On this second one, you can add the transition screen with the field that needs populated. Also add a validator for this transition that this field is required. 

Aniket Hande September 23, 2021

I have added one screen which just has that custom field how do I create the condition one can you please explain it to me with images. I started on Jira this week only

Aniket Hande September 23, 2021

@John Funk please is there any validator script for this ?

Aniket Hande September 24, 2021

@John Funk pls i need it urgently

John Funk
Community Champion
September 24, 2021

You don't need a script - just add the two conditions and the validator. It's all built in

Like Aniket Hande likes this
Aniket Hande September 24, 2021

@John Funk  Please explain it more clearly and if possible with images as I was assigned Jira task this week only

John Funk
Community Champion
September 24, 2021

Sorry - will do.

  1. Create a screen with the field that you want to be mandatory and save it. You do not need to add it to any schemes. 
  2. Go to Settings (gear icon) and then Issues.
  3. Then select Workflows on the left-hand side
  4. Then search for the workflow used by that project.
  5. Then click the Edit button 
  6. Click on Diagram if it is not already selected
  7. There should already be a transition to the status, click on the line/transition
  8. Then click on Validators in the popup on the right
  9. Then click Add validator
  10. Select Field Required validator and then click on Add
  11. Find the field and click Add and then the bottom Add button
  12. Click on the tab that has your workflow diagram
  13. Then click the Edit button in the popup. 
  14. Add the screen from step 1 above that has the field that you want populated. And then click Save.
  15. Finally, click the Publish draft button to publish your workflow.
Like # people like this
Aniket Hande September 24, 2021

Thank you but i got the solution for what I asked -

I needed a validator script which was

cfValues['customfieldname'] != null

I specifically said I need a validator script

Like Eszter Varga likes this
0 votes
Answer accepted
Tansu Akdeniz
Community Champion
September 23, 2021
Aniket Hande September 23, 2021

I need a script in validator or in behaviors as we cannot add plugins

Tansu Akdeniz
Community Champion
September 23, 2021

@Aniket Hande field required validator is a default feature in Jira Cloud. Please go to workflow -> transition -> validators -> add validator.

Aniket Hande September 23, 2021

i am not working on jira cloud i am working on the basic one where it doesn't have field required validator 

Aniket Hande September 23, 2021

@Tansu Akdeniz  please is there any validator script for this solution?

Aniket Hande September 24, 2021

@Tansu Akdeniz pls i need a solution asap

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events