How do I change the default value for the resolution field on the resolve issue screen?

Katherine Burkholder April 23, 2019

Right now the default value for the Resolution field on my Resolve Issue screen is set to "Done." How do I change that to default to a different resolution value? 

Note: The "Resolution" field is NOT a custom field. 

9 answers

1 vote
Andrew Russell August 3, 2023

If you remove the resolution field element "Create" Screens for your issue types, the resolution value will be "Unresolved" for new tickets.  By omitting the visible field in your creation form, the default becomes "unresolved. 

The act of including it as an element in the form -- defaults the value to whatever the dropdown displays.   I can't be sure, but I think it's the first value alphabetically (often Done or Complete).   Thus, omit it in the "Screens" option for creation tickets.  

When the field is not present in your [Create] option it will quietly be set to "Unresolved",

Quite literally -- The act of observing (including the field) in your form causes the issue.

We discovered this through trial and error.   See if it works for you.   Exclude the field.  Create a ticket.  And observe your desired result!

1 vote
Vladyslava Kovbasa September 13, 2022

Settings->Issues->Resolutions->Clear defaults

1 vote
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 23, 2019

Not quite what you are looking for, but rather than changing the default, you could use some of the instructions here to manipulate the list available.

Optionally, if you have the Scriptrunner add-on (and you are running on server) you can use a Behavior script to change the default value for just the context that matters to you.

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 25, 2019

To expand on the "scriptrunner" option, here is a post from just yesterday that explains how to do that:

https://community.atlassian.com/t5/Marketplace-Apps-questions/Set-default-field-value-to-nothing/qaq-p/1066726

1 vote
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 23, 2019

If you have two different transitions that should have different Resolutions, I would recommend removing the field from the screen and instead use a post function to set the resolution.

0 votes
Salvijus Laucius March 9, 2022

Hi,

You may set a different resolution as default by clicking "Default" for a resolution on the resolutions page (<your_jira>/secure/admin/MakeDefaultResolution.jspa)

0 votes
Manish V June 24, 2020

Hello Katherine,

I found the solution to the issue here-
https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Set-default-field-value-to-nothing/qaq-p/1066726

(Not sure whether you need the solution  now as that has been more than an year since the question was posted but you can surely use that for reference)

You'll need the scriptrunner plugin to implement the same.

Steps-

1) Go to the section "Behaviors"
2) Create a new Behavior
3) Add Mapping (Select the project and issue type)
4) Select the "Fields" option in the behavior
5) Here, you'll need to select "Resolution" in the add field option
6) Map to a Workflow
7) In the added field, select "Add Condition" and select "Workflow Action" and select the name of the transition.
8) Save and click on "Add Server Side script"
9) Add the following script-

import com.atlassian.jira.component.ComponentAccessor
import static com.atlassian.jira.issue.IssueFieldConstants.RESOLUTION

if (getAction() != null) {
def constantsManager = ComponentAccessor.constantsManager
def Map resolutionMap = [ null: "Please select" ]

constantsManager.resolutions.inject(
resolutionMap
) {
map, resolution ->
map[resolution.id] = resolution.name
return map
}

def resolutionField = getFieldById(RESOLUTION)

resolutionField.setFieldOptions(resolutionMap)
resolutionField.setFormValue(null)
}


(As mentioned in https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Set-default-field-value-to-nothing/qaq-p/1066726 )

 In the bottom
"resolutionField.setFormValue(null)"
add the ID of the resolution, which you would like to have shown as the default resolution, in the place of "null"
eg: "resolutionField.setFormValue(1234)"

10) Save and check

Please let me know if you need more if or have any queries.

Best Regards,
Manish

0 votes
Katherine Burkholder April 25, 2019

Thanks to all who responded. It doesn't really solve my problem, but I just removed the screen and added a post function to change the resolution for that specific transition. 

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 25, 2019

We actually implemented a "resolution code" custom field where I can set a different list of values and default for a different context. That's the field the users use.

The actual system resolution field is never visible for most projects and is set/unset by the workflow.

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.
April 25, 2019

Can you be more specific about the problem then? What additional functionality are you looking for that the transition doesn't provide?

Katherine Burkholder April 26, 2019

I want to set the default value for the Resolution field on a specific screen I created for a specific transition. I don't want the default to be the same for the Resolution field across all screens and transitions. 

For example:

1. I have one transition from Ready to QA to Closed and the transition text is "Won't Do". I want this transition when selected to open a screen with the Resolution field and the Assignee field with a Comments field. I want the Resolution field to default to "Won't Do" and the Assignee field to default to "Unassigned." I still need the Comments field, so just adding a Post function doesn't give me what I want. So what I did was add the post function and then created a screen where just the comments show. This is sufficient, but not exactly what I was wanting. I wanted the transparency of seeing what value the Resolution field and Assignee field were going to be changed to.

2. I have other statuses that also transitioned to Closed, but I want these to open a screen where the Resolution field defaults to "Done" because work was actually completed. These are find how I have them and work the way I want. It's just #1 above I was having a hard time figuring out. 

Like David Luke likes this
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.
April 26, 2019

Would you actually be able to change the value for the Resolution? Or would it must be for showing the value that is going to be saved?

Katherine Burkholder April 26, 2019

I don't think we would change it, it's mostly for transparency. I don't think it would matter if it could be changed. As long as it defaulted to Won't Do on this specific screen. 

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.
April 26, 2019

Why don't you simply label the transition name with Won't Do. Then there is no doubt what it is and you don't have to add the field to the transition screen.  :-)

Like Mikael Sandberg likes this
Katherine Burkholder April 26, 2019

I did that and that shows and works in the old view, but with the new view Atlassian just pushed out, the transition names do not show...it just says "Transition to".  :o|

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.
April 26, 2019

If you actually edit the name of the transition, it should only show that. If you leave it as the default when the transition was created, then it will say Transition to:. Try to edit and simply say Won't Do and see what it looks like.  :-)

Like Chrisjir Parkin likes this
0 votes
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.
April 24, 2019

Hey Katherine,

Your workflow will have a transition to Done. Add a post function to the transition to Update issue field (not Update issue custom field). Then select the Resolution issue field and then select whichever value you want from the field value drop down. 

0 votes
Alexey Matveev
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 23, 2019

Hello,

Go to cog item -> Issues -> Resolution and choose the default value.

Katherine Burkholder April 23, 2019

I only want to change the Resolution default on one screen, not on all screens that use the Resolution field. If I change it under Issues > Resolution, it will change the default on all my screens that use this field. I have one transition to Closed that changes the resolution to "Done" and another one that changes the resolution to "Won't Do." So I created two screens for each scenario.  I want one screen to default to "Done" and the other screen to default to "Won't Do."

Is it possible to just change the default for my individual resolution screens?

Alexey Matveev
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 25, 2019

If you are on server then you could use either the Power Scripts  or ScriptRunner apps.

If you want to use the Power Scripts app, then you could use the LIve Fields feature with a code like this:

lfSet("resolution", "your value");

Here is more info about Live Fields:

https://confluence.cprime.io/display/JJUPIN/Live+Fields

Suggest an answer

Log in or Sign up to answer