Commit Graph

91 Commits

Author SHA1 Message Date
Dan Funk 34759a2f3d
Merge branch 'dev' into feature/performance-refactor 2021-05-04 11:30:13 -04:00
Dan Funk d6054a9846
Merge branch 'dev' into 310-task-event-timezone 2021-05-04 11:21:36 -04:00
Dan Funk 81467d6a8d
Merge pull request #299 from sartography/297-filename-in-documents
Add filename to files listing.
2021-05-04 11:19:59 -04:00
Dan a719cf4bf9 When retrieving the study, only update the status of underlying workflows if specifically requested.
Record the size of a file in the database for quick access (this helps with a frontend refactor, so it isn't downloading the file just to see it's size)
Cleaning up the timing/performance metric reporting to make it easier to read.
Fixing a bug that prevented non-admins for getting the document-directory
2021-04-30 11:55:12 -04:00
Kelly McDonald 2b9cee6b89 Update database to include timezone and change all points where we set the time on an event to be utc time. If we get something in the database with a timezone, it will display properly on the front end, but by default everything will be put in the database in UTC 2021-04-29 10:25:28 -04:00
Kelly McDonald cc77a9182c Add filename to files listing.
Fixes #297
2021-04-28 10:37:14 -04:00
mike cullerton 077b68c1e2 When creating a workflow for a study, set the user_id to None 2021-04-26 08:46:19 -04:00
Kelly McDonald 116bf5e7aa Merge branch 'dev' into 263-optimize-dashboard
# Conflicts:
#	crc/services/study_service.py
2021-03-31 10:20:33 -04:00
Kelly McDonald 60f5be1aef Check in - pending change from @cullerton 2021-03-30 12:10:49 -04:00
Dan ded11ddd82 fixing a code smell 2021-03-26 20:25:34 -04:00
Kelly McDonald f1ca44a0e1 Add primitive cache on the fileservice is_review, halves the time of loading the list on the primary dashboard 2021-03-23 10:17:48 -04:00
mike cullerton a201e49d21 The master workflow now generates a dictionary of dictionaries, rather than a dictionary of strings.
Each entry in status is a dictionary with 'status' and 'message' keys.
We updated the StudyService._update_status_of_workflow_meta method to accommodate the master workflow changes.

Changed the order of some if statements so we move forward while we have good data, and run all the error states at the end.
Added some comments to explain the cascading if statements

We changed the names of private methods to begin with one underscore, so they work in the test environment.
Changed  some internal calls to accommodate the underscore change.
2021-03-22 17:46:39 -04:00
mike cullerton c05b879dd4 We want to modify the master workflow so that it returns both a status, and a message explaining the status for each workflow.
I.e., from status = {'ids_full_submission': 'required',
                              'enter_core_info': 'disabled',
                              ...}
       to     status = {'ids_full_submission': {'status': 'required', 'message': 'required because...'},
                              'enter_core_info': {'status': 'disabled', 'message': 'disabled because...'},
                              ...}

Modified study_service.__update_status_of_workflow_meta to accommodate this change.
2021-03-16 12:09:42 -04:00
Dan 80ff8a6212 Allows us to delete a study even if there are emails, and associated study users connected to that study. 2021-03-09 13:31:26 -05:00
Kelly McDonald 06dedd8a32 Add short_title to study, change update_study task to use kw arguments and add the short_title to the update_study script 2021-03-02 10:03:53 -05:00
Kelly McDonald 0b08a95e25 Add test and make sure that the API endpoint does the right thing when we switch users - checks both associated with access and associated with no access 2021-02-25 12:20:43 -05:00
Kelly McDonald f3414e22c1 use the associated table to grant access to users who have been designated to have access to the study, not just the study owner. 2021-02-25 11:08:06 -05:00
Kelly McDonald f592a8a0b0 Added a few more tests - I think I need to test one more script endpoint 2021-02-25 09:07:46 -05:00
Kelly McDonald 9bd3aa8dcb service and scripts with working test - still needs a few more tests to try out, but should work to get Mike going 2021-02-24 12:55:23 -05:00
Kelly McDonald c795dd7aea Merge branch 'dev' into 206-extend-study-access 2021-02-24 12:16:35 -05:00
Kelly McDonald 3dbe39c6fe initial checkin of changes for branch 2021-02-24 12:05:06 -05:00
Dan Funk 349c3d657a
Merge branch 'dev' into 201-changes-to-in-progress 2021-02-22 18:17:59 -05:00
Kelly McDonald e54a6956df Make a change in the case that we have no task_events at all. 2021-02-16 11:10:40 -05:00
Kelly McDonald 003bf2f9b9 Remove Approvals per ticket 183 2021-02-16 09:05:29 -05:00
Kelly McDonald 3b1dc70558 Add comment for later ticket 2021-02-16 08:44:41 -05:00
Kelly McDonald da0af14724 Changes to enable front-end changes
Added a human readable name to created user

added last updated task time and name,

