Skip to content

feat: only show calls that are related to techniques assigned to an instrument scientist#1370

Open
mutambaraf wants to merge 10 commits intodevelopfrom
1518-add-filtering-for-user-technique-calls
Open

feat: only show calls that are related to techniques assigned to an instrument scientist#1370
mutambaraf wants to merge 10 commits intodevelopfrom
1518-add-filtering-for-user-technique-calls

Conversation

@mutambaraf
Copy link
Contributor

@mutambaraf mutambaraf commented Feb 23, 2026

Description

This PR improves the filtering of calls related to techniques assigned to an instrument scientist.
Closes: UserOfficeProject/issue-tracker#1518

Motivation and Context

Currently, the Xpress Management page displays all calls with a QUICK_REVIEW status. This PR introduces changes that allow filtering calls based on assigned techniques. Additionally, the "All" filter has been updated to return only proposals with calls relevant to those filters. This ensures instrument scientists only see proposals related to their specific facility and assigned techniques.

Changes

  • The filter now checks for call IDs in the callIds array in addition to the callId field.
  • This change is implemented in the PostgresProposalDataSource and StfcProposalDataSource classes in the backend, and reflected in the frontend in the ProposalsQuery class and the MenuItems and ProposalMenuListItem components.
  • The callIds field is added to the ProposalsFilter class.
  • The techniqueProposalUrl is now set to /TechniqueProposals instead of being dependent on the openCall.id.

These changes ensure that only the calls related to techniques assigned to the instrument scientist are displayed, improving the relevance of the displayed data for the user.

How Has This Been Tested?

Fixes Jira Issue

https://jira.esss.lu.se/browse/

Depends On

Tests included/Docs Updated?

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

@mutambaraf mutambaraf changed the title feat: Only show calls that are related to techniques assigned to an instrument scientist feat: only show calls that are related to techniques assigned to an instrument scientist Feb 23, 2026
@mutambaraf mutambaraf marked this pull request as ready for review February 25, 2026 12:52
@mutambaraf mutambaraf requested a review from a team as a code owner February 25, 2026 12:52
@mutambaraf mutambaraf requested review from a team, bolmsten and simonfernandes and removed request for a team February 25, 2026 12:52
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want to keep the call.id so that it defaults on the open call of that year

const lastProcessedCallId = useRef<number | null>(null);
useEffect(() => {
if (calls && calls.length > 0 && !searchParams.get('call')) {
const activeCall = calls.find((call) => call.isActive);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ellen-wright .Yes we are still setting it, but I am setting it here inside the table because if I set it higher up, the set ID might technically not be part of the call the user has access to.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am currently dealing with this issue in this PR #1357 so might be worth us trying to coordinate this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will wait for your PR as discussed.

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.

Add call filtering to (Xpress) management page

2 participants