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
Aaron Louie
561e254315
Prevents non-admin users from editing each others' tasks. Fixes bug where test user uid was not being set from token. Moves complete form and get workflow API test utility methods into BaseTest.
2020-06-12 13:46:10 -04:00
Carlos Lopez
e9e805b2c9
Storing emails in database
2020-06-09 22:57:56 -06:00
Dan Funk
fed6e86f92
Trying to fix LDAP issues on production. Changing LDAP to static only methods, caching the connection and calling bind before all connection requests.
...
Also assuring we don't load the documents.xls file over and over again.
2020-06-04 14:59:36 -04:00
Dan Funk
68aeaf1273
BE VERY CAREFUL where you create a new LdapService() - construction is expensive.
...
Adding a few more details to the "csv" endpoint for RRT.
2020-06-04 10:33:17 -04:00
Dan Funk
e102214809
minor cleanup of error codes.
2020-06-03 15:03:22 -04:00
Dan Funk
c7484267e1
For the main approval endpoints - we now group the approvals by study. So you get one record back for each study, but it may have other approvals along with it as "related_approvals".
...
We now cache the LDAP records - so we look in our own database for the record before calling out to ldap for the details when given a straight up computing id like dhf8r.
Added "date_approved" to the approval model.
And moved the approver and primary investigator into real associated models to make it easier to dump.
Fixed a problem with the validation that was causing it to throw incorrect errors on valid workflows. Getting it to behave a little more like the front end behaves, and respecting the read-only fields. But it was mainly to do with always returning all the data with each form submission.
2020-06-02 18:17:00 -04:00
Carlos Lopez
bec11980eb
Fixing broken test by using proper FileSchema
2020-05-31 22:00:52 -06:00
Carlos Lopez
b2e56f797b
Converting ApprovalModel to Approval in order to serialize properly the result
2020-05-31 21:02:47 -06:00
Aaron Louie
f0bd8d4f9e
Adds approvals to study schema. Adds approvals endpoint
2020-05-31 22:46:32 -04:00
Dan Funk
9c7de39b09
This adds additional file data details to the study model as well.
2020-05-31 21:15:40 -04:00
Dan Funk
98fb305868
Run the validation process twice, each time it is requested, first populating everything, and then a second time
...
using on the required form fields.
2020-05-30 18:43:20 -04:00