Skip to content

[Pre-Approval Request] Migrate Jira issue state detection from resolution to statusCategory #14347

@derda17

Description

@derda17

Is your feature request related to a problem? Please describe
We noticed that defectdojo is not able to re-open Jira issues in our setup, which led to some findings being noticed very late. This is caused by our Jira not returning a resolution field when the state of the issue is requested by defectdojo. Defectdojo only re-opens an issue if the issue is currently closed and it derives this information from the existence of a resolution field.

Describe the solution you'd like
While a proper maintenance of the resolution field is a good practice, it is not guaranteed and might be difficult to achieve, depending on the design of the Jira workflow. Even if this is implemented, it is possible to configure Jira in a way that the resolution field is maintained nicely in the UI but won't show up in API responses requested by defectdojo.

There is actually a better indicator: the statusCategory is a fixed set that indicates if a status is an end state (COMPLETE) or something else (TO_DO, IN_PROGRESS, UNDEFINED). This set is not extensible, every status, also custom ones, must map to one of these categories and it is returned in the API per default.

I'd like to contribute a change to issue_from_jira_is_active in helper.py, that relies on the statusCategory instead of the existence of a resolution field. I'm asking for a pre-approval according to the contribution guidelines.

Describe alternatives you've considered
We changed our jira workflow, the jira config and adapted our processes to get the jira integration working, but I still think checking the category is the cleaner approach for the active check.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions