Update approval space after a page or issue is moved
Description
Background
Every approval is linked to an object (a Confluence page or a Jira issue) and to the space that object lives in. The space determines, among other things, where the approval is visible.
When a page or issue with an active approval is moved to another space, the approval's space link becomes stale. As a result the approval is no longer visible on the moved object and can only be seen on the global lists.
An approval should always point to the space its object actually lives in. After a page or issue is moved, the approval's space should be updated automatically. Existing active approvals should also be reconciled once against the current state.
Acceptance Criteria
-
A page or issue being moved to another space is detected, and the active approval's space is updated accordingly.
-
After a page or issue with an active approval is moved to another space, the approval is visible on the object in the new space and disappears from the old one.
-
A move within the same space causes no change.
-
A move of an object without an active approval causes no change.
-
A one-off reconciliation runs over all active approvals, compares each against its object's current space, and corrects the inconsistent ones. The reconciliation can be safely re-run.
Out of Scope
-
Historical (completed, rejected, or cancelled) approvals. Only active approvals are reconciled.