fix: Update Knowledge Card usability and save creator ID
Created by: Edouard-Legoupil
This commit addresses follow-up requests for the Knowledge Card feature.
Changes:
-
Save Creator ID for New Items:
- Updated the database schema in
database-setup.sqlto add acreated_bycolumn to thedonors,outcomes, andfield_contextstables. This column is a foreign key to theuserstable. - Verified that the backend endpoints for creating these items correctly populate the
created_bycolumn with the ID of the user who created the item.
- Updated the database schema in
-
Knowledge Card UI/UX Updates:
- Renamed the "Summary" field to "Description" on the knowledge card screen for clarity.
- Separated the single "Populate Card Content" button into two distinct buttons:
- Save Card: This button saves the current state of the knowledge card's metadata (title, description, links) without triggering content generation. When creating a new card, this will now save and then redirect to the edit page for that card.
- Populate Card Content: This button first saves the card and then triggers the backend process to generate the content for the card's sections.
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?