Commit Graph

1624 Commits

Author SHA1 Message Date
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 ded11ddd82 fixing a code smell 2021-03-26 20:25:34 -04:00
Dan 14f3c5b413 Merge branch 'dependabot/pip/lxml-4.6.3' of github.com:sartography/cr-connect-workflow into dependabot/pip/lxml-4.6.3 2021-03-26 20:07:48 -04:00
dependabot[bot] a28f1f3750
Bump lxml from 4.6.2 to 4.6.3
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.2 to 4.6.3.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.6.2...lxml-4.6.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-26 23:56:10 +00:00
Dan 00bdeb17c0 Merge remote-tracking branch 'origin/dev' into dependabot/pip/lxml-4.6.3 2021-03-26 19:55:46 -04:00
Dan Funk 8176d7e2b6
Merge pull request #275 from sartography/dependabot/pip/deploy/lxml-4.6.3
Bump lxml from 4.6.2 to 4.6.3 in /deploy
2021-03-26 19:50:43 -04:00
Dan Funk e79e810ae1
Merge pull request #273 from sartography/modify-email-template-215
Change location of `CR Connect` string. Move it left, closer to the logo
2021-03-26 19:50:16 -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 b64b52e7cb Assure that we properly return the new status message over the api calls. 2021-03-26 19:47:31 -04:00
Dan ac4877fecf Merge remote-tracking branch 'origin/dev' into master-workflow-status-messages-222 2021-03-26 17:47:57 -04:00
dependabot[bot] 02995da699
Bump lxml from 4.6.2 to 4.6.3
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.2 to 4.6.3.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.6.2...lxml-4.6.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-26 21:47:31 +00:00
dependabot[bot] 115f9db5d9
Bump lxml from 4.6.2 to 4.6.3 in /deploy
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.2 to 4.6.3.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.6.2...lxml-4.6.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-26 21:42:47 +00:00
Dan Funk 89077c4e59
Merge pull request #270 from sartography/dependabot/pip/deploy/jinja2-2.11.3
Bump jinja2 from 2.11.2 to 2.11.3 in /deploy
2021-03-26 17:42:33 -04:00
Dan Funk fbd516bdb9
Merge pull request #274 from sartography/dependabot/pip/deploy/pyyaml-5.4
Bump pyyaml from 5.3.1 to 5.4 in /deploy
2021-03-26 17:42:20 -04:00
dependabot[bot] 6334b0afa0
Bump pyyaml from 5.3.1 to 5.4 in /deploy
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.3.1 to 5.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/5.3.1...5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 23:46:10 +00:00
mike cullerton d9bf2a8a81 Change location of `CR Connect` string. Move it left, closer to the logo 2021-03-23 13:12:13 -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 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 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
dependabot[bot] 24b6b5c7e7
Bump jinja2 from 2.11.2 to 2.11.3 in /deploy
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.2 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.2...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-20 04:01:34 +00:00
dependabot[bot] 491a7de879
Bump urllib3 from 1.26.2 to 1.26.3 in /deploy
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.2 to 1.26.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.2...1.26.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 19:54:34 +00:00
Dan Funk 6ab98c1dee
Merge pull request #267 from sartography/get-study-associates-validation-242
The `do_task_validate_only` method in the `get_study_associates` scri…
2021-03-19 15:41:46 -04:00
Dan Funk 544f4a4418
Merge pull request #266 from sartography/study-associated-email-207-223
We now perform an LDAP lookup for the associated user email addresses…
2021-03-19 15:40:31 -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 938079cf59 Lowered count ceiling to 100, from 1000. This significantly increased validation time, from about 3 minutes to about 10 seconds.
Changed ApiError call to from_task, instead of from_workflow_exception.
2021-03-17 14:52:19 -04:00
mike cullerton e2ba19748d Added department chair to the mocked data for study_info script.
The missing department chair caused an infinite loop in a workflow that checked for a department chair.
2021-03-16 13:36:55 -04:00
mike cullerton 529bfc34b3 We now check for an infinite loop during validation.
This happened when testing for a Department Chair in a workflow.
Our mocked data for study_info script did not have a Department Chair
2021-03-16 13:35:51 -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 3c120df3cf remove all dependencies on dockerhub, and rely on a cached version of python 3.8 we have in quay.io 2021-03-16 11:05:05 -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
mike cullerton dfa65ac276 We now perform an LDAP lookup for the associated user email addresses, instead of looking in the DB user table. 2021-03-15 10:30:23 -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 Funk 0da07675b7
Merge pull request #258 from sartography/study-associated-email-207-223
Study associated email 207 223
2021-03-14 12:34:19 -04:00
Dan Funk 65a24cb3e1
Merge pull request #263 from sartography/bug/233_display_name
Don't raise errors on non-ready tasks that calculate a title, the inf…
2021-03-14 12:21:51 -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
Dan 1000b22a3b Don't raise errors on non-ready tasks that calculate a title, the information may not be avaiable yet.
Also Allow autocomplete-num as a valid field property.
2021-03-12 15:40:23 -05:00
mike cullerton ef26238127 added CustomBPMNScriptEngine back in 2021-03-11 14:33:35 -05:00
Mike Cullerton e7c78c8d0e
Merge branch 'dev' into study-associated-email-207-223 2021-03-11 12:38:47 -05:00
mike cullerton e58f1dc484 Remove unused mails service 2021-03-11 11:56:18 -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 67697b5076 Lots of changes!
Email Script:
- The email script now accepts 3 keyword arguments; subject, recipients, and cc.
- Subject and recipients are required.
- Recipients (and cc) can be an email address or list of addresses.
- You can use the string 'associated' in place of an email address, in which case we look up the users associated with a study that have send_email set to True.
- Moved some helper methods to email_service.

Email Service:
- Added cc argument
- Added helper methods previously in email script.
- Modified get_rendered_content to accept message and data directly. Previously, we passed in the task and grabbed them from there. Now we can use the method outside a task.
2021-03-11 11:32:21 -05:00
mike cullerton 80f1fc276f Modify api.tools.send_email to accommodate the changes to the api endpoint in api.yml
We now accept subject, address, body (the email message), and possible data.
We now use email_service to send the message, and wrap it with the CR Connect html formatting.

**** We import DEFAULT_SENDER from config.default. Will this be a problem on testing and production? ****
2021-03-11 11:19:02 -05:00
mike cullerton 14e62a7ec2 Modify the send_email api endpoint (in Configurator Tools section) to accept subject, message, and data.
Subject, address and message are required.
Data is not required.
Message is in the body of the request.
Subject, address, and data are in the query string.
2021-03-11 11:10:10 -05:00
Kelly McDonald d250bac32e Merge remote-tracking branch 'origin/dev' into dev 2021-03-10 10:59:24 -05:00