Forums

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

Reason to close doesn't allow new ticket created?

Jonathan_Lance
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 16, 2020

I want to make the 'Reason to Close' feature mandatory. When I do so, it works on existing tickets, however prevents me from creating new tickets.

When I create a new ticket and populate the relevant fields and try to save the new ticket the 'Reason to Close' feature is activated.. 

Why is this happening? 

1 answer

1 vote
Nic Brough -Adaptavist-
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.
April 16, 2020

Jira has a rather blunt "mandatory field" system and for historical reasons, tends to rely on apps for cases where fields have more complex needs.

The Jira system is just "a field is mandatory or optional".  This runs throughout the lifecycle of an issue, the status, other fields, who the person is - all irrelevant.  Mandatory fields have to be filled on create, and they cannot be blanked out during edit or transition.

To do what you're thinking of, what you'll need to do is make fields optional, but then find an app that can provide a "workflow validator" that can check that a field is filled before completing a transition.

Andrew Laden
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.
April 16, 2020

If a field is "Mandatory" in the field configuration, then it must be filled in if it appears on the screen"

So you can control with with screen configiuration. So as long as your create and edit screens don't include that field on them, you will be fine. Though you will need to add a transition screen to your close transition to allow people a chance to fill in the field.

That said, Using a validator or condition probably makes more sense.

Nic Brough -Adaptavist-
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.
April 16, 2020

I'm afraid that is not true. 

This is why Jonathan is having this problem - the field is mandatory but not on the create screen.  The system is demanding the field be filled, but it can't be because it is not on the screen, so you can't create it.

Andrew Laden
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.
April 16, 2020

It absolutely is true. Resolution works the exact same way in a default setup.

From the docs (empasis mine) https://confluence.atlassian.com/adminjiraserver/specifying-field-behavior-938847255.html

Required/Optional — set a field to be required (so that whenever a field is edited it must be given a value) or optional.

If you aren't editing the field, because it isn't on the screen, then you don't have to give it a value.

Nic Brough -Adaptavist-
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.
April 16, 2020

I think you need to re-read that statement more carefully.  It does not mention the screens at all.  It is talking about when a field is edited.

Or could you explain the behaviour Jonathan is seeing?  Or what I see when I set a field as mandatory and leave it off the create screen?  (I.e. "Field x is mandatory" and no creation)

Andrew Laden
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.
April 16, 2020

Mea Culpa. Went back and tried it, you are correct. Even if its not on screen, its required. I could have sworn that wasn't the case.

However I also noticed that Resolution also no longer says required, even though it is. And it does behave that way. If its on the screen, its required, but if its not on the screen, it isn't. 

 I wonder if there was a behavior change behinds the scenes a while (years) ago. I seem to remember that at some point in the past resolution explicit said it was required on the field config screen. 

Found https://jira.atlassian.com/browse/JRASERVER-7969 from 2005, so looks like something was changed back in jira 3 (and yes, I go back that far with jira)

Or maybe its just my mind going from all this time in lockdown.

Nic Brough -Adaptavist-
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.
April 16, 2020

Resolution is not, and has never been "mandatory" in the same way other fields are done in the field configurations. 

It does kind of behave like it is though.  It's purely a technical difference, not something that I'd really bother most people with.

Consider all the other select type list fields - they're a list of options that Jira offers up, but it adds an empty or none option to the top of the list.  Select that, and the field is left empty.  Make the field mandatory, Jira complains if you select the blank one.

But, resolution does not have that empty option and always has a default.  So when it's offered on a create, edit or transition screen, it is always set to something.

That's why it's not got the red star - it's not mandatory by virtue of the mandatory flag in a field config.  It's mandatory because you can't get through the screen without setting it!

Like Andrew Laden likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events