Jira validation

paul stafford February 6, 2023

Hi all

im looking to add a validator to a specific issue type that insists on certain fields to be filled in before the ticket can be created.

I’ve added a validator that’s asks for example, the description, to be filled in on new bugs created (description is just one of the fields I’ve tried to get this to work on)

in the validator option I’ve added the “issuetype == bug” formula and the custom response. This all seems to work well however,

when I try it, I create a bug and leave the description blank. This gives the custom response I added and it won’t let you create the issue however, even if I fill in the description, it still won’t let me create?

 

any ideas please? 

I’ve seen that I can create a new field configuration and set certain fields to mandatory but this will impact each issues type so I really want to get this validation to work.

3 answers

0 votes
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2023

Hi @paul stafford ,

your Conditional Validations script syntax is incorrect. Try this instead:

issue.issueType.name == "Bug"
0 votes
Oliver Siebenmarck _Polymetis Apps_
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.
February 7, 2023

Hi @paul stafford ,

Your Jira Expression isn't quite correct. Here's what should work:

issue.issueType.name == "Bug"

The issue object has an attribute called issueType which in turn has a name that may or may not be "Bug". The above Validator would only be true for issues of type Bug.

Hope that helps,
 Oliver

paul stafford February 7, 2023

Hi Oliver

Ive updated that however it still doesnt recognise when I type something into the description field.

Its not limited to this field either. If I choose "sprint" cant be left blank, it doesnt recognise when I add one - same for any field really?

Any ideas?

Oliver Siebenmarck _Polymetis Apps_
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.
February 7, 2023

Hi @paul stafford ,

That's indeed odd. I'm afraid, I don't know the app you are using (JMWE, right?) well enough to know what could be going on. 

You could reach out to their support directly or maybe @David Fischer has an idea of how to help you.

Best regards,
 Oliver

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 6, 2023

Please show us the complete set of Validators for your Create transition.

paul stafford February 7, 2023

validator1.JPGvalidator2.JPG

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2023

This doesn't appear to be the native Field Required validator for Jira Cloud

Do you have a third party app installed that provides additional workflow functionality? If so, which one?

paul stafford February 7, 2023

Hi Trudy.

Ive included images of the steps taken to add this validation. 

I chose this option (JMWE.app) as the one that appears to be native didnt bring up options for additional fields that are on the issue screen, its just had a list of a basic few.

It also doesnt allow the optional condition that allows me to specify it on bugs only.

 

Image 4 is the one that appears to be the native onevalidator1.JPGvalidator2.JPGvalidator3.JPGvalidator4.JPG

 

Hoping you can help?

Cheers

paul stafford February 8, 2023

Is there another way to restrict actions on a specific issue type so that specific fields on that issue type must be filled in? or do I need create a new field configuration? I cant see that this allows me to achieve that either?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2023

Do you want the fields to be required all the time for this issue type, or only require them to be filled in when specific transitions happen?

If you want them required all the time then I would do that with a Field Configuration for that specific issue type.

Like paul stafford likes this
paul stafford February 8, 2023

Hey, yeh I want these fields to be filled out all the time for this issue type.

can this be done with field configuration for a specific issue type then yeh?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2023

Yes.

In a Field Configuration Scheme you associate a Field Configuration with an Issue Type. Within the Field Configuration you can specify that a field is Required or Optional. If you specify it as Required then it will be required all the time. You will want to make sure the field appears in your Create Issue, Edit Issue and View Issue screens.

If you go to Project Settings for the project, and click on Summary, that will show you the Field Configuration Scheme and the Field Configurations it contains.

Screen Shot 2023-02-08 at 2.17.29 PM.png

Field Configuration Schemes may be shared, so you'll want to check that before making any changes. Make note of the field configuration scheme name.

Go to the Administration screen for Field Configuration Schemes

https://<yourCompany>.atlassian.net/secure/admin/ViewFieldLayoutSchemes.jspa

Find the name of the field configuration scheme. This screen will show you all the projects that use that field configuration scheme.

Screen Shot 2023-02-08 at 2.24.34 PM.png

If it is used by more than one project, click on the Copy option on the right to make a copy of the scheme. The copy will include in it the original Field Configuration.

On this screen click on the name of the Field Configuration Scheme you created. Within the new screen, make a note of the name of the Field Configuration.

Screen Shot 2023-02-08 at 2.27.02 PM.png

Go to the administration screen for Field Configurations.

https://<yourCompany>.atlassian.net/secure/admin/ViewFieldLayouts.jspa

Find that Field Configuration, and click the Copy option (1) to the right to make a copy of it. Once the copy is made, click the Configure option (2) for the copy.

Screen Shot 2023-02-08 at 2.30.40 PM.png

Here you can specify fields as required or optional.

After you finish that, go back to the copy you made of the Field Configuration Scheme. Click on the Associate button.

Screen Shot 2023-02-08 at 2.33.00 PM.png

Select the Field Configuration you were just updating to make more fields required, and the issue type you want to apply that to, and click Add.

Screen Shot 2023-02-08 at 2.34.12 PM.png

 

And finally, go back to the project, to Project Settings / Summary, and click on the Field Configuration Scheme name, as shown in the first image in this reply.

You will find an Actions button there. Click it and choose Use a different scheme

Screen Shot 2023-02-08 at 2.36.38 PM.png

You'll be shown a screen with a pick list where you can select that new Field Configuration Scheme you created.

Note that users will be required to fill in the fields when Creating new issues, but because inline editing is enabled (by default) they will not be required to go back and fill in the fields in any issue where they are currently blank.

You will want to do a search for issues of the specified type where those fields are empty and ensure that they get filled in.

Users will not be permitted to clear those fields once they have been filled in.

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