Fix web_link property of AlertGroup (#1738)

The routing of the OnCall plugin has changed and no longer uses URL
params
but instead uses paths. This link is used when declaring an Incident
from
the OnCall Slack alert and needs to match the correct pattern in order
for
Incident to correctly detect it.
This commit is contained in:
Ben Sully 2023-04-12 17:44:27 +01:00 committed by GitHub
parent 6ccde4a5e2
commit 303670947b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed a bug in GForm's RemoteSelect where the value for Dropdown could not change
- Fixed the URL attached to an Incident created via the 'Declare Incident' button of a Slack alert by @sd2k ([#1738](https://github.com/grafana/oncall/pull/1738))
## v1.2.8 (2023-04-06)

View file

@ -474,7 +474,7 @@ class AlertGroup(AlertGroupSlackRenderingMixin, EscalationSnapshotMixin, models.
@property
def web_link(self) -> str:
return urljoin(self.channel.organization.web_link, f"?page=incident&id={self.public_primary_key}")
return urljoin(self.channel.organization.web_link, f"alert-groups/{self.public_primary_key}")
@property
def declare_incident_link(self) -> str: