Fix do nothing erroneous api call for Pagerduty#6231
Merged
CommanderStorm merged 5 commits intolouislam:masterfrom Oct 27, 2025
Merged
Fix do nothing erroneous api call for Pagerduty#6231CommanderStorm merged 5 commits intolouislam:masterfrom
CommanderStorm merged 5 commits intolouislam:masterfrom
Conversation
CommanderStorm
requested changes
Oct 23, 2025
Collaborator
CommanderStorm
left a comment
There was a problem hiding this comment.
This will only fix the issue for newly saved notifications.
Could you adjust the if-statement in the backend instead?
Contributor
Author
|
Change made to suit preference for backend logic fix. The style of the changes align with other similar provider backend logic, such as Splunk. Tested on Pagerduty, all settings behave as intended. |
CommanderStorm
approved these changes
Oct 24, 2025
Collaborator
CommanderStorm
left a comment
There was a problem hiding this comment.
LGTM, thanks for the fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❗ Important Announcements
Click here for more details:
🚫 Please Avoid Unnecessary Pinging of Maintainers
We kindly ask you to refrain from pinging maintainers unless absolutely necessary. Pings are for critical/urgent pull requests that require immediate attention.
📋 Overview
This change fixes a bug where the the do-nothing option for "Auto resolve or acknowledged" still results in an API call to PagerDuty, and this call contains an invalid parameter "0" for "event_action". The issue occurs because the current settings value of "0" for do nothing, is a string of "0" and therefore is truthy when it is evaluated by the backend logic. This results in the early return being missed and the API call is made carrying the invalid value of "0".
By storing this settings value as an empty string, it is evaluated as falsy and becomes null which satisfies the early return and no API call is made, which is the desired behaviour of "no nothing".
Changing the way this value is stored in the database is low impact and means the backend logic can remain as it is, instead of having to explicitly check for "0".
For users who have selected "do nothing" before this change is applied, the UI drop-down may be nulled, however this is cosmetic only and the existing setting of "0" remains in the database until the user re-selects "do nothing" at which point the change takes place. Until the user does this, the existing behaviour persists. Users who had selected resolve or acknowledge, are not impacted at all.
🛠️ Type of change
📄 Checklist