"Open approval" in Jira approvals list opens /browse/<issue ID> – Jira redirects to "For you" and the AP pop-up doesn't open

Description

APFC QA

Opening an Approval (be it via Action Button, like “Approve” in the notification e-mail or via “Open Approval” button in Global / Space view), doesn’t always open the AP pop-up and sometimes only displays the Confluence page related to it or flashes the AP pop-up for just a split-second.

If this occurs after using the e-mail Action Button - the action does not go through, which bumps the severity of this issue. Of course you can keep clicking on the button until the AP pop-up opens and then progress the appoval, but throughout all my recent tests, I wasn’t able to determine what steps may cause this bug. It seems random, at this point.

APFJ QA

In APFJ QA this seems to be a 100% reproducible, but instead of not opening, the AP pop-up appears completely blank:


Change

  • Jira lists build the work item link from the work item key, not its numeric id. Where the list has no live work item data (the bulk fetch is still running, failed, or the user cannot browse the work item), the key comes from the approval summary, which always starts with the key and is updated when a work item is moved. /browse/<id> is used only when no key is known at all.

  • Covered: Open approval and the quick decision buttons in the Approvals list and My approval queue, Open approval in the approval details view, the Work item column and the Work item key column, delegation usages, condition usage history (Open approval and Work item columns).

Decisions

  • The Confluence part of the original report (pop-up sometimes not opening or only flashing, email action lost) and the blank pop-up in Jira QA have no cause found in the current code; they were reported before the Forge migration. If QA still sees them, they get their own ticket with a recording and the browser console log.

Fixes included

  1. Condition usage history builds its Open approval link with the same helper as the approvals lists, so the approval pop-up gets the work item and space of the approval like everywhere else.

  2. Web API v1 (POST /webapi/approvals/{reference}) now stores and returns a Jira approval summary that starts with the work item key, like Web API v2 and every other start path: a custom summary gets the key in front ("Budget" becomes "KP-1 Budget"), an empty one becomes the work item key and title. Approvals stored earlier through v1 are not changed.

Manual tester notes

  • Jira, Approvals list: open the row menu of an approval and click Open approval. The work item opens at /browse/<KEY> and the approval pop-up opens over it.

  • Same with Approve or Reject on a row (quick decision buttons on): the pop-up opens with the decision ready.

  • My approval queue: same checks.

  • Approval details view (View approval details, then the Open approval icon in its header): the work item opens by its key and the pop-up opens.

  • Settings, Conditions, a condition's usage history: the Open approval icon and the Work item link open the work item by its key.

  • Start an approval through Web API v1 with a custom summary: the approvals list shows "KEY summary" and Open approval opens that work item.