Forums

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

Conditional Comment Field Requirement on a Screen

Aslıhan Kara July 31, 2024

 

  1. We have defined a screen called 'Multijob Screen.' We display this screen when transitioning to the 'Ready for Test' status in the workflow. If 'No' is selected in any of the fields on this screen, we want to make the comment field mandatory.
  2. Also we can't remove the display of the 'none' option.

 

Can someone help us? :Dimage (1).png

2 answers

0 votes
Maciej Dudziak _Forgappify_
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.
August 1, 2024

Hi @Aslıhan Kara 

If you are in a company-managed project on Cloud, it is possible with Jira expression-based validator. There are several options available on the Atlassian marketplace.

I am from Forgappify, and we developed Jira Expression Validator, which is part of the Workflow Building Blocks for Jira app. Below you will find a configuration I tested:

community_comment_required_1.08.24.png

The above expression will need to be expanded by checking additional fields. You can use the || operator. It is unclear to me what should happen when the "None" option is selected. Should it be treated the same as when the user selects "No"?

I hope this is helpful for you, regards!

 

0 votes
Lisa Forstberg
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.
July 31, 2024

HI @Aslıhan Kara ,

Which deployment option are you on? DC or Cloud?

To make the comment mandatory in the transition to the 'Ready for Test" status

  • Try to add the validator option "Field Required Validator"
  • Choose comment
  • Add an error message
  • click Add and publish the workflow 

Screenshot 2024-08-01 at 08.29.38.png

To remove the "none" option you need to

  • edit the custom field and assign it a default value
  • make that field required in the field configuration

Screenshot 2024-08-01 at 08.46.42.png

However depending on what you want to happen, having a default option pre-chosen for the user might not be the best approach if you need the user to choose a value actively. For a user it is easy to overlook in a popup screen if you have provided a pre-selected option. You sort of need to force the user to make a conscious decision. 

If you don't like the "none" option you could add a default option to the list, name it f ex "please choose option", organise that to be the top of the list,  make the field required and then add the validator "Field has been modified Validator" to ensure the field has been changed during the transition.

Good luck! 

/L

Aslıhan Kara August 1, 2024

Hi Lisa,
Thanks for helping. We use Jira on DC. With your help i set "Yes" value as default. 

But i still dont understand that how do i access to Field Required Validator screen? :( Can yougive me a path for accessing the related page?

Suggest an answer

Log in or Sign up to answer