Skip to content

PSP-11171: Invalid values for PRODUCT dropdown when choosing a parent PROJECT#5177

Merged
areyeslo merged 1 commit intobcgov:devfrom
areyeslo:PSP-11171-InvalidValues-ProductDropdown-WithParentProject
Jan 30, 2026
Merged

PSP-11171: Invalid values for PRODUCT dropdown when choosing a parent PROJECT#5177
areyeslo merged 1 commit intobcgov:devfrom
areyeslo:PSP-11171-InvalidValues-ProductDropdown-WithParentProject

Conversation

@areyeslo
Copy link
Collaborator

@areyeslo areyeslo commented Jan 26, 2026

Current Situation:

  • Products returned are only products linked to the specific project, and not linked to any project if they exist.
  • Products NOT returned are those linked to the specific project and also to any other project.
  • Then, in the combobox we see products not associated to projects and products associated the project
image
  • LINQ translates to this query:
SELECT p.*
FROM PIMS_PRODUCT p
LEFT JOIN PIMS_ACQUISITION_FILE paf ON paf.PROJECT_ID  = p.Id
WHERE NOT EXISTS (
    SELECT 1
    FROM PIMS_PROJECT_PRODUCT ppp
    WHERE ppp.PRODUCT_ID = p.Id AND ppp.PROJECT_ID <> @projectId
)
ORDER BY p.Code

Change:

  • Only products linked to a given project ID are returned:
image
  • LINQ translates to this query:
SELECT p.*
FROM PIMS_PRODUCT p
LEFT JOIN PIMS_ACQUISITION_FILE paf ON paf.PROJECT_ID  = p.Id
WHERE EXISTS (
    SELECT 1
    FROM PIMS_PROJECT_PRODUCT ppp
    WHERE ppp.PRODUCT_ID = p.Id AND ppp.PROJECT_ID = @projectId
)
ORDER BY p.Code

Story

@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5177

@areyeslo areyeslo marked this pull request as ready for review January 27, 2026 23:37
@areyeslo areyeslo self-assigned this Jan 28, 2026
@areyeslo areyeslo added the bug Something isn't working label Jan 28, 2026
@areyeslo areyeslo added this pull request to the merge queue Jan 30, 2026
Merged via the queue into bcgov:dev with commit f9c6237 Jan 30, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants