Commit Graph

116 Commits

Author SHA1 Message Date
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
Kelly McDonald 003bf2f9b9 Remove Approvals per ticket 183 2021-02-16 09:05:29 -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
mike cullerton d7a3afe8f4 changed the template to use the responsive html email template at https://github.com/leemunroe/responsive-html-email-template
added method get_cr_connect_wrapper to render our new html email template. This takes the email text generated from the task element documentation as the email_body.
2021-01-27 17:12:03 -05:00
mike cullerton 909af9b8d6 Change HTML emails so they look like the CR-Connect website. Add logo, color, style, etc.
Cleaned up email script a little.
Also, email script no longer uses services.mails. It uses email_service directly now.
2021-01-26 09:19:28 -05:00
mike cullerton 0c47d09972 Ticket 143. Test whether file is uploaded. 2021-01-04 10:53:21 -05:00
Dan Funk 386feddeed
Merge pull request #214 from sartography/validate-hide-expression-103
Modified study_info do_task_validate_only so that we take the default…
2020-12-31 10:53:27 -05:00
Dan efdbbcbc72 StudyInfo sometimes returns arrays of items, each item in the array should be coverted to a Box dictionary if possible. 2020-12-30 14:51:51 -05:00
mike cullerton f29429f0d0 Modified study_info do_task_validate_only so that we take the default path in ind_update workflow. 2020-12-30 10:04:10 -05:00
Dan e5a38874f6 A hard or soft reset should also cause a 'cancel_notify' which will kick off any CANCEL events. If this happens during
a hard or soft reset, and an error is thrown trying to fulfil a cancel event, the reset should still fire.
Sending emails still had a number of issues correctly parsing it's arguments.  This is corrected.
2020-12-29 18:05:13 -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
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
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
Dan b83ab1bcd1 Move data store base into its own file. 2020-11-18 15:34:50 -05:00
Kelly McDonald 70425eee0d Add last_updated field - change the api signature to be closer to what we need going forward, but retain the old methods for testing the script get/set through the API 2020-11-13 12:03:29 -05:00
Kelly McDonald 7c2c725840 save before changing how API works 2020-11-13 09:58:21 -05:00
Kelly McDonald 9a4d167dcd Add in api changes 2020-11-11 09:44:58 -05:00
Kelly McDonald cef221be32 Refactor to reuse code 2020-11-10 11:32:59 -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 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
Kelly McDonald 2931f45187 Add 'sponsors' to study_info call 2020-11-04 14:34:10 -05: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 5be35e8bab Adding a study sponsors script to return details about study sponsors 2020-08-25 10:30:46 -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 c12e2b97f3 calling ldap with no argument will return information about the current user. 2020-08-13 21:09:52 -04:00
Dan Funk e8067fe34e adding additional data to the study details returned during validation/shield testing. 2020-08-12 17:04:59 -04:00
Aaron Louie c25536dcca Makes Sonar happy. 2020-08-04 16:42:35 -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
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
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 2905fc6173 Merge branch 'feature/ldap_lookup_script' of github.com:sartography/cr-connect-workflow into feature/ldap_lookup_script 2020-07-30 11:17:48 -04:00
Kelly McDonald d617af8565 All tests are passing - may need to refactor a bit, / remove comments 2020-07-28 11:02:49 -04:00
Kelly McDonald cc55aed89c Change exception name 2020-07-27 12:18:28 -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
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
Carlos Lopez a39cacdf00 Ldap lookup script 2020-07-19 21:53:18 -06:00
Dan Funk 6c6c5d315d Fixing a stupid mistake where I used an unquoted value in the mock data for validation, which created a dict that could not be serilized. 2020-07-16 13:28:00 -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 7116b582e8 Splitting commands properly without losing double quoted strings 2020-06-25 12:01:24 -06:00
Carlos Lopez 5d1ae402b6 Slight refactor on data passed to template rendering 2020-06-24 22:43:44 -06:00
Carlos Lopez e6d74aaa1a Removing extra index when parsing users info 2020-06-18 12:53:50 -06:00
Carlos Lopez 4db815a999 Handling incoming values from processor 2020-06-17 21:11:47 -06:00
Carlos Lopez 5ce279b663 Dropping silly pdb statement 2020-06-17 17:36:15 -06:00