added is_review on the workflow which is triggered by a swimlane with a name present.

Notably - it does NOT update or change any of the performance concerns that we were having with this.
2021-02-10 11:58:19 -05:00
Dan Funk d4c5e297cc Merge remote-tracking branch 'origin/dev' into fix/delete_workflow_endpoint 2020-08-17 15:09:11 -04:00
Dan Funk c09441d019 Merge branch 'dev' into fix/delete_workflow_endpoint 2020-08-17 15:07:58 -04:00
Dan Funk 85ad477b2b Some minor cleanup on the study status and automatic events. I wanted to avoid having one database model automatically generating other database models as a side effect. The study service now has full responsiblity to recording study events.
To help in running tests, adding __init__.py methods to all the test directories.
2020-08-17 14:56:00 -04:00
Carlos Lopez 369fe4bb35 Automatic events refactoring 2020-08-14 08:36:46 -06:00
Aaron Louie 9a31d591ae Adds user uid and cascades study event in study model. Fixes migration to properly downgrade enums. 2020-08-12 10:13:23 -04:00
Carlos Lopez 79c14ad23c Unlinking file from workflow instead of trying to delete it 2020-08-10 22:23:20 -06:00
Dan Funk 3cfcd74a6a Just finding a few more edge cases, all tests should pass now. 2020-08-10 15:16:53 -04:00
Dan Funk b53d033400 Cleaning up the delete workflow method in study service so we don't try to delete the same thing more than once) 2020-08-10 14:56:33 -04:00
Dan Funk 56b161a234 Fixing the failing tests by passing in workflow.id rather than workflow to the delete workflow endpoint 2020-08-10 13:51:05 -04:00
Carlos Lopez d3462d2e15 Deleting all dependencies for a workflow 2020-08-10 07:42:56 -06:00
Carlos Lopez a561a5cddc Adjusting study events attribute 2020-08-08 18:25:01 -06:00
Aaron Louie 2846bf9451 Fleshes out fake PB response, so workflows that pull from PB actually trigger validation errors 2020-08-04 15:50:29 -04:00
Carlos Lopez 5d23223e51 New study status update 2020-07-30 21:03:11 -06:00
Dan Funk 0ea4c13d09 Convert protocol builder status to always be in lower case in order to better match the front end. And also fixing an issue with the multi_instance that is oddly broken suddenly, and I don't know why. 2020-07-28 17:16:48 -04:00
Dan Funk 300026cbc8 Expanding the task events endpoint to accept workflow and study ids as additional filters.
Removing events from the study endpoint, too noisy.
2020-07-28 10:16:48 -04:00
Dan Funk 0cb480801b Provide event data on the Study api endpoint.
Speed up the tests a little, because that got out of hand.  Need to dig into what is causing this problem.
2020-07-27 17:05:01 -04:00
Dan Funk d85ca1ce51 Whenever a workflow is loaded or updated, add events to the TaskEvent table with assignments for the next set of ready tasks, along with who should complete those tasks.
Add the lane information to the Task model.
Drop the foreign key constraint on the user_uid in the task log, as we might create tasks for users before they ever log into the system.
Add a new endpoint to the API called task events.  It should be possible to query this and get a list of all tasks that need a users attention.
The task events returned include detailed information about the workflow and study as sub-models
Rename all the actions in event log to things that are easier to pass over the api as arguments, make this backwards compatible, updating existing names in the database via the migration.
Throughly test the navigation and task details as control of the workflow is passed between two lanes.
2020-07-14 22:16:44 -04:00
Dan Funk 6a79fb3581 There may be multiple investigators of the same type that come back from the protocol builder, adding some tests and additional code to handle this, but still keep the list flat, currently appends a number to the investigator type when there is more than one. 2020-07-07 17:16:33 -04:00
Dan Funk bb4000ff6d Don't attept to load up the workflows for abandoned studies. 2020-07-06 16:01:43 -04:00
Dan Funk 419c05e46c
Merge branch 'dev' into fix/more-info-in-exceptions 2020-07-06 12:51:24 -04:00
Dan Funk a5cef8775e * Modifying the StudyInfo script to return both "investigators" and "roles", the investigators argument will return only the current active investigators according to the protocol builder. The "roles" argument returns all possible roles - it is what "investigators" use to be.
* The Task.title returned to the front end will now attempt to process the "display_name" property for dot-notation syntax, making it possible to use this for multi-instance tasks,
  but will work in all cases where we want he title to change based on values in the data model.
* Fixing a bug the test_study_api where it wasn't updated when we made recent changes to the different states of a study.
*
2020-07-06 12:09:21 -04:00
Carlos Lopez 817333f26e Adding proper exception information 2020-07-02 16:10:33 -06:00
Carlos Lopez e947f40ec7 Merge branch 'rrt/dev' into feature/emails-enhancement 2020-06-17 20:10:11 -06:00
Dan Funk eec4b579a7 Don't error out if we don't have a valid study id when doing validation. 2020-06-15 11:27:28 -04:00