Make a custom field mandatory on a specific status

Samuel James October 13, 2024

Hi all,

 

Is there a way to make a custom field mandatory only when the issue is moved to a certain status?

 

Regards,

Samuel Srun.

3 answers

1 vote
John Funk
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 13, 2024

Hi Samuel,

If you have an add-on like JWME or ScriptRunner or JSU - then you an add a validator to the workflow for the transition to the appropriate status for Required Field. 

0 votes
Nacho Moreno Ortega
Contributor
October 13, 2024

Hi Samuel,

I am part of the Decadis Support team and i would like to recommend you our app Jira Workflow Toolbox (Server/Data Center) .

In particular, in the transition to the corresponding status, the validator Fields required or changed checks if fields are set/empty or have/haven't changed on the transition screen.

If you need any assistance with our application, I encourage you to create a ticket on our support portal.

Best regards,

Nacho

John Funk
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 14, 2024

This would be another good tool to use.  :-)

Like Nacho Moreno Ortega likes this
0 votes
Sarp Egemen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2024

Hi @Samuel James ,

Yes, it is possible to do this natively in Jira.

Let's say you want a text box called "The reason" to be filled whenever an issue is transitioned to the "Impediment" status. I'll provide the exact steps for the scenario above, but you can adapt them to fit your needs:

  1. First, create a custom field of type Text Field (single line) and name it "The reason."
  2. Then, go to Field Configurations and make this field required.
  3. Copy the existing screen for the related issue type (or create a new one) and give it a meaningful name (e.g., "ABC Impediment Transition Screen").
  4. Add the custom field ("The reason") to the newly created screen.
  5. Go to the Workflow settings and open the editor for the relevant workflow (I recommend using the new editor).
  6. Select the Impediment status in the workflow and add a transition rule (click on the lightning bolt icon).
  7. Choose the option to show a screen on transition.
  8. Select the transition (in this case, "Any -> Impediment").
  9. Choose the screen (in this case, "ABC Impediment Transition Screen").
  10. Finally, update and publish the workflow.

This will ensure that when an issue is transitioned to the "Impediment" status, a screen will appear prompting the user to fill out the "The reason" field.

I hope this helps! Feel free to reach out if you have any questions or encounter any issues—I'll do my best to assist!

John Funk
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 13, 2024

You realize that the field must be populated at the point you create the issue if it is in the Field Configuration, right?

Like Sarp Egemen likes this
Sarp Egemen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2024

Hi @John Funk 

Thanks for pointing out this issue. Indeed, it needs to be populated when the field is set to required.

The default value of "N/A" or "TBD" can be set for "The Reason" custom field upon creation.

An automation can then clear that field after the "Issue Created" action is triggered.

I understand that in this scenario, a more efficient approach might be to use a third-party marketplace app, but I also believe in the true power of Jira.

John Funk
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 13, 2024

You can’t clear out the value of a required field. Have you actually tried what you are suggesting and had it work?

Like Sarp Egemen likes this
Sarp Egemen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 14, 2024

Hi @John Funk ,

I appreciate your concern for providing the community with the most accurate information. I did indeed try before posting here. As far as I am missing something, the solution does work.

So, I recorded a quick video to demonstrate it. Please check it out and let me know what you think!

https://youtu.be/x3O-K61PCIw

John Funk
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 14, 2024

Are you sure set the field to Required in the Field Configuration? I did not see you fill out that field at Create. 

Sarp Egemen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 14, 2024

Hi @John Funk ,

Yes, it is required, and you can see it in the video. What happens behind the scenes is that the field has a default value set, so it is not required to fill it upon creation (it gets set automatically)

However, after the issue is created, the field is immediately cleared by an automation, leaving it blank.

Then, when the user transitions the issue to "Impediment," since it was emptied by the automation, it must be filled in to complete the transition.

I would like to remind you that this is a POC and can be adapted depending on one's needs.

I would be happy to answer any further questions.

John Funk
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 14, 2024

Thank you for the clarification that you you are setting the default value - that was not mentioned above. 

Sarp Egemen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 14, 2024

Hi @John Funk,

I am glad if I was able to answer your questions. Sharing ideas and discussing the limits of Jira with such an experienced community leader was both a pleasure and a valuable learning experience for me.

I believe I mentioned in my second post:
"The default value of "N/A" or "TBD" can be set for "The Reason" custom field upon creation."

Please let me know if you didn’t receive that message, and I can resend it.

Have a nice day!

John Funk
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 14, 2024

Yep, I missed that about the default - you probably want to mention that with the creation of the field. Also, I noticed in your test that it looked like you were using Cloud - and this question is for Data Center. In this case, I think it still works as you outlined it - just be aware of those differences though. :-)

All-in-all, I think you have a good solution - well done!

Like Sarp Egemen likes this

Suggest an answer

Log in or Sign up to answer