You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JQL Query Excludes Unresolved Issues When Using wont_fix_resolution
Description
When defining a wont_fix_resolution, the JQL query used in Alertmanager 0.28 (as seen in the debug output) is:
jql="resolution != \"Won't Do\" and (resolutiondate is EMPTY OR resolutiondate >= -1440m) and project=\"TEST\" and labels=\"ALERT{........}\" order by status ASC,resolutiondate DESC"
However, this query does not return issues that have no resolution set. This is due to the behavior of JIRA's != operator, which excludes issues where the resolution field is empty (i.e., unresolved).
The query should return both unresolved issues and issues with resolutions that do not match "Won't Do".
Possible Fix
To correctly include unresolved issues, the JQL should be modified to explicitly account for them, such as:
jql="(resolution is EMPTY OR resolution != \"Won't Do\") and (resolutiondate is EMPTY OR resolutiondate >= -1440m) and project=\"TEST\" and labels=\"ALERT{........}\" order by status ASC,resolutiondate DESC"
Steps to Reproduce
Define a wont_fix_resolution with a JQL query similar to the one above.
Ensure there are unresolved issues in the project.
Run the query and observe that unresolved issues are missing from the results.
Environment
Alertmanager version: 0.28
The text was updated successfully, but these errors were encountered:
Thanks for opening an issue. Do you think you would be able to open a fix for this, including tests, and perhaps a screenshot showing the old (incorrect) behavior and the new (correct) behavior for some test data in Jira?
JQL Query Excludes Unresolved Issues When Using wont_fix_resolution
Description
When defining a wont_fix_resolution, the JQL query used in Alertmanager 0.28 (as seen in the debug output) is:
jql="resolution != \"Won't Do\" and (resolutiondate is EMPTY OR resolutiondate >= -1440m) and project=\"TEST\" and labels=\"ALERT{........}\" order by status ASC,resolutiondate DESC"
However, this query does not return issues that have no resolution set. This is due to the behavior of JIRA's != operator, which excludes issues where the resolution field is empty (i.e., unresolved).
Reference
See JIRA documentation for details on this behavior: https://confluence.atlassian.com/jirakb/using-not-equals-on-a-resolution-does-not-return-unresolved-issues-635897091.html
Expected Behavior
The query should return both unresolved issues and issues with resolutions that do not match "Won't Do".
Possible Fix
To correctly include unresolved issues, the JQL should be modified to explicitly account for them, such as:
jql="(resolution is EMPTY OR resolution != \"Won't Do\") and (resolutiondate is EMPTY OR resolutiondate >= -1440m) and project=\"TEST\" and labels=\"ALERT{........}\" order by status ASC,resolutiondate DESC"
Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: