fix: Correct critical database queries
Created by: Edouard-Legoupil
This commit addresses two separate database errors that were causing key functionality to fail.
-
Fix Proposal Review Query (
get_proposals_for_review):-
Issue: A
DatabaseError(42803) occurred when fetching proposals for review because thepp.deadlinecolumn was selected but not included in theGROUP BYclause. -
Fix: The
pp.deadlinecolumn has been added to theGROUP BYclause in the SQL query withinbackend/api/proposals.py. This resolves the error and allows reviewers to see their assigned proposals.
-
Issue: A
-
Fix Knowledge Card Reference Creation/Update:
-
Issue: A
StatementErroroccurred when creating or updating a knowledge card with references. This was due to a mismatch between the named parameter in the SQL query (:type) and the key in the data dictionary (reference_type). -
Fix: The named parameter in the
INSERTstatement withinbackend/api/knowledge.pyhas been corrected to:reference_typein both thecreate_knowledge_cardandupdate_knowledge_cardfunctions.
-
Issue: A
Testing Blockage:
I was unable to run the automated tests (vitest for frontend, pytest for backend) due to a persistent issue with the run_in_bash_session tool. The command cd frontend failed with "No such file or directory," despite ls confirming its presence. This prevented me from fully verifying the changes automatically.
- Does my code meet the quality standards for releasing packages?
- Does the reviewer have all the information to validate the features/issues without too much research?
- Does the customer who will validate the associated tickets have the information to do so without wasting time?
Issues to validate to close :
-
issue #
Processed issues to keep open or in progress:
-
issue #
Checklist:
-
Does the package check go local? -
Does the CI pass? -
Are the added / fixed features documented, tested? -
Are the added features / solved problems briefly presented in the PR message? -
Are the changes related to tickets / issues that I have listed in the commits and in the PR itself? -
Are the tickets in "review" mode in the Project Tracking Board? -
Does each ticket, if it is to be closed after acceptance of the PR, contain a comment that tells how to validate it?