Skip to content

Conversation

@wedamija
Copy link
Member

Previously this function would always just fetch the oldest history for a given group. This pr fixes
it to look for the most recent row with a status that is considered the inverse of the status we're
using to create the new row. Unresolved and resolved are opposites, as an example, and not all
statuses have an inverse.

@wedamija wedamija requested review from a team, ahmedetefy and iProgramStuff October 20, 2021 01:43
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this require a migration?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yeah

…istory row for a status

Previously this function would always just fetch the oldest history for a given group. This pr fixes
it to look for the most recent row with a status that is considered the inverse of the status we're
using to create the new row. Unresolved and resolved are opposites, as an example, and not all
statuses have an inverse.
@github-actions
Copy link
Contributor

This PR has a migration; here is the generated SQL

BEGIN;
--
-- Alter index_together for grouphistory (2 constraint(s))
--
CREATE INDEX "sentry_grouphistory_group_id_status_7ae79a2b_idx" ON "sentry_grouphistory" ("group_id", "status");
COMMIT;

@wedamija wedamija merged commit 6c4a531 into master Oct 20, 2021
@wedamija wedamija deleted the danf/insights_fix_prev_history branch October 20, 2021 17:52
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants