Support filtering approvals scheduled for upcoming steps
Description
Problem
The steps filter on the approvals list can show who is deciding now ("Awaiting decision"), who decided, and who started an approval. Nobody can see which approvals will reach a person, group or email at a later step. Approvers cannot plan ahead, and leads cannot see what is coming to a team.
Change
-
New step status "Upcoming decision" in the steps filter (chip: "Upcoming decisions by user / group / email / work item field ..."). It works with every step type: Any, User, Group, Email, Work item field (Jira).
-
An approval matches when it is in progress (not archived, not outdated) and has a step not reached yet that names the chosen approver. Any later step counts, not only the next one. Steps that only notify are not counted.
-
Step type Any with a user also matches later Group steps of the user's groups, Vote steps of the user's voting groups, and groups built from a user-picker field that list the user.
-
Available wherever the steps filter is: Approvals (global, project / space, My approvals, work item / page tab, JSM portal for agents) and the dashboard gadget's filters. Not in Activity, which lists decisions already taken.
-
New dashboard gadget preset in "My work": "Approvals coming my way", a table of in-progress approvals that reach the viewing user at a later step, soonest decision deadline first.
Fixes included
-
The Work item field filter missed field steps set to read the field when the step starts. "Approvals containing work item field X" did not list approvals whose step for that field had not started yet. Such steps now match.
-
A step waiting for an empty work item field is stored under the approval's creator (or the last person removed from the field). User filters treated that person as the approver, for example "Awaiting decision by" the creator. These steps no longer match a user; the work item field filter still finds them.
-
Step type Any with a user matched Group steps the user is excluded from (for example "exclude the approval creator"), and missed groups built from a user-picker field. Both are now matched as the app assigns decisions, excluded users never match, also when a field update put them back on the group's member list. This applies to every step status, in the admin views and in My approvals.
-
"Awaiting decision" by a specific User, Group, Email or Work item field listed approvals that are no longer running (cancelled after the decision deadline, rejected, archived, outdated) when their step was left open. They now need an in-progress approval, like "Awaiting decision" with step type Any already did.
-
In My approvals, only the first filter with step type Any for yourself decides which approvals are yours. Every other filter with step type Any, for another person ("Approved by Anna") or a second one for yourself ("Awaiting decision" plus "Upcoming decision" for you), ignored the person and matched every approval with a step in that state. It now matches that person's steps, as in the admin views.
Out of scope
-
JQL: there is no upcoming-approver field on the work item property.
-
Who acts for an approver on holiday is decided when the step starts. Upcoming matches the approver named on the step; My approvals also counts current delegations, as it does for every status.
-
A work item field set to be read when the step starts has no approver until then. Upcoming by user, group or email cannot find it; upcoming by work item field can.
-
Vote moderators: as before, step type Any matches voters through the voting group, not the moderator (admin views).
Acceptance criteria
-
With a definition of two User steps (A, then B) and a started approval, "Upcoming decision" + User + B lists the approval; + User + A does not; "Awaiting decision" + User + A does.
-
"Upcoming decision" + Group, + Email and + Work item field list approvals whose not-yet-reached step names that group, email or field, including a field step set to be read when the step starts.
-
"Upcoming decision" + Any + a user lists approvals with a later User step for the user, or a later Group / Vote step of one of the user's groups, but not a Group step the user is excluded from.
-
A step that only notifies the user does not make the approval upcoming for them.
-
After the approval is rejected, runs past its decision deadline, is archived or outdated, it is no longer listed by "Upcoming decision" or by "Awaiting decision" for any step type.
-
Activity does not offer "Upcoming decision".
-
The "Approvals coming my way" preset shows the viewer's upcoming approvals.
-
Fixes 1-5 behave as described; other filters return the same results as before.
Manual tester notes
-
Upcoming by Any + user in the admin views reads the user's groups from Jira / Confluence (cached for 60 s): add the user to a group used by a later step and check the approval appears within a minute.
-
Exclusion: definition with a Group step that excludes the approval creator, creator in the group; "Upcoming decision" + Any + creator must not list it.
-
Field steps: Jira definition with a user-picker field step read "when the step starts" as step 2; "Upcoming decision" + Work item field lists it, + User with the field's user does not (expected, see Out of scope).
-
My approvals as a non-admin: "Upcoming decision" + Any + yourself, and the same with a colleague (fix 5), in Jira and Confluence.
-
JSM portal as an agent: the new status is offered and filters; customers still see no steps filter.
-
Gadget: add "Approvals coming my way" to a dashboard as a user who is on a later step of an approval; the table lists that approval and not the ones waiting on the user now.
-
Saved filters with "Upcoming decision" survive a reload and reapply the same results.