-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loris integration phase 2 pull develop da6e8cba73b4da8465224c85125b119ec15cbd62 #1630
Merged
david-montano-metalab
merged 46 commits into
loris-integration-phase-2
from
loris-integration-phase-2-pull-develop-da6e8cba73b4da8465224c85125b119ec15cbd62
Oct 18, 2024
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ipant (M2-6223) (#1565) This PR adds a new endpoint `/activities/applet/{applet_id}/subject/{subject_id}`, which allows the caller to fetch an object containing the list of activities and activity flows that have been assigned to the subject specified by `subject_id` in some way. Each activity or flow will have a non-nullable array property called `assignments` containing the list of assignments of that activity/flow where the given subject is the **respondent**. It is yet undecided at a product level whether auto assigned activities/flows can be manually assigned, but the API currently allows this. Thus, it is possible for the data returned from this endpoint to contain an activity/flow with both `autoAssign` set to `true`, and a non-empty `assignments` property. The caller of the endpoint must be authenticated as a user with one of the following user roles: - Owner - Manager - Coordinator - Reviewer (with access to the subject)
This pull request introduces the unassign endpoint for activity assignments. The unassign functionality allows authorized users to mark assignments as deleted. It ensures that previously assigned activities or flows can be unassigned, effectively updating the database to reflect the unassignment. * feature: Completed unassign endpoint using the same json structure of the assign assignments endpoint request. Implemented get_assignments_by_activity_or_flow_id_and_subject_id to retrieve assignment_id using activity_id and subject_id. Crated unassign_many to update multiple schemas at a time using the _update CRUD base function * Calling assignment endpoint and then unassign to test functionality * Created tests for unassign feature * Recover applet_assignments function and completed unassign_many function * Typing consistency for delete requests and Optional types on unassign feature * Update src/apps/activity_assignments/router.py Co-authored-by: Farmer Paul <[email protected]> --------- Co-authored-by: Farmer Paul <[email protected]>
Release/1.5.11
Merge main back into dev
…ID (M2-6223) (#1592) * fix: match by both respondent & target subject Assignments being returned by this endpoint were only matching by respondent subject, but the AC for M2-6223 states to return assignments matching both by respondent & target subject. So adjusted the function to match by one of those, or both, based on the `match_by` parameter. Fixed tests to test this condition as well. * fix: remove redundant CRUD function The `check_for_assignment_and_notify` function was using a CRUD function `get_by_respondent_subject_id` to return assignments matching a given respondent subject, which did not perform soft-delete integrity checks. The same functionality exists in `get_by_applet_and_subject` but with soft-delete integrity checks, so removed the old function in favour of this one. * refactor: use `Filters` class, simplify code On @rcmerlo's recommendation, switched to using `QueryParams` and `Filters` class for filtering assignments queries by respondent or target subject. In doing so, discovered that `get_by_applet_and_subject` was not in fact needed; all the functionality is now provided by `get_by_applet`.
* Created new startup script * testing env * feature env version * feature start manifest
* feat: adding unity type * change to fix odd validation behavior on item responses * refactor unityFile to unity * ruff formatting * ruff linting import order change * Adding unity tests * ruff format * test name fix * re-adding wrongly removed test * moving unity file file to config --------- Co-authored-by: Ramir Mesquita <[email protected]>
* Update CORS ALLOW ORIGIN env variables to match any localhost pattern. Update MAILING__MAIL__SERVER to 'mailhog'. * Update README with steps related to running API locally. * Additional notes * spelling
…2-7919) (#1611) This PR creates the new endpoint `/subjects/respondent/{respondent_subject_id}/activity-or-flow/{activity_or_flow_id}`, which returns a list of subjects based on an association with the respondent subject and activity/flow specified. The endpoint is accessible by users with the following applet roles: - Owner - Manager - Coordinator - Reviewer (who is assigned the `respondent_subject_id` subject) Each subject in the list returned will be the target subject of at least one: - Assignment where `respondent_subject_id` is the respondent subject (including auto-assigned activities/flows) - Submission where `respondent_subject_id` is the source subject In addition to the usual `SubjectReadResponse` properties, there are two extra ones that I'd like to highlight: - `submissionCount`: This is the number of answers that the respondent has submitted for a given subject and activity/flow - `currentlyAssigned`: Whether the activity/flow is currently assigned for the respondent to complete about a given subject Activities/flows that have been unassigned and don't have any submissions aren't included
…or target (M2-7853) (#1614) This PR creates the new endpoint `GET /activities/applet/{applet_id}/target/{subject_id}`, which returns a list of activities and flows that are associated with the specified target subject within the applet. The endpoint is accessible by users with the following applet roles: - Owner - Manager - Coordinator - Reviewer (who is assigned the target subject) Each activity/flow in the list will be returned based on one of the following conditions - The activity/flow is set to auto assign - The activity/flow is manually assigned to some respondent, with the specified target subject as its target - Answers have been submitted at some point in the past for the activity/flow with the specified target subject as the target The return type is `ActivityOrFlowWithAssignmentsPublic` --------- Co-authored-by: Rodrigo Merlo <[email protected]>
…date [M2-7838] Add passed tests to the slack output steps
…ondent-entities feat: Add endpoint to get activities/flows assigned to or submitted for respondent (M2-7854)
* feature(conditionalLogic): Accept new activity items * wip(conditionalLogic): DateItem support * wip(conditionalLogic): time and timerange added * wip(conditionalLogic) Fix validation errors for time an date * wip(sliderRow): Add slider row validation * wip(conditionalLogic) Remove type from tume renge * wip(conditionalLogic): allow all activity items types * wip(conditionalLogic): Split score and reports and conditionalLogic * wip(conditionalLogic): Add special public model * wip(conditionalLogic): Change index type * wip(conditionalLogic): Change option based items validation * feature/new_items_types * chore/fixing code quality * chore/fixing singleTimePayload, minMaxTimePayload, activity_item_change on code quality and fixing date test on test_custom_validation * chore/cleaning test_custom_validation comment * chore/ruff format condition.py and test_custom_validation --------- Co-authored-by: ivan koryshkin <[email protected]> Co-authored-by: iwankrshkin <[email protected]> Co-authored-by: Felipe Imperio <[email protected]>
…7830) (#1623) This PR updates the applet duplication endpoint to optionally include an optional `include_report_server` property that defaults to false (making it backwards compatible). The following properties are duplicated: - `reportServerIp` - `reportPublicKey` - `reportIncludeUserId` - `reportIncludeCaseId` - `reportEmailBody`
* chore: add language assertion to invitation tests * fix: tom's fixture function return type * chore: rename mailing service html template getter * fix: shell account re-invite unit test * chore: parameterize invitation unit tests * chore: fix html email template formatting * feat: implement fallback to English for localized email templates * feat: add placeholder templates for greek emails * fix: lints * fix: some typing errors in invitation unit tests * chore: replace placeholder with actual greek translations * chore: rename parameter names for email template function * chore: add tests for assignment email language --------- Co-authored-by: Billie He <[email protected]>
* chore: Update python version to 3.11 * chore: Getting away from passlib and using bcrypt directly * chore: Moving from python-jose lib to pyJWT * fix: Rebase and fix pipfile.lock
…6e8cba73b4da8465224c85125b119ec15cbd62
➡️ Preview environment failed to be destroyed |
❌ E2E tests failed |
…#1616) * Changes Score class allowing two new arguments: scoring_type and sucale_name and verifies that data is saved into the DataBase, then retriving it when create_report is executed. * Fixed issues with SinglePayload class and adjusted tests accordingly.
…6e8cba73b4da8465224c85125b119ec15cbd62
ChaconC
approved these changes
Oct 18, 2024
david-montano-metalab
merged commit Oct 18, 2024
a74bd23
into
loris-integration-phase-2
14 of 17 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
🔗 Jira Ticket M2-7488
Changes include: