504 Commits

Author SHA1 Message Date
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
bbcbfef1ba Fixing the migrations so I don't break the universe. 2020-06-04 10:09:36 -04:00
Dan Funk
1324533865 Some additional cleanup - when a file is "archived" it is no longer returned for any endpoints about files, but it
is directly accessible via id, in the event some request is made for it at a later date.
2020-06-04 09:49:42 -04:00
Carlos Lopez
f581bd9f2b Mails for approval process 2020-06-04 00:35:59 -06:00
Dan Funk
217ecfc911 When you can't delete a file, mark it as archived. Don't include archived files in new approval requests. 2020-06-03 17:34:27 -04:00
Dan Funk
c179c7781b Do not process or return cancelled approvals via the API. 2020-06-03 16:50:47 -04:00
Dan Funk
e102214809 minor cleanup of error codes. 2020-06-03 15:03:22 -04:00
Dan Funk
299ad4fc8b Adding more details to the csv output, and assuring we don't miss people with outstanding approvals that were cancelled. 2020-06-03 07:58:48 -04:00
Dan Funk
4bf13b0718 Doing everything I can imagine to get a CSV dump out tomorrow. 2020-06-02 22:01:49 -04:00
Dan Funk
2424b9d78c Don't overwrite the approval, just allow minor changes. 2020-06-02 19:36:06 -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
Dan Funk
59e91ec414 Don't add an empty approval record. 2020-06-02 08:35:19 -04:00
Dan Funk
d8329e9eff I completely missed pushing up my changes last night before handing back over to Carlos. Sorry about that.
Added checks to assure the approver matches g.uid of the current user - otherwise don't modify the approval record.
2020-06-02 07:43:19 -04:00
Dan Funk
4090667a5d Missed committing a pile of changes last night. 2020-06-02 07:08:29 -04:00
Dan Funk
a78db8834c
Merge pull request #99 from sartography/feature/sentry
Enabling Sentry for boxes with the flag set
2020-06-02 06:28:06 -04:00
Dan Funk
d0918e9ed3
Merge pull request #98 from sartography/fix/approvals-info
Approval info addition
2020-06-02 06:26:56 -04:00
Carlos Lopez
95a3b22bf0 Enabling Sentry for boxes with the flag set 2020-06-01 19:59:55 -06:00
Dan Funk
c2a1b0175a Tweaks to approvals 2020-06-01 21:49:30 -04:00
Dan Funk
1db9401166 Don't put all the data into Spiff Tasks on a reload or backtrack, just store the data that gets submitted each time in the task log, and use that.
This should correct issues with parallel tasks and other complex areas - so we don't have tasks seeing data that isn't along their path.
2020-06-01 17:42:39 -04:00
Carlos Lopez
3c2849f40d Approval info addition 2020-06-01 15:29:59 -06:00
Aaron Louie
51accc350c Updates doc template 2020-06-01 13:37:44 -04:00
Aaron Louie
885ce5668e Updates RRT workflow spec files 2020-06-01 13:29:57 -04:00
Dan Funk
c790737bf0 The complete_template script might not grab the correct document when validating, fixed.
Updated to latest RRT files, and passing.
2020-06-01 12:33:58 -04:00
Dan Funk
b6bf843f6e used 'name' rather than 'value' in the lookup options during validation, causing a disconnect with how this is processed on the front end. 2020-06-01 11:00:56 -04:00
Aaron Louie
7c8b7829ea Merge branch 'rrt/dev' into feature/approvals_enhancements 2020-06-01 00:41:51 -04:00
Aaron Louie
1702ab2576 Fixes decision tables that were causing failing tests 2020-06-01 00:36:25 -04:00
Aaron Louie
ea441dbff5 More updates 2020-06-01 00:28:37 -04:00
Aaron Louie
8092bbe682 Wrong file in wrong place. 2020-06-01 00:17:20 -04:00
Aaron Louie
7351dc4a43 Updates RRT workflow spec files for reals this time 2020-06-01 00:14:09 -04:00
Aaron Louie
2d5eb740ef Updates RRTworkflow spec files 2020-06-01 00:07:50 -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
cd16b984e0 Adds workflow spec title to workflow api schema 2020-05-31 22:46:56 -04: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
Carlos Lopez
dd6c1d2b42 Renaming approval files 2020-05-31 18:16:42 -06:00
Carlos Lopez
2e54f07095 Adding more info to files and renaming approval waiting status 2020-05-31 17:24:23 -06:00
Aaron Louie
c4a84ac509 Work in progress: Trying to get Swagger to use verify_token_admin to protect admin endpoints. Not working for some reason, though. 2020-05-31 18:01:08 -04:00
Aaron Louie
be9b613bbb Refactors user authentication endpoints so we can use the Swagger UI in production mode 2020-05-31 16:49:39 -04:00
Carlos Lopez
26809d1470 Waiting status renaming 2020-05-31 13:35:42 -06:00
Dan Funk
2bc735a3f0 Kelly wrote a beautiful method for resetting the workflow that doesn't loose data when reset inside a parallel task, all I needed to do was use it.
Catching TypeErrors and reporting them back to the UI so we don't 500 in a bad way (but we still 500)
2020-05-31 13:48:00 -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
Dan Funk
1f0e8741ba Run the validation twice, once completing all of the data, and a second time, completing only the required fields.
Also, add a helper method to reduce boiler plate code around Workflow Exceptions.
2020-05-30 17:26:27 -04:00
Dan Funk
860c475b29 Fill out repeating sections during validation process.
Also, when returning error messages, attempt to include the task data for the task that caused the error.
Also, when attempting to delete any file, respond with an API error explaining the issue, and log the details.
2020-05-30 15:37:04 -04:00
Dan Funk
d51fbe51e0 Merge branch 'dev' of github.com:sartography/cr-connect-workflow into dev 2020-05-29 15:18:41 -04:00
Dan Funk
4e4cc7884c Better ldap searching. 2020-05-29 15:17:51 -04:00
Aaron Louie
34b812b74e Updates RRT workflow spec files 2020-05-29 10:49:47 -04:00
Dan Funk
895d2f8852 Slight change to the way the approval model is connected. 2020-05-29 05:04:18 -04:00
Dan Funk
0ba2819867 Merge branch 'dev' into feature/approval_request_script 2020-05-29 04:51:50 -04:00
Dan Funk
afb6be7c60 re-working the way the redirects function, so we pass arguments as a get parameter. Just trying to get rid of the weird lag on production.
I noticed the validation sometimes looks ahead for files, so looking at all the tasks now, not just the ready tasks for the lookup field.
Ran into an issue with validation where a workflow model was required, so I create one and delete it.  Another refactor for another day.
2020-05-29 04:42:48 -04:00