Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,524
Community Members
 
Community Events
184
Community Groups

Is there a way to set the default resolution value for a project?

Jack Kelly
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.
Oct 15, 2015

I'm looking for a way to set the default value for the resolution field in a project. It looks like it defaults to the first item in the list and I am wondering if I can change that so it defaults to a different value in the list.

3 answers

1 accepted

2 votes
Answer accepted
GabrielleJ
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.
Oct 15, 2015

Yes. In your Workflow's final transition (assuming it's the Resolve or Close transtion), there will be a post-function that sets the resolution field or add one if there's none. Update that with your desired value.

  1. Install Scriptrunner add-on on your Jira.
  2. Go to Administer panel, Add-ons tab, Behaviour menu.
  3. Add Behaviour.
  4. Click to Fields.
  5. Click to Create initialiser and paste following code to form (suppose that desired default resolution value = Done)
    import com.atlassian.jira.component.ComponentAccessor
    import static com.atlassian.jira.issue.IssueFieldConstants.RESOLUTION

    def constantsManager = ComponentAccessor.constantsManager
    def defaultValue = constantsManager.resolutions.find { it.name == 'Done' }
    getFieldById(RESOLUTION).setFormValue(defaultValue.id)
  6. Map behaviour to desired projects and issue types.

 

default_resolution.PNG

Thank you, I think this will work for us!

This worked exactly the way I needed it to for initializing the resolution for a specific project to Done but leaving the default alone for all other projects.  Thanks.

2 votes
Jeremy Gaudet
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.
Oct 15, 2015

Not really; I assume you are limiting the list using transition properties, or else you'd pick up the system default.  I have JRA-45531 filed as a suggestion for them to add a property to also specify the default in the same context.

As Gabrielle says, you can set it explicitly, but I assume what you were asking about was the default selection in the pick list.

Jack Kelly
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.
Oct 15, 2015

Yes I was asking about a field value default for the project. But Gabrielle's solution works just as well for my situation as I'm trying to minimize what our Service Desk staff have to touch and the resolution our customers should always see is Done not Fixed. I could have used the System-wide resolutions values to choose a different default for all projects, but that may bother developers like me that may typically like the default set Fixed.

Michael Kornatzki
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.
Oct 15, 2015

It is really simple to include with Scriptrunners Behaviour Plugin (with an own Script). I added a new transition-property 'resolution.default' and now i can set the default resolution for every transition.

This is what I am looking for! Do you have a sample of code you could show as to how you set the default value inside your different transitions?

no, I want to see a default value on the transition screen so that the user can leave or change the value. The post functions are exactly that.... post.

This is exactly what I need!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events