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.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To expand on the "scriptrunner" option, here is a post from just yesterday that explains how to do that:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you be more specific about the problem then? What additional functionality are you looking for that the transition doesn't provide?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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. :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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. :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Go to cog item -> Issues -> Resolution and choose the default value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.