Monday, November 8, 2010

Resolved, Resolution and Resolution Date

This week's jiradev post is one result of the Second Atlassian Doc Sprint last week. For two days over thirty people from many different groups in Atlassian and others from all over the world "scratched their itches" to add and update the Atlassian documentation. I'm looking forward to the next one sometime in 2011.
~Matt

One area that sometimes confuses JIRA users and administrators is the difference between Resolved and Resolution. Many of the standard JIRA reporting gadgets expect the Resolution field to be set as described below or confusing results can occur.
Summary

Resolved is one of the issue statuses in the default JIRA workflow.
Resolution is a system field with values of Fixed, Not Fixed, etc. The Resolution field is usually set during transitions.
The Resolution Date system field is the latest date that the Resolution field was set to a value.

Resolved

JIRA comes with a default workflow (Admin, Global Settings, Workflows) that has the following expected series of statuses for an issue:
Open to In Progress to Resolved to Closed
The idea is that a bug is created with a status of Open, and is then moved to In Progress and Resolved by the person who fixes it. The bug is then moved to Closed by someone who checks that it really was fixed. Resolved is just a name for an issue status - the status could as well be named "Believed Fixed" or "Ready for Testing".
The Resolved status has not connected directly with the Resolution field

Resolution

It's a good idea to keep the number of statuses in your workflow as small as possible to make maintenance easier. So it makes sense to avoid having lots of statuses with names like:
  • "Closed and Fixed"
  • "Closed and Won't Fix"
  • "Closed because Duplicate"
The system field Resolution (Admin, Issue Settings, Resolutions) can be used to avoid this increase in the number of statuses. The default values of Fixed, Won't Fix, Duplicate, Incomplete and Cannot Reproduce cover many of the reasons a bug could be closed.
The intended use of Resolution is that when a bug is created the field is empty, with no value. This is shown in an issue as a value of "Unresolved". When an issue is moved to another state such as Resolved or Closed, the Resolve Issue Screen is shown during the transition and this screen has the Resolution field on it. So a bug can have its Resolution set to Fixed while it moving to the Resolved state.
Tip: in a standard JIRA installation, the Resolve Issue Screen is the only screen where you can set the Resolution field for an issue, and this screen is only used for transitions to the Resolved and Closed statuses.
Once the Resolution has been set, the issue is considered "resolved" by JIRA, even if the status of the issue is not the Resolved status.
The only way to remove the resolution from an issue in a standard JIRA installation is to Reopen an issue. You can add the Resolution field to the Default Screen to make it easier to change the value, but a transition is still required to reset the resolution to empty.

Resolution Date

The system custom field Resolution Date is the latest date for a given issue that any value was set in the system Resolution field. As noted in JRA-20286 with the default JIRA workflow, changing the issue status from Resolved to Closed will change the resolution date. The Resolution Date will only be empty if there is no value at all in the Resolution field.
The Resolution Date is confusingly named "Resolved" in the list of Issue Navigator columns.

Other Approaches

Many organizations using JIRA don't use the Resolution field because
  • It's hard to reset the value to empty for "unresolved"
  • It doesn't appear on standard screens, just during transitions
  • It's hard to make it required on custom transition screens
Instead they base their reporting only on the name of the statuses in the workflow. They may also create their own custom select field named "Our Resolution" or "Sub-status" with values such as Unresolved, Fixed, Won't Fix, Duplicate, Incomplete and Cannot Reproduce.
Pros:
-Avoids confusion of the words Resolved and Resolution
-Works well with custom workflows since there is no need to add post-functions to set the system Resolution field for new transitions
Cons:
-The standard JIRA reporting gadgets are no longer as useful
Don't add a resolution named "Unresolved" to your the system Resolution field because the issue will still be treated as resolved by the standard JIRA gadgets, since it has a value.

12 comments:

  1. The parting shot about not adding an "Unresolved" resolution is a good one. My organisation did that and it really messes things up.

    Question: what will happen to all the current bugs with a Resolution of "Unresolved" if I were to delete it from the list of Resolutions? We have a "qualified" system and I can't make changes without knowing what they're going to do....

    ReplyDelete
  2. Try it in a staging system first, not production. Deleting a resolution from the list of resolutions will cause JIRA 4.2 to prompt you for a new value for all the issues that had that resolution. The choice of no resolution which is what you really want is not offered. Take a look at "How to Clear the Resolution Field" link above to do that.

    ReplyDelete
  3. Hello, I'm administrator on the jira here in Fortaleza Ceara.
    I have a problem. the time the User will create an issue, it is doubled, ie it is doubled. could you help me?
    Atlassian JIRA (v4.4.1#660-r161644)

    E-Mail: renato_ferreira@atlantico.com.br

    ReplyDelete
  4. Renato,

    You're more likely to get help at http://answers.atlassian.com
    You will need to provide more information about what you are doing when the issue is doubled (duplicated? cloned?)

    Best wishes,

    ~Matt

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. Anybody can answer, what resolution is more correct in my case:
    an issue was resolve and resolution was fixed, but QA added bug in comment and reopen the issue, Developer answered that bug from comment will fixed in another task and return status to "resolved". So, what resolution more suitable for this issue now? Duplicated/Won't fix or it must remain the same (I mean Resolve)?

    ReplyDelete
  7. How about "Incomplete"?

    ReplyDelete
  8. Hi

    What is the difference between Not a defect and Works as designed.

    In my project we have "Not a defect" and "Works as designed" both as resolution field. Could anyone please give definition of both with examples?

    ReplyDelete
  9. They sound like the same thing to me. Perhaps the second is somewhat more general

    ReplyDelete
  10. No, they (Not a defect and Works as designed.) are not the same

    ReplyDelete
  11. Hi Do you know how I can remove the strikethrough in the issues? Initially, somebody set up a resolution field and as a result whenever a user edits the issue it sets the resolution to "TBD" and the ticket is marked as resolved and strikes the ID. I have now removed the resolution from the screen. But that only made it uneditable, the resolution field still appears and the strike through stays. I want to remove the resolution as well as ths strikethroughs Any suggestions? Thanks

    ReplyDelete
    Replies
    1. The resolution field has to be empty to remove the strikethrough. If you are using Server I would install ScriptRunner and use the Bulk update Resolution script to clear those issues. If you are in Cloud, this may help: https://confluence.atlassian.com/jirakb/how-to-edit-the-resolution-of-an-issue-313467778.html

      Delete