Mandatory field blocks issue from being created, even though that field isn't present on the Submit screen

motherg February 5, 2013

This one is really annoying me - I hope it's a simple thing that I've just got wrong because it seems crazy to not be able to do this.

Here's the scenario: We've created a custom field called 'Root Cause'. This field is a drop down list and is filled out by the developer when they are transitioning the Issue from 'In Progress' to 'Resolved' [note: not the closed state, the one before that].

As such, we want this field to be mandatory on the screen used for this transition, and it can be displayed on the 'View' screen (when there is a value) but we definitely don't need it on the Submit/Issue creation screen. As such, I set the Root Cause field to be mandatory and removed it from the screen scheme used for the 'Submit' screen.

However, when I tried to submit the issue the validation flagged up that Root Cause was a required field....even though it isn't present.

Have I done something wrong or is this a known issue?

3 answers

1 accepted

5 votes
Answer accepted
Mizan
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 5, 2013

Are you making the field manadatory through postfunction ? or Field configuration ?

motherg February 5, 2013

Sorry about that Mizan, I seem to have commented on the wrong post just now. As you can see from the comment on the post below, you are right. Thanks for the inspiration - as soon as you said I realised where I had gone wrong!

motherg February 5, 2013

I've had a look at this and it seems I need this plugin to make this possible - https://marketplace.atlassian.com/plugins/com.googlecode.jira-suite-utilities (thanks @Renjith). There definitely isn't any stock functionality to be able to add the mandatory field flag as a post condition (and I can't see the field I need in the list of fields I can add Post Functions to anyway)

Is that correct? In which case I'm blocked by our internal hosting solution at the moment - it's good to know if this is the right plugin.

Mizan
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 5, 2013

Another good plugin which can make fields mandatory on specific transitions is the behaviours plugin .

Also please check again if the field is removed from the create screen , because i guess if the field is not present on the screen then there should not be any validations for that field . (for example resolution field is mandatory only on resolve screen )

motherg February 5, 2013

The field definitely isn't present on the issue creation screen because it isn't relevant. Exactly like the resolution field actually - in our setup the resolution is only visible on the Close screen scheme (used in the transition). Obviously it is displayed in the 'details' section because it is a default field.

I am basically trying to replicate that functionality aren't I?

Mizan
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 5, 2013

what is the exact message you are getting after you submit ? and how the message appears ? is it a popup or a message in red color on the screen ?

motherg February 5, 2013

I can do one better than that :) - screenshot below.

Mizan
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 5, 2013

Good one :) ... i think suite utilities plugin is already installed on your JIRA ..can you check that from the plugins section .. Also check on the create transition of the workflow if there is any validator for Root cause field .

In one of your above comment what you meant by close screen scheme ? A project can only be associated to one screen scheme.

Mizan
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 5, 2013

Did you reindex JIRA after doing changes in the fild configurations ... I cant think of any other reason for this issue , either the field is actually present on the screen or some other issue .

motherg February 5, 2013

Having just checked I can categorically state that we do not have the Suite Utilities plugin installed, so what we're seing in that screenshot must be default functionality.

I was getting confused between Screens and Screen Schemes earlier I think - we've got various screens for various parts of the work flows because I wanted to really limit what the available options are at each step. Our current implementation of JIRA is overly complicated so the devs don't use it properly.

motherg February 5, 2013

I've re-indexed and still had no joy. It definitely isn't present on that screen (I can screenshot each of the relevant screens to prove this...plus it might also point out to somewhere I hadn't looked).

In the mean time, this is the screenshot of the field in the Field Configuration screen:

The only screens where it is used in this project are the screens Prefixed with 'Prototype'. Below you can see the screens that are used in the Screen Scheme used by this project:

Mizan
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 6, 2013

I am sorry , the behaviour of the select list customfield is different from resolution field when making it required from the field configuration .

Renjith is correct , you will need suite utilities or behaviours plugin to make the field mandatory on specific transition.

motherg February 6, 2013

Thanks @Mizan - not the answer I was hoping for but it is the correct answer, thanks for helping me get to the bottom of it!

2 votes
Renjith Pillai
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 5, 2013

That's way JIRA works. The field configuration is applied as a flat rule to all operations. You have to make that field as optional and then add a validator to which ever transition you want the developer to fill that in (use Required Field Validator from JIRA Suite Utilities)

https://confluence.atlassian.com/display/JIRA/Using+Validators+to+Make+Custom+Fields+Required+on+Transition+Screens

motherg February 5, 2013

I was doing it through Field configuration as it the field isn't displayed on the previous screens. I hadn't thought of using the post function to do that - let me check it out and I'll get back to you to see if I can do it without one of the addon's our infastructure team won't let us install.

Thanks for the pointer in that direction - really apprecaite it!

0 votes
Nagaraja JB December 12, 2016

Go to the Field Configuration corresponding to the issue type, find the field throwing the error, change it to optional or hide it.

Suggest an answer

Log in or Sign up to answer