Commit Graph

683 Commits

Author SHA1 Message Date
Aaron Louie 610706d110 Merge branch 'dev' into rrt/production 2020-05-29 10:06:31 -04:00
Aaron Louie 7f2c1eb8e1 Updates Pipfile hashes 2020-05-29 10:06:11 -04:00
Aaron Louie db9b1a4491 Merge branch 'dev' into rrt/production 2020-05-29 09:18:51 -04:00
Dan Funk 09fb8ef2a9
Merge pull request #79 from sartography/feature/approval_request_script
Feature/approval request script
2020-05-29 05:05:36 -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 90d2931f6e
Merge pull request #81 from sartography/feature/file_refactor_part2
Feature/file refactor part2
2020-05-29 04:44:09 -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
Dan Funk 11413838a7 Faster lookup fields. We were parsing the spec each time to get details about how to search. We're just grabbing the workflow id and task id now and building that straight into the full text search index for faster lookups. Should be peppy.
Another speed improvement - data in the FileDataModel is deferred, and not queried until it is specifically used, as the new data structures need to use this model frequently.
2020-05-29 01:39:39 -04:00
Dan Funk 22bdb6c760 This migration will clear out any approvals in the database. 2020-05-28 20:13:33 -04:00
Dan Funk aea78de066 Merge remote-tracking branch 'origin/dev' into feature/file_refactor_part2 2020-05-28 20:06:32 -04:00
Dan Funk dba41f4759 Ludicrously stupid launch in a refactor of the way all files work in the system at a time where I crave sleep and peace above all other things.
Added a File class, that we wrap around the FileModel so the api endpoints don't change, but File no longer holds refences to versions or dates of the file_data model, we
figure this out based on a clean database structure.

The ApprovalFile is directly related to the file_data_model - so no chance that a reviewer would review the incorrect version of a file.py

Noticed that our FileType enum called "bpmn" "bpmm", hope this doesn't screw someone up.

Workflows are directly related to the data_models that create the workflow spec it needs.  So the files should always be there.  There are no more hashes, and thus no more hash errors where it can't find the files to rebuild the workflow.py

Not much to report here, other than I broke every single test in the system at one point.  So I'm super concerned about this, and will be testing it a lot before creating the pull request.
2020-05-28 20:03:50 -04:00
Aaron Louie 91dca030f6 Merge branch 'dev' into rrt/production 2020-05-28 10:43:14 -04:00
Aaron Louie dedec02d48 Updates RRT workflow spec files 2020-05-28 10:43:03 -04:00
Dan Funk 8f41dfa95f forgot the migration. 2020-05-28 10:31:20 -04:00
Carlos Lopez 41b26e28bd Merge branch 'dev' into feature/approval_request_script 2020-05-28 08:11:31 -06:00
Dan Funk cd7f67ab48 A major refactor of how we search and store files, as there was a lot of confusing bits in here.
From an API point of view you can do the following (and only the following)

/files?workflow_spec_id=x
* You can find all files associated with a workflow_spec_id, and add a file with a workflow_spec_id
/files?workflow_id=x
* You can find all files associated with a workflow_id, and add a file that is directly associated with the workflow
/files?workflow_id=x&form_field_key=y
* You can find all files associated with a form element on a running workflow, and add a new file.
   Note: you can add multiple files to the same form_field_key, IF they have different file names. If the same name, the original file is archived,
   and the new file takes its place.

The study endpoints always return a list of the file metadata associated with the study.  Removed /studies-files, but there is an
endpoint called

/studies/all  - that returns all the studies in the system, and does include their files.

On a deeper level:
 The File model no longer contains:
  - study_id,
  - task_id,
  - form_field_key

