Commit Graph

772 Commits

Author SHA1 Message Date
Dan Funk 277beb345f
Merge pull request #290 from sartography/auto-set-primary-bpmn-142
Auto set primary bpmn #142
2021-04-16 13:36:02 -04:00
mike cullerton fdaa069886 Added test for automatically setting the primary bpmn for a workflow spec 2021-04-15 13:29:42 -04:00
mike cullerton 8953637466 moved the minimal_bpmn method to base_test 2021-04-15 13:28:03 -04:00
mike cullerton 2d4a68da6d Added test for deleting files on restart. 2021-04-15 11:30:17 -04:00
mike cullerton 69396f9888 Modified base_test restart_workflow_api to accept and pass on the new delete_files argument when restarting a workflow 2021-04-15 11:28:35 -04:00
Dan 069de83bd5 forgot to include a bpmn for the tests. 2021-04-09 09:02:43 -04:00
Dan 6427a54d74 Set the correct default value on enumerations - if it is a multi-select enum (checkbox is set) then it should return a default value of an empty array, and not a dictionary. 2021-04-09 08:40:58 -04:00
Dan 41310b6879 Allow both a keyword argument, a single argument when calling delete_file. And call it "delete_file" to be more conssitent with existing scripts. 2021-04-08 13:42:17 -04:00
Dan Funk 611c72f431
Merge pull request #284 from sartography/delete-uploaded-file-script-283
Delete uploaded file script #283
2021-04-08 12:42:30 -04:00
mike cullerton 5155db89f9 Added test for deleting multiple files.
Fixed existing tests to accommodate changes to test workflow bpmn file
2021-04-05 15:13:32 -04:00
mike cullerton 70fbd49aab Modified my test workflow so it works better for testing multiple file deletions 2021-04-05 15:12:14 -04:00
mike cullerton 33cef2bd2a Added tests for failing conditions 2021-04-05 13:19:29 -04:00
mike cullerton c6b1fd4e52 Fix for failing tests. Q_COMPLETE is no longer a column in the PB Mock study table. 2021-04-05 13:18:56 -04:00
mike cullerton 61f37ff894 Changed the order of imports so I could debug a failing test 2021-04-05 13:16:43 -04:00
Dan 501487b31c Assure we convert to box for validations as well, and test the bloodly snot out of this. 2021-04-05 12:47:50 -04:00
Dan 727aa72e18 Fix a bug from recent performance improvments - be sure that our study info script returns dicts that can be referenced immediately with dot notation, as this is a common pattern in our bpmn script tasks. 2021-04-05 11:31:06 -04:00
mike cullerton 9317e49e65 Merge branch 'dev' into delete-uploaded-file-script-283 2021-04-05 10:40:33 -04:00
mike cullerton d81497f8cb Test and workflow for new script to delete IRB documents 2021-04-05 08:55:41 -04:00
Dan dcb4e7b736 fixing an error by taking a bit of the magic out of one of Mike's regex hinting tools. I figure the hint is still good, and a little less bittle, and all the information is already there if people need to dig. 2021-04-02 17:58:27 -04:00
Dan 3ad3a086ba Merge branch 'dev' into 263-optimize-dashboard 2021-04-02 17:12:02 -04:00
Dan 2100f27976 fixing the api.yml file which was starting to throw errors when updating the libraries.
Seems that sqlalchemy now has a hard time incrementing sequences, so putting in a fix for this.
Upgrading many of our libraries, to avoid any disconnects as we try to handle security patches from these automated bumps.
2021-04-02 17:10:05 -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 Funk b5d4df595f
Merge pull request #271 from sartography/master-workflow-status-messages-222
Master workflow status messages 222
2021-03-26 20:52:24 -04:00
Dan Funk 123ec50912
Merge pull request #272 from sartography/infinite-validations-262
Infinite validations 262
2021-03-26 19:49:42 -04:00
Dan ac4877fecf Merge remote-tracking branch 'origin/dev' into master-workflow-status-messages-222 2021-03-26 17:47:57 -04:00
mike cullerton 3ee8109535 Tests for the changes to master workflow status dictionary
Test for each valid WorkflowState
Test for all three failure states; not in status, not a dictionary, not a valid state.
2021-03-22 17:52:14 -04:00
mike cullerton 47ff29e3ab Added a test for dictionary output from a decision table.
Will need dictionary output for master workflow status messages.
2021-03-18 12:25:27 -04:00
mike cullerton c4b52f85af Test and workflow for testing infinite loop code. 2021-03-17 14:52:50 -04:00
mike cullerton 70efdb4788 The `do_task_validate_only` method in the `get_study_associates` script now returns a mocked list of associates.
It used to return `True`, and this caused shield validation to fail when looping over the results of `get_study_associates`.
(You can't loop over a boolean)

Added a for loop in `study_sponsors_associate.bpmn` to test for this.
Moved `BaseTest` import to the top of `test_study_associate_script` because debug was failing.
2021-03-16 08:57:30 -04:00
Dan Funk 14386b8ba9
Merge pull request #264 from sartography/bug/243_complete_all
Bug/243 complete all
2021-03-14 12:34:55 -04:00
Dan 6f80d816cd My privous efforts didn't take into account the fact that we use dot notation in field names.
I've re-worked the workflow form endpoint, so that it only accepts the data that should be in the form, and ignores any other values that come back from the front end.  It seems Formly has some bugs that were introducing confusing information, and I want everything to behave consistently.
I had to re-work some of the tests, which were relying on an ability to set data through a form post without having a corresponding form to do so.
2021-03-14 12:20:39 -04:00
Dan 15c64c862e Adding an argument to update task that will allow it to complete all remaining tasks through an "update_all" flag,
this will allow us to remove some fairly complex logic from the front end that isn't behaving properly.
2021-03-12 20:41:07 -05:00
Mike Cullerton e7c78c8d0e
Merge branch 'dev' into study-associated-email-207-223 2021-03-11 12:38:47 -05:00
mike cullerton b403a3015e Modified existing tests to work with changes to the email script.
Added test for associated emails.
Added test for cc argument.
2021-03-11 11:40:46 -05:00
mike cullerton 8bda9889b1 Added a test for the send_email endpoint. 2021-03-11 11:38:34 -05:00
mike cullerton fa028dd517 Modified the email_script workflow to accommodate the changes to the email script.
Workflow now uses keyword arguments; subject, recipients, and cc.
If cc is not passed in, we set it to None.
2021-03-11 11:37:54 -05:00
mike cullerton 78ae719b97 Moved this test to the test_email_script test file. 2021-03-11 11:35:08 -05:00
mike cullerton fa4707811e Removed the test and templates from the unused mails service.
Mails was removed in previous commit.
2021-03-11 11:34:24 -05:00
Mike Cullerton eaf52a21ca
Merge pull request #260 from sartography/bug/delete_study
Allows us to delete a study even if there are emails, and associated …
2021-03-09 13:51:25 -05: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
Dan 576aebab19 Sometimes a workflow can be completely broken and unloadable. For instance, it starts off with a engine step / script task that will not execute. So the failure happens the second it is processed. When calling reset on a workflow, we should catch the failure, and reset the workflow, so we aren't trapped in an unrecoverable state.
To do so, I changed the WorkflowProcessor's reset method to be static, it will try to instantiate the current workflow and execute a cancel_notify event, but if that fails, it will continue and always return a new workflow processor using the latest spec.
2021-03-09 11:52:55 -05:00
mike cullerton 7749f3aeaf Fixed existing workflows to work with keyword arguments 2021-03-09 06:50:58 -05:00
mike cullerton 8c75217042 Test and workflow for associated user emails 2021-03-09 06:50:20 -05:00
Dan 36dcc58705 Merge branch 'dev' of github.com:sartography/cr-connect-workflow into dev 2021-03-08 14:00:14 -05:00
Dan 291216e081 Fixing a bug that prevented proper evaluation of a enum field where the default value was null or empty. 2021-03-08 14:00:03 -05:00
mike cullerton f883eb2bbe We now include field.id in the ApiError message for hidden and default validation. (The field must have a default value or value expression)
While working on this ticket I found a logic error in the test. I expected both default_value and value_expression. It turns out the default_value is always there, it's just null if we don't set it.

Modified the existing test for hidden and required, and added tests to make sure my passing logic is now correct.
2021-03-04 10:42:13 -05:00
Dan 9e758c57d3 Merge branch 'dev' into bug/225_enum_lookup_same_field_name 2021-03-02 14:15:58 -05:00
Dan ecfc2ee761 a slightly better test. 2021-03-02 14:15:29 -05:00
Dan Funk 572eb3457a
Merge pull request #252 from sartography/customer-error-messages-192
Customer error messages 192
2021-03-02 13:45:38 -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
mike cullerton 9a2ffb98ad Customer Error is in a place that we can try it out on testing.
So far, there are two known errors.
 - Missing condition type (Ticket 178)
 - Invalid property value in extensions tab for display_name (No ticket for this error)

We now have the option of using regular expressions to pull task_id, etc. from an error to pass back to the user in the hint.
2021-03-01 16:41:55 -05:00
Dan aac3d5c16e Bug #255, this requires the front end to pass in the name of the task, when doing a lookup. This will prevent a bug where we have multiple user tasks, with enum fields that set the same variable, but use different lookup tables to populate the dropbown or search feature. 2021-03-01 14:54:04 -05:00
mike cullerton 9d804c36d5 Merge branch 'dev' into customer-error-messages-192.
Needed some sql changes from dev
2021-03-01 10:29:10 -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 1504779bba Make sure we have all test files 2021-02-25 11:40:45 -05:00
Kelly McDonald a1814a7727 Add some additional comments - just to be clear 2021-02-25 11:40:08 -05:00
Kelly McDonald 55f8825b3c Make sure we are testing both versions of the setting functions as well as the getting functions 2021-02-25 09:14:24 -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
mike cullerton f937ac3ce9 Getting some thoughts down for the extension property error. This might force us to use regexes for the error service.
Committing so I can work on another branch.
2021-02-24 10:56:25 -05:00
Dan Funk 53fa49e668
Merge pull request #243 from sartography/183-remove-study-approval-code
Remove Approvals per ticket 183
2021-02-22 18:12:02 -05:00
mike cullerton e0de1d0b3b Fixed 3 tests to reflect a change in crc.api.workflow.validate_workflow_specification.
Added a '\n' to the error message between the actual error and our preamble.
2021-02-19 15:55:40 -05:00
Kelly McDonald 003bf2f9b9 Remove Approvals per ticket 183 2021-02-16 09:05:29 -05:00
mike cullerton c40af1d7df Modified workflow to add form field with period in the id. 2021-02-15 16:36:36 -05:00
mike cullerton 446bff9c8c Modified test for missing default value on hidden and required fields to check for task_id and task_name 2021-02-15 16:28:51 -05:00
mike cullerton 34700568ee Added a test for allowing periods in field ids 2021-02-15 16:28:21 -05:00
mike cullerton 39eb5c5c21 This is a decent beginning framework for customer error messages.
It is not complete, but is in a state where we can start to interact with the front end.
Two tests are failing.
Committing so I can work on an error for Alex.
2021-02-12 14:18:42 -05:00
Dan Funk 35773ebc29
Merge pull request #240 from sartography/weird-email-error
The email script was failing validation because of missing parameters…
2021-02-12 09:31:52 -05:00
mike cullerton d8bd203139 The email script was failing validation because of missing parameters in scripts.email.do_task_validate_only.
I added a test in tests.test_email_script to make sure we get the default email_address.
I also found and fixed a bug in workflow_service.populate_form_with_random_data where we would overwrite default_values with random text because of a missing continue.
(We don't want to continue if we have repeating fields though.)
2021-02-11 15:36:12 -05:00
Dan Funk fe4e737596
Merge pull request #238 from sartography/value-expression-failing-shield-test-194
We now allow value_expression to evaluate to an empty string ("") so …
2021-02-11 11:25:09 -05:00
Dan Funk df0cfc755b
Merge pull request #237 from sartography/get-study-from-model-error-191
We now test whether we have a valid StudyModel when getting a study b…
2021-02-11 11:23:59 -05:00
Dan Funk df25b83958
Merge pull request #235 from sartography/index-error-for-enums-186
Index error for enums 186
2021-02-11 11:21:50 -05:00
mike cullerton 39e874504f We now allow value_expression to evaluate to an empty string ("") so that we *do not* set a default value for enums in some cases.
This was causing an error because "" was not an option for the enum.
2021-02-10 14:35:58 -05:00
mike cullerton 777cfbdecd We now test whether we have a valid StudyModel when getting a study by study model.
We raise an ApiError if the model is None or empty.
2021-02-09 17:37:55 -05:00
mike cullerton 11177b4296 Test, workflow, and empty spreadsheet for the new code. The workflow references the spreadsheet, which has no rows. 2021-02-08 15:12:11 -05:00
mike cullerton eb504465f6 Test and workflow for new code.
We test 2 things.
 - If a field can be hidden and required, it must have a default value or value_expression
 - If a field is hidden and required, make sure we use the default value
2021-02-08 10:20:05 -05:00
mike cullerton fa34bee18a First commit for cleaning up error messages for customers.
This is *not* in a working state.
Committing this so I can work on another ticket.
2021-02-04 11:23:05 -05:00
Dan Funk 329146237e
Merge pull request #232 from sartography/boolean-default-values-175
Boolean default values 175
2021-02-03 16:34:54 -05:00
Dan Funk effd11f947
Merge pull request #231 from sartography/cancellations-137
Cancellations 137
2021-02-03 16:31:18 -05:00
Dan Funk 1eba20f420
Merge pull request #229 from sartography/workflow-spec-order-74
Workflow spec order 74
2021-02-03 16:18:34 -05:00
mike cullerton 1247744463 Test and workflow for new code. 2021-02-03 09:50:37 -05:00
mike cullerton 6f7abc0a97 Added tests to test_workflow_restart to make sure we call cancel_notify events when appropriate. 2021-01-29 14:48:35 -05:00
mike cullerton f9e4b6a972 Test and workflow for the new code. We test the correct cancel notify is called, and only when appropriate. 2021-01-29 14:09:42 -05:00
mike cullerton c026717b4a Changed the call to WorkflowProcessor.reset to reflect the change from class method to instance method 2021-01-29 14:06:25 -05:00
mike cullerton 7e76639cf3 When a study is put on hold, we now reset workflows and call any pending cancel_notify events.
In api.study.update_study we test the study status and call the new WorkflowService method process_workflows_for_cancels.
In services.workflow_service we added the new method process_workflows_for_cancels. It loops through workflows for a study, and resets them if they are in progress.
In services.workflow_processor, we changed the reset method to be an instance method so we can call self.cancel_notify.
In tests.test_lookup_service we changed the call to WorkflowProcessor.reset to reflect the change from class method to instance method
2021-01-29 14:05:07 -05:00
mike cullerton 7b91fb9f61 Modified test to check for display_order within workflow category. 2021-01-27 11:08:28 -05:00
Dan Funk cccb722e07
Merge pull request #226 from sartography/enum_default_value_expression_162
Enum default value expression 162
2021-01-27 10:43:46 -05:00
mike cullerton 420ef0b2b0 Test and data for cleaning up my smell. We now test explicitly whether a task has both a default_value and value_expression. If so, we raise an error. 2021-01-27 10:22:43 -05:00
Dan Funk 98f946c119
Merge pull request #227 from sartography/missing_form_key_163
Missing form key 163
2021-01-27 09:42:46 -05:00
mike cullerton d01f8e1018 This workflow had a form with a missing form key, so it's associated test failed after my changes in this ticket. I added a form key to the form. Test now passes. 2021-01-22 12:16:02 -05:00
mike cullerton 2438779470 Test and workflow file for missing form key. Ticket 163 2021-01-22 12:14:59 -05:00
mike cullerton 1ee6a11d46 Test and associated data files for setting enum default values from value_expression. Ticket 162 2021-01-22 10:01:20 -05:00
Dan 5921ce9f10 Merge branch 'dev' into 152-workflow-spec-pull 2021-01-21 12:30:43 -05:00
Dan Funk 5b13195182
Merge pull request #224 from sartography/restart-with-no-data-99
Restart with no data 99
2021-01-20 17:22:18 -05:00
Dan 41dac33039 Removed two tests around soft_reset that are no longer required.
Reset should construct the workflow_processor, thus completing the reset process.
Removed the spec argument from init, as it is never used anywhere.
2021-01-20 13:24:53 -05:00
mike cullerton 27a8383898 Not sure about this one. We no longer support the task this test is testing (soft_reset). I commented out that part of the test. We can discuss, if necessary. 2021-01-19 15:44:11 -05:00
mike cullerton 61d366c111 Fixed hard_reset test. Now we reset the workflow and run do_engine_steps 2021-01-19 15:39:59 -05:00
mike cullerton 61b34fd6f4 Fixed hard_reset test. We now call restart_workflow_api. 2021-01-19 15:34:46 -05:00
mike cullerton 1b18b53107 Fixed hard_reset test. We now call restart_workflow_api. 2021-01-19 15:32:38 -05:00
mike cullerton bfb3871671 Added method for restart_workflow_api. Pulled out some common code with get_workflow_api. 2021-01-19 15:27:44 -05:00
mike cullerton 9281a93abb New test for new restart_workflow endpoint 2021-01-19 15:15:44 -05:00
mike cullerton 6a9e6d3570 Restart workflow without form data. Committing so Dan can check it out 2021-01-14 15:32:14 -05:00
mike cullerton 99c1d1b129 Test for changes to hard_reset and soft_reset 2021-01-13 16:12:14 -05:00
Kelly McDonald 442a4524c4 Test for new functionality and code coverage 2021-01-12 10:18:35 -05:00
Kelly McDonald abc17add89 file order was not deterministic - alter test to make sure we updated the 'right' file rather than relying on ordering 2021-01-12 08:54:15 -05:00
Dan 26655b26d3 merging in dev, and fixing a failing test from dev. 2021-01-08 14:42:13 -05:00
Dan Funk 9118517995
Merge pull request #220 from sartography/prevent-duplicate-template-upload-111
Users cannot upload a workflow_spec_file that already exists. We rais…
2021-01-08 13:55:19 -05:00
Dan Funk be288ae048
Merge pull request #219 from sartography/fix-api-call-missing-fieldname-143
Fixed ApiError call. Now includes task_id and task_name.
2021-01-08 13:46:26 -05:00
mike cullerton d274813ae5 We now check form field IDs so they play well with Python and Javascript. 2021-01-07 11:10:31 -05:00
mike cullerton c9a4a9685f Users cannot upload a workflow_spec_file that already exists. We raise an error that is displayed on the fron end. 2021-01-04 15:47:45 -05:00
mike cullerton 0ae4448fbe Fixed ApiError call. Now includes task_id and task_name. 2021-01-04 13:48:34 -05:00
mike cullerton 0c47d09972 Ticket 143. Test whether file is uploaded. 2021-01-04 10:53:21 -05:00
mike cullerton 80d2009573 Modified the test to cover hold, abandon, and open_enrollment. These are tickets 21 and 94 2020-12-31 10:40:27 -05:00
mike cullerton ede5df4df5 Studies can now be put on hold in the dashboard. We were overriding the status in StudyModel.update_from_protocol_builder. 2020-12-30 17:49:59 -05:00
Dan 96739d99c4 Fixing a failing test because new logic was catching a different error. 2020-12-29 11:14:40 -05:00
Dan c288a8a2bc Merge branch 'dev' into check-field-type#143 2020-12-29 11:11:43 -05:00
mike cullerton 052ee40238 Cleanup from test email script changes. Removed commented piece of code containing my private email address. 2020-12-28 18:05:47 -05:00
mike cullerton 06318c87b1 Test and workflow for changes to workflow_service. The workflow does not have a field type. We look for evidence of raised exception in data of response. 2020-12-28 18:03:59 -05:00
Dan 6cfce839c1 Validation now assures that we won't encounter errors when generating navigation lists.
Fixing workflow sync paths that were incorrect.
Repairing a suddenly failing test in files, that just don't make no sense.
Bumping spiffworkflow that contains a fix for issue #155
2020-12-28 17:33:38 -05:00
Dan 1f9bf72c59 Merge branch 'dev' into bug/navigation 2020-12-14 11:46:44 -05:00
Dan Funk 4268d0f482
Merge pull request #208 from sartography/152-workflow-spec-pull
152 workflow spec pull
2020-12-14 11:35:06 -05:00
Dan bcb78de225 Merge branch 'dev' into bug/navigation 2020-12-14 11:33:51 -05:00
Dan Funk e54404e424
Merge pull request #205 from sartography/test-email-script
Test email script
2020-12-14 11:28:14 -05:00
Dan 6bf24cc438 fixing some failing tests related to changes in the underlying spiffworkflow library. 2020-12-14 11:27:38 -05:00
Dan b62a9c7074 Merge remote-tracking branch 'origin/dev' into bug/navigation 2020-12-14 10:40:21 -05:00
Dan 082dee46e0 fixing some failing tests. 2020-12-14 10:37:35 -05:00
Kelly McDonald d8ac20b1c3 I added a second file to 'random_fact' test workflow, so another test was expecting 2 files in it after adding a new file, but there were 3 -
Nothing to see here - move along
2020-12-14 10:37:16 -05:00
Dan 38a6fa782d Fixing the email script test. 2020-12-14 10:29:53 -05:00
Kelly McDonald ee3ee9fd4a Added tests to cover most of the use cases and code, and a bunch of stuff to make the mocks happy 2020-12-14 10:27:40 -05:00
Dan 02ea414b94 Additional fixes to Navigation to allow a nested navigation structure. 2020-12-14 10:07:19 -05:00
mike cullerton 7defc2b02f Tests for uid in logs. Currently we test for uid in a response. This covers ApiError.
Currently, we don't have a test for Sentry. Unsure how to do this.
Also added a script, service and test workflow to help. (Also to learn about adding a script and service.)
2020-12-11 17:47:53 -05:00
Kelly McDonald 3a1160efac refactored calls into a service 2020-12-11 11:41:32 -05:00
Kelly McDonald 9eea26e019 add workflow_sync test 2020-12-11 08:34:59 -05:00
mike cullerton 32c5060a31 No longer use eval on the email address. It is already parsed.
Tests for single and multiple emails, and email error checking.
Still need to figure out how to implement multiple emails.
2020-12-09 12:11:46 -05:00
mike cullerton 730d0ca18f Email script now uses an email address instead of a UVA LDAP user_id. 2020-12-07 16:23:41 -05:00
Sartography 8ba1e90f9a Test for ticket 153 to include user in error messages 2020-12-07 08:39:00 -05:00
Sartography 750a202e99 Test and BPMN files for testing email script 2020-12-06 10:22:32 -05:00
Dan 93b12a8e82 updates using new navigation from spiff workflow's navigation branch, all tests passing. 2020-12-04 17:56:12 -05:00
Dan Funk e15130e09c
Merge pull request #203 from sartography/151-data-store-exclusive-branch-expression
Added the ability to use the custom functions within a decision/flow …
2020-12-01 14:44:27 -05:00
Kelly McDonald 94662c560e Added the ability to use the custom functions within a decision/flow coming off of an exclusive join
Altered previous test to test this feature
2020-12-01 09:13:12 -05:00
mike cullerton 73e01b347b Ticket #105. Verify End Event Documentation. Added explicit call to _process_documentation at end of crc.services.workflow_service.test_spec for the end event 2020-11-24 16:51:18 -05:00
mike cullerton a6f9e27ca3 test and bpmn files for ticket #105 (verify end event) 2020-11-24 10:47:20 -05:00
Dan Funk b8a91a513b
Merge pull request #196 from sartography/128-data-store
128 data store
2020-11-18 18:55:33 -05:00
Dan 70c621fe87 fixing the bpmn to use cancel, and pulling in pudates to the spiffworkflow branch. 2020-11-18 16:39:09 -05:00
Dan b83ab1bcd1 Move data store base into its own file. 2020-11-18 15:34:50 -05:00
mike cullerton d198f124d7 Committing a merge from dev 2020-11-18 15:33:44 -05:00
Dan c62b73a539 drop some of the test-only api endpints and rework the tests so they aren't needed 2020-11-18 15:04:36 -05:00
Kelly McDonald 72ade3c367 Add crosstalk test 2020-11-17 10:29:49 -05:00
Kelly McDonald e9979efb0d Add some tests 2020-11-17 09:33:29 -05:00
mike cullerton a2dc3c4812 Use Cancel Event
New title 'New Title'
2020-11-16 09:59:22 -05:00
Kelly McDonald 9a4d167dcd Add in api changes 2020-11-11 09:44:58 -05:00
Kelly McDonald 3ba11f5e6b add user_data_get/set and alter test so that it ensures that we don't grab study_data stuff from the user_data calls
change the test to mock up the user.
2020-11-10 10:32:37 -05:00
Kelly McDonald 92595e3c42 base_test didn't 'know' about the DataStoreModel so it wasn't creating the data_store table, causing a lot of problems after the initial setup/teardown 2020-11-10 09:33:54 -05:00
Kelly McDonald 69fe55aa56 Add mostly-working elements of the data-store, compare with dev to see why db is not working after running tests 2020-11-10 08:24:17 -05:00
Kelly McDonald 245124779e Add mostly-working elements of the data-store, compare with dev to see why db is not working after running tests 2020-11-10 08:21:46 -05:00
Kelly McDonald e598994d34 Change the study_sponsors script so that we can actually call it :
var = study_info('sponsors')

to keep it more in line with other scripts that we have
2020-11-05 10:31:47 -05:00
mike cullerton a78af4eab8 Run cancel task during interrupt. Currently this uses Signal event. We may change this to the Cancel event. 2020-11-04 14:37:53 -05:00
Kelly McDonald 8b23cdc05c commit changes before switching branches 2020-10-09 08:46:14 -04:00
Dan Funk b2aede2b8d Glob on windows seems to return directories where in linux it does not, so now assuring we don't try to add files from the sub-directory. 2020-10-05 17:35:35 -04:00
Dan Funk 014a4d9757 Fixing a failing test and updating the personnel. 2020-09-02 08:24:48 -04:00
Dan Funk b544334f45 1. Updating Personnel BPMN diagram to debug some issues.
2. Disabling the token timeout for now, to see if this corrects the issues Alex is having with lost work.
3. Raising more thoughtful error messages for unknown lookup options.
4. Providing better validation of default values and injecting the correct value for defaults related to enum lists of all types.
5. Bumping Spiffworkflow library which contains some better error messages and checks.
2020-09-01 15:58:50 -04:00
Dan Funk 1052dff549 Merge remote-tracking branch 'origin/dev' into feature/python_eval 2020-08-27 14:33:16 -04:00
Dan Funk b39fd73bc0 fixing a failing test due to changes in the master bpmn for CRC 2020-08-27 14:06:03 -04:00
Dan Funk 5dacc46600 Adding some additional bpmns from Staging server to include in tests. 2020-08-27 14:00:45 -04:00
Dan Funk 53d09303d8 Validating that field properties are valid - they must exist as constants on the Task model.
Making all the lookup field names consistent.
Fixing the lookup service which was failing at times trying to find the correct field to use for building the lookup table.
Updating validation to check for additional fields and properties.
When connexion level errors occur, wrapping it in an API Error to be consistent.
2020-08-27 14:00:14 -04:00
Dan Funk 23fd1fbfa0 Removing a rogue file. 2020-08-25 11:15:43 -04:00
Dan Funk d31fd47837 Merge branch 'dev' into feature/python_eval 2020-08-25 11:08:42 -04:00
Aaron Louie 8dcb598a24 Adds unit test for ProtocolBuilderService.get_sponsors 2020-08-25 11:08:13 -04:00
Dan Funk 5be35e8bab Adding a study sponsors script to return details about study sponsors 2020-08-25 10:30:46 -04:00
Aaron Louie 182e375fdc Adds a test for string manipulation 2020-08-21 13:46:10 -04:00
Aaron Louie 4dc98a6b6b Injects current user into task data. 2020-08-21 13:34:37 -04:00
Dan Funk 66e49a347a Minor tweaks to the eval endpoint, which should take both the expression and the data as one data structure. 2020-08-20 16:13:48 -04:00
Dan Funk 7f60a19d55
Merge pull request #189 from sartography/feature/documents_publishing
Update github routines to use branches
2020-08-17 15:52:47 -04:00
Dan Funk 8f5488d910 Don't raise an error when validating workflows that use the ldap script. 2020-08-17 15:45:37 -04:00
Dan Funk 35b1b20960 Merge remote-tracking branch 'origin/dev' into feature/documents_publishing 2020-08-17 15:19:24 -04: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 32d47c1417 Merge remote-tracking branch 'origin/dev' into fix/delete_workflow_endpoint 2020-08-17 15:08:44 -04:00
Dan Funk c09441d019 Merge branch 'dev' into fix/delete_workflow_endpoint 2020-08-17 15:07:58 -04:00
Dan Funk dbd0dbf608 mend 2020-08-17 14:56:24 -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 2bd906e96d Update github routines to use branches 2020-08-14 11:04:22 -06:00
Carlos Lopez 4f05d99cf0 Fixing typo 2020-08-14 08:48:08 -06:00
Carlos Lopez 369fe4bb35 Automatic events refactoring 2020-08-14 08:36:46 -06:00
Carlos Lopez aa010272cc Automatic event creation in study creation 2020-08-14 08:36:10 -06:00
Dan Funk c57ac6d302
Merge pull request #185 from sartography/feature/107_current_user_info
calling ldap with no argument will return information about the curre…
2020-08-14 09:18:10 -04:00
Dan Funk 08c24b7441
Merge pull request #184 from sartography/PMI_fix
Pmi fix
2020-08-14 09:17:58 -04:00
Dan Funk c12e2b97f3 calling ldap with no argument will return information about the current user. 2020-08-13 21:09:52 -04:00
Dan Funk 1a963cf940 Merge branch 'dev' into PMI_fix 2020-08-13 20:49:45 -04:00
Dan Funk 29f53e763c fixing other tests realted to lookups. 2020-08-13 20:27:51 -04:00
Dan Funk e29134a019 fixing a few tests realted to stop words. 2020-08-13 18:35:24 -04:00
Dan Funk 32d1036041 Cleaning up the tests. 2020-08-13 18:15:10 -04:00
Dan Funk 9a5c1d7cfb I may have finally wrapped my head around full text search in python. Now properly using an index based on simple rather than english dictionary which has far fewer stop words and stemming processes and plays much better to the type ahead search we are trying to provide.
Stop words are no longer excluded, so "other" is a valid search and gets a result.
2020-08-13 18:13:41 -04:00
Kelly McDonald 7bfcdd53cd Merge branch 'dev' into cr-workflow-108 2020-08-12 10:50:19 -04:00
Kelly McDonald c4a15be90c Change dmn files to python standard,
NB: this means mostly false=>False and true=>True

We may have to decide if we want to add false and true as extensions in the python namespace.
2020-08-12 10:48:59 -04: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
Carlos Lopez cef7c48be2 Adding tests 2020-08-10 21:18:41 -06:00
Kelly McDonald 623ecbae8e Add IRB test 2020-08-07 09:59:53 -04:00
Kelly McDonald 1ab765b50b Add test for PMI problem 2020-08-06 10:29:14 -04: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 50b207307a Merge branch 'dev' into feature/update_study_status_latest 2020-07-31 14:26:24 -06:00
Carlos Lopez 4fcba113b8 Fixing tests 2020-07-31 11:49:04 -06:00
Aaron Louie 864fd0ad40 Merge branch 'dev' into feature/admin_impersonations 2020-07-31 13:28:56 -04:00
Aaron Louie c8881cbf91 Merge branch 'dev' into feature/approvals_dashboard_prototype 2020-07-31 12:17:22 -04:00
Carlos Lopez 5d23223e51 New study status update 2020-07-30 21:03:11 -06:00
Aaron Louie 73699e66bd Merge branch 'dev' into feature/admin_impersonations 2020-07-30 17:36:20 -04:00
Dan Funk 9704cbcb26 Modifications to the ldap scripts to bring them back in line with what Kelly is doing with the evaluation process. 2020-07-30 13:35:20 -04:00
Aaron Louie f8944da31f Merge branch 'dev' into feature/admin_impersonations 2020-07-30 13:01:46 -04:00
Aaron Louie faba0f55ab Adds AdminSession model and refactors impersonation methods to use it. 2020-07-30 12:40:53 -04:00
Dan Funk a6ec0c92c7 Merge remote-tracking branch 'origin/dev' into cr-connect-106-augment-eval-methods 2020-07-30 11:38:47 -04:00
Dan Funk 44deee12de Merge branch 'dev' into feature/improved_task_event_api 2020-07-30 11:28:52 -04:00
Dan Funk 37d1ba5d5a
Merge pull request #160 from sartography/feature/ldap_lookup_script
Ldap lookup script
2020-07-30 11:27:38 -04:00
Dan Funk bf4d882519 Merge branch 'dev' into feature/ldap_lookup_script 2020-07-30 11:19:24 -04:00
Aaron Louie aa0f24bd33 Fully deletes users from g in test tearDown 2020-07-30 10:40:06 -04:00
Dan Funk 31982f81ae Merge branch 'dev' into feature/documents_publishing
# Conflicts:
#	Pipfile.lock
2020-07-30 10:17:08 -04:00
Aaron Louie 1b0ebecbf4 Uses Flask session to store impersonation state. 2020-07-30 10:17:02 -04:00
Aaron Louie d301e9e6fa Adds list_users endpoint. Adds admin impersonate uid parameter to user endpoint. Adds some utility methods to user service. Refactors authentication tests. 2020-07-29 22:47:47 -04:00
Carlos Lopez de49397549 Adjustings tests for protocol builder status changes 2020-07-29 10:51:34 -06:00
Carlos Lopez 73a6b7adf1 Fixing tests 2020-07-29 10:25:57 -06:00
Carlos Lopez 6aa21638de Updating properly study status & fixing tests 2020-07-29 10:25:57 -06:00
Aaron Louie f897ee3aea Merge branch 'feature/approvals_dashboard_prototype' into feature/admin_impersonations 2020-07-29 10:32:46 -04: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
Aaron Louie 79adb673f2 Fixes display_name custom properties 2020-07-28 14:04:18 -04:00
Dan Funk 4d11fc04a0 dropping the "read_only" flag in favor of a "do_engine_steps" flag, which more clearly defines what is happening. 2020-07-28 13:51:29 -04:00
Dan Funk f15626033d Allow the workflow to be requested without making changes to the workflow - requires that you specify a read_only flag of true, otherwise it assumes that you want a fully prepared workflow with the next ready task set to run. 2020-07-28 13:33:38 -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 8d42d520a0 Adding events to the study that is returned via the api. 2020-07-27 16:32:23 -04:00
Carlos Lopez de0fe705c3 Wrapping LOCKED task update attempt into a try-catch block for tests 2020-07-27 14:00:44 -06:00
Dan Funk 452f2c3723 Building out a user service for getting the current user, it will provide a number of functions, one of which will allow administrative users to impersonate other users in some circumstances (but will assure that we log events correctly when an impersonation occures) 2020-07-27 14:38:57 -04:00
Dan Funk 0d2cb8c1b8 Correcting an issue with the Navigation where it did not correctly handle looking back to a previous task within the workflow.
In some cases the session was not getting committed, leaving rogue assignments outstanding for a workflow.
2020-07-27 12:36:20 -06:00
Dan Funk 6379b26a71 Add a few more details to the workflow metadata model. 2020-07-27 12:34:25 -06:00
Kelly McDonald cc55aed89c Change exception name 2020-07-27 12:18:28 -04:00
Kelly McDonald 70ad3872a7 Fix several bugs, most had an issue with the bpmn document 2020-07-27 12:02:34 -04:00
Dan Funk 824582dab1 Hot fix to correct for a failing test due to updates in Spiffworkflow library,
and modifying the token authorization so that we can log in as different users when not in production mode.
2020-07-27 11:25:29 -04:00
Kelly McDonald a124e13c6a Replace all legacy style calls with new calls.
Still having issues where we try to eval an empty definition, not quite sure why there is a difference from what we had before. I may need to revert some of it and determine what is going on.
2020-07-24 14:33:24 -04:00
Kelly McDonald f5ab283538 Test of adding in the ability of augmenting the workflow to include internal scripts like StudyInfo
This is the first waypoint on a larger effort to make all of the 'special scripts' that currently require a shebang to be just another python function.
2020-07-24 12:08:46 -04:00
Kelly McDonald ce8d7cad16 We resolved a problem with a test with some changes to Spiff, change the correct so that it is correct. 2020-07-23 14:56:12 -04:00
Carlos Lopez 74e5e07114 Testing for all values 2020-07-23 07:41:29 -06:00
Aaron Louie aa7437bfc4 Merge branch 'dev' into feature/approvals_dashboard_prototype 2020-07-22 13:08:32 -04:00
Dan Funk a243c14d75 Updating to lastest spiffworkflow which uses box to support dot notation.
Adding a new endpoint for evaluating the results of a python expression into the tools section of the api.
2020-07-22 11:30:16 -04:00
Carlos Lopez 41cbce8e01 Updating bpmn test 2020-07-21 21:08:08 -06:00
Carlos Lopez 522f848682 Addressing feedback 2020-07-21 20:54:03 -06:00
Carlos Lopez 313770d538 Ldap lookup script 2020-07-21 20:54:03 -06:00
Dan Funk 3d9eeab502 Add a few more details to the workflow metadata model. 2020-07-21 15:18:08 -04:00
Dan Funk d01b30debc Building the start of an endpoint that could be used by logged in / authenticated users that will evaluate basic python functions sent in via the API.
The hope here is that we can process these in real time for the front end, but still do it using the same evaluation engine we use everywhere else, so
the syntax for things like hide-expressions can be properly verified during workflow validation and will be assured to work during front end rendering.
Removing any all javascript code in the BPMN models.
2020-07-21 13:57:33 -04:00
Dan Funk 6caf44544c Merge branch 'dev' into cr-connect-92-scripting-enhancements
# Conflicts:
#	crc/static/bpmn/ind_supplement/ind_supplement.bpmn
#	tests/workflow/test_workflow_service.py
2020-07-20 13:01:23 -04:00
Dan Funk dd0f984347 Drop backwards compatibility of scripts. While this will cause some initial pain, it's less confusing and error prone, and we are still in the development phase of the project. Were this going straight to production we would likely want to keep this backwards compatibility.
Don't parse on spaces if this is python code, so we avoid any errors in processing - spaces should be valid.
2020-07-20 12:26:34 -04:00
Dan Funk 06430550c8 Dropping the RRT-Data-Fix, it should have come out already, but had a failing test, so pulling it out now rather than delve into what is going wrong with obsolete code. 2020-07-20 11:39:50 -04:00