Setting the Accepted State in Jira Align does not synchronize if there is no default Resolution in Jira
Summary
When changing the State (or equivalent Process Step) in Jira Align to Accepted, in either stories or features, then that change is not reaching the Jira work item and a short time later the change made in Jira Align is reverted by the Jira Connector as shown in the example in this audit log:
Environment
Jira Align
Diagnosis
Setting the Done Status (or equivalent ) in the Jira work item did successfully result in the related Jira Align work item being set to Accepted but during the process it was seen that, in Jira, a pop-up screen appears that defaults to a Resolution of "Please select..."
- Other Jira Align State or Process Step changes were confirmed as successfully being able to update the status of the corresponding Jira work item
- The Jira Align State or Process Step Mapping to Jira Status for the Accepted State (or Process Step Equivalent) has been confirmed as correctly configured
- these settings are found in the Settings > Jira Settings > Manage Projects > State Mapping link at the end of the row for the desired Project
- The Jira API log ( Settings > Jira Settings > View Logs > set Item dropdown to Jira API ) records that a POST call to a transitions endpoint (/rest/api/2/issue/...../transitions) has failed with Response: 400 Bad Request
The exact text shown in the "errorMessages" parameter, as seen in the above example may differ as it is configurable in Jira
- In Jira, the transition to Done in the Workflow of the affected Jira Project has a Resolve Issue Screen enabled
Use of such a screen is discussed in this KB article: Jira issues need a resolution
- In Jira, the transition to Done in the Workflow of the affected Jira Project has a Validator configured containing a rule where the Resolution is Required
Use of such a validator is discussed in this Community article: How to make the Resolution field mandatory in the Resolve issue screen
- In Jira there is no Default Resolution set in Settings > Issues > Issue Attributes > Resolutions. In the following image, all of the Resolution rows show a link to Default in the Actions column. If the default link is not shown against one of the rows, then this row is the current default. Note: Clicking the Clear defaults link allows no default to be defined.
Cause
Jira Align does not set a resolution in Jira, what happens is the Jira Connector triggers the transition to Done and expects Jira to set the Resolution based on the transition settings in the workflow. The sync to Jira of the Accepted State then depends entirely on the settings within Jira, specifically the combination of using a validator to enforce setting a Resolution and no Default Resolution existing:
- If the Validator is set to Resolution Required AND a default Resolution is set in Jira, then setting Accepted in Jira Align will work, as when the transition is actioned in Jira (by the Connector) and the default Jira Resolution is set (so it is allowed)
- If the Validator is set to Resolution Required BUT no default Resolution is set in Jira, then setting Accepted in Jira Align will fail triggering the error text configured in the validator settings as the Connector does not provide a Resolution and Jira cannot set the default.
- If no Validator is set AND no default Resolution is set in Jira, then setting Accepted in Jira Align will work as the resolution is set to Done. Note: the setting to Done in this situation happens at a point in the Jira process that is after when any validators are checked, hence it does not apply when a Validator rule has already failed.
Use of the Resolve Issue Screen itself does not cause the issue, however it is mentioned in this article as customers that are trying to enforce that Jira users manually set a Resolution when choosing the Done status will be using a Resolve Issue Screen
Related Jira Connector limitations also exist for setting fields to Mandatory/Required in Jira
Solution
Due to the way the Jira Connector is expecting Jira to set the Resolution, the symptoms seen are expected and Jira will need reconfiguring to workaround the limitation. There are two potential workarounds:
- Set a Default Resolution in the Jira settings (leaving the Validator rule enabled). This will require training any user that marks work items as Done in the Jira Project that they must always check that the Resolution is correct, when the pop-up screen appears. If a specific default Resolution that identifies as Resolved by Jira Align is created , then it is more likely that a Jira user will notice that they need to change it, and there may be a benefit of being able to report, in Jira, on which issues were resolved within Jira Align.
- Remove the Validator for requiring a Resolution from the Transition to Done in Jira (with no default Resolution). This will require training any user that marks work items as Done in the Jira Project that they must change the Resolution from "Please select..." to something appropriate when the pop-up screen appears.
Both the above workarounds could be affected by User Error
Related Materials
- Jira Align KB article: Mapping States, Process Steps, and Statuses between Jira Align and Jira Software
- Jira KB article: Jira issues need a resolution
- Jira Community article: How to make the Resolution field mandatory in the Resolve issue screen
- Jira Community article: How to reset resolution in dropdown list to "Please select..."