Instead, if the file is associated with workflow - then that is the one way it is connected to the study, and we use this relationship to find files for a study.
A file is never associated with a task_id, as these change when the workflow is reloaded.
The form_field_key must match the irb_doc_code, so when requesting files for a form field, we just look up the irb_doc_code.
2020-05-28 08:27:26 -04:00
Aaron Louie 94b6147768 Merge branch 'dev' into rrt/production 2020-05-27 23:49:47 -04:00
Aaron Louie 97cdbfce94 Deletes extra line break 2020-05-27 23:48:48 -04:00
Dan Funk 560263d1a3 Missed another test. 2020-05-27 14:45:00 -04:00
Dan Funk c9f94d9717 Merge branch 'dev' of github.com:sartography/cr-connect-workflow into dev 2020-05-27 14:41:11 -04:00
Dan Funk 77f72e408f Lookup Service now raises exact matches to the top. Very hackish, but it works. 2020-05-27 14:36:10 -04:00
Carlos Lopez 54640988a7 Update endpoint fixes 2020-05-27 12:06:32 -06:00
Aaron Louie 98efa0475a Merge branch 'dev' into rrt/production 2020-05-27 12:59:04 -04:00
Aaron Louie 6eaa6ac158 Adds option to load RRT example data 2020-05-27 12:58:50 -04:00
Aaron Louie 7721b9f83f Merge branch 'dev' into rrt/production 2020-05-27 10:07:04 -04:00
Dan Funk 1d52a0214a Merge branch 'master' into dev 2020-05-27 09:56:47 -04:00
Dan Funk 229b5d5ece Forgot to add the test fixes. 2020-05-27 09:55:46 -04:00
Dan Funk 1c60008c7e Merge branch 'dev' of github.com:sartography/cr-connect-workflow into dev 2020-05-27 09:48:33 -04:00
Dan Funk d5e075db82 Order search results by relevancy in the lookup service. 2020-05-27 09:47:44 -04:00
Aaron Louie 0f04b1dd79 Forces PB_ENABLED to be a boolean, because environment variables always come through as a string 2020-05-27 08:35:04 -04:00
Dan Funk 397cb23b52 Is true "true", yes it is true. So true, is "false", so true, it is true. 2020-05-26 23:38:57 -04:00
Dan Funk 0025931a2e Trying hard to figure out why the DCOS servers think the protocol builder is enabled. 2020-05-26 23:18:14 -04:00
Dan Funk 7869fa596e Protocol Builder isn't disabled on the dcos servers, trying to figure out why, and assure it isn't some sort of weird race condition. 2020-05-26 22:42:49 -04:00
Dan Funk eb15d172c1 I absolutely must fix our cascade deletes, but I sort of like the horror such chunks of code cause, we really need to protect these endpoints, and assure they never get called under normal circumstances, and raise some thoughtful errors. 2020-05-26 21:18:09 -04:00
Aaron Louie 0e973b988a Merge branch 'dev' into rrt/production 2020-05-26 21:03:56 -04:00
Dan Funk ccbf374b40 Loads of bug fixes.
Modifed the request_approval to take a list of arguments, which works better for us... today.
UpdateStudy correctly handles validation.
WorkflowService correctly populates random values from lookup tables.
And several fixes down in Spiffworkflow, including a big bug where only the last item in a decision table made it through.
2020-05-26 20:06:50 -04:00
Dan Funk e9645fa3fd Renamed redirect_url to just redirect. 2020-05-26 15:47:41 -04:00
Dan Funk 987790164e use redirect, not redirect_url. 2020-05-26 15:09:57 -04:00
Dan Funk f576c0ecb6
Merge pull request #78 from sartography/feature/approval_request
Feature/approval request
2020-05-26 14:41:12 -04:00
Carlos Lopez 7ed9411c74 Handling unavailability of ldap connection 2020-05-26 11:29:24 -06:00
Carlos Lopez 72b59deeaf Completing tests 2020-05-26 10:21:36 -06:00
Dan Funk eb92ee9fb6 Adding missing migration. 2020-05-25 23:47:40 -04:00
Dan Funk c7fc6649ed oh my goodness it's late, and I hate docker containers sometimes. 2020-05-25 22:52:36 -04:00
Dan Funk 25adf47277 converting integers to ints, cause that's nice. 2020-05-25 22:47:11 -04:00
Dan Funk 0792aa40a5 Can't override travis settings if you do it with the testing file. 2020-05-25 22:28:33 -04:00
Dan Funk cbaedad0f6 have testing respect the environment variables if they are set, so we can set them in travis, and use the testing environment there. 2020-05-25 22:02:06 -04:00
Dan Funk a14168362a Merge branch 'feature/support_ui_dashboard' into dev 2020-05-25 21:31:16 -04:00
Carlos Lopez 1231b963d0 Enabling ldap lookup 2020-05-25 17:30:16 -06:00
Carlos Lopez 727274ae33 Using full approval payload to update record 2020-05-25 15:40:24 -06:00