Skip to content

fix: call order is not persistent for user officers#1294

Merged
ellen-wright merged 14 commits intodevelopfrom
1473-fix-call-ordering-persistence-bug
Feb 13, 2026
Merged

fix: call order is not persistent for user officers#1294
ellen-wright merged 14 commits intodevelopfrom
1473-fix-call-ordering-persistence-bug

Conversation

@ellen-wright
Copy link
Copy Markdown
Contributor

@ellen-wright ellen-wright commented Dec 16, 2025

Description

refs: UserOfficeProject/issue-tracker#1473
Fixes the bug where the order selected by User Officers for the calls is not persistent when they close the order editor and reopen.

When the calls are required to be ordered the ordering is done in the backend.
A ordered flag is added to calls filter.

Motivation and Context

This was a bug

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

@ellen-wright ellen-wright requested a review from a team as a code owner December 16, 2025 11:11
@ellen-wright ellen-wright requested review from William-Edwards-STFC and deepaksftc and removed request for a team and William-Edwards-STFC December 16, 2025 11:11
@ellen-wright ellen-wright marked this pull request as draft December 16, 2025 12:47
@ellen-wright ellen-wright marked this pull request as ready for review December 17, 2025 13:15
);
setCalls(callsWithUpdatedOrder);
setCalls(
callsWithUpdatedOrder.sort((a, b) =>
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.

question: do you know why callsWithUpdatedOrder is already not in the right order and need to be sorted again?

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.

I mean do we even need to call

const callsWithUpdatedOrder = reorder(
      calls,
      result.source.index,
      result.destination.index
    );

@ellen-wright ellen-wright marked this pull request as draft January 15, 2026 11:22
@ellen-wright ellen-wright marked this pull request as ready for review February 13, 2026 10:47
Comment thread apps/backend/src/resolvers/queries/CallsQuery.ts
Copy link
Copy Markdown
Contributor

@jekabs-karklins jekabs-karklins left a comment

Choose a reason for hiding this comment

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

Just one more suggestion I just noticed WDYT. Otherwise looks good!

Comment thread apps/frontend/src/components/proposal/ProposalChooseCall.tsx Outdated
Copy link
Copy Markdown
Contributor

@Scott-James-Hurley Scott-James-Hurley left a comment

Choose a reason for hiding this comment

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

Maybe a couple of e2e tests should be added to check if the order is persisted on the call ordering and when creating a new proposals?

@ellen-wright ellen-wright merged commit ad371da into develop Feb 13, 2026
22 checks passed
@ellen-wright ellen-wright deleted the 1473-fix-call-ordering-persistence-bug branch February 13, 2026 17:36
yoganandaness pushed a commit that referenced this pull request Feb 20, 2026
Co-authored-by: Farai Mutambara <71100224+mutambaraf@users.noreply.github.com>
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.

4 participants