Skip to content

feat: add workflowConnectionId to change proposals status mutation an…#1441

Open
jekabs-karklins wants to merge 1 commit intoSWAP-4949-workflow-overhaulfrom
SWAP-5434-as-a-user-officer-i-want-to-specify-which-actions
Open

feat: add workflowConnectionId to change proposals status mutation an…#1441
jekabs-karklins wants to merge 1 commit intoSWAP-4949-workflow-overhaulfrom
SWAP-5434-as-a-user-officer-i-want-to-specify-which-actions

Conversation

@jekabs-karklins
Copy link
Copy Markdown
Contributor

@jekabs-karklins jekabs-karklins commented Mar 27, 2026

Description

THIS PR IS BUILT ON TOP OF #SWAP-4949-workflow-overhaul

This PR adds the ability for the User Officer to execute status actions when he/she sets the proposal status manually.

Motivation and Context

After the workflow overhaul the status actions are attached to the transition, and not the status. In same cases when setting the proposal status the user officer would want to run the status actions accompanied with the transition leading to that status.

This PR handles three scenarios:

  • If there are no status actions before the chosen state, user can not select anything
  • If there is one incoming transition with status action user can decide to run it.
  • If there are multiple, user can decide if he/she wants to run it and if yes from which transition (see screenshots)
image image

Changes

  • Added workflowConnectionId parameter to the changeProposalsStatus mutation in ProposalMutations.ts, which is used to fetch the proposal workflow and run the status engine.
  • Updated changeProposalsStatus mutation to only run status actions if workflowConnectionId is provided, improving the control over status change side-effects.
  • Updated the related test case in proposals.cy.ts to cover the new functionality.

How Has This Been Tested?

Added e2e

Fixes Jira Issue

https://jira.ess.eu//browse/SWAP-5434

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@jekabs-karklins jekabs-karklins marked this pull request as ready for review March 30, 2026 09:28
@jekabs-karklins jekabs-karklins requested a review from a team as a code owner March 30, 2026 09:28
@jekabs-karklins jekabs-karklins requested review from mutambaraf and removed request for a team March 30, 2026 09:28
const {
workflowStatusId: statusId,
proposalPks,
workflowConnectionId,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it redundant to have both? workflowConnectionId and workflowStatusId?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants