Skip to content

fix(jira): correctly handle issues with null resolution (Fixes #4295) #4370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

surinkim
Copy link

This pull request fixes a bug where Alertmanager would create a duplicate Jira issue if the existing issue's resolution field was null (for example, when the issue was still "To Do" or "In Progress").

Previously, the search query only checked for resolution != "Won't Do", so issues with null resolution were not properly matched, causing Alertmanager to incorrectly create a new issue.

This fix updates the JQL condition to also check resolution is EMPTY or resolution != "Won't Do", ensuring that open issues are correctly found and reused.

Changes

  • Modified the Jira JQL query condition to correctly handle issues with null resolution.
  • Added corresponding unit tests to verify this behavior.

Screenshots

Before

  • Search JQL: resolution != "Won't Do" only
  • Behavior: create new issue even if there is an open issue

Before Fix

After

  • Search JQL: resolution is EMPTY or resolution != "Won't Do"
  • Behavior: update existing issue properly without creating a duplicate

After Fix


Fixes #4295.

…heus#4295)

Signed-off-by: hyunuk <nnhope@hotmail.com>
@cicadadevops
Copy link

Could you please share the Jira integration and Alertmanager configuration?

@surinkim
Copy link
Author

Here is the Jira integration and Alertmanager configuration I used for testing:


Jira Environment


Alertmanager Configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native Jira Integration: JQL Query Excludes Unresolved Issues When Using wont_fix_resolution
2 participants