mike cullerton
e2e35b673d
Moved data store code from script to service
2021-06-02 09:59:41 -04:00
Dan Funk
4d7ce5eda9
Merge pull request #311 from sartography/deprecate-study-info-protocol-261
...
Deprecate study info protocol #261
2021-05-14 14:14:18 -04:00
mike cullerton
d189b84ba1
Removed `protocol` as an option in the study_info script
2021-05-13 16:22:42 -04:00
mike cullerton
5efb1a72ce
Changed URL to use HTTPS instead of HTTP
2021-05-06 15:52:27 -04:00
mike cullerton
09a395fa34
Start for ticket 230 - Get Dashboard URL
2021-05-06 14:07:21 -04:00
Dan
620b9a5188
Fixing a regression. It's critical that Spiffworkflow's box implement deepcopy, as this is used by Jinga prior to generating a word document.
2021-05-05 21:36:57 -04:00
Dan Funk
8b0afa4437
Merge pull request #304 from sartography/irb-info-script-307
...
Irb info script #307
2021-05-04 11:40:52 -04:00
Dan Funk
4780240103
Merge pull request #302 from sartography/320-add-default-for-file-data-get
...
Add default capability to file_data_get script
2021-05-04 11:28:40 -04:00
Dan Funk
d6054a9846
Merge branch 'dev' into 310-task-event-timezone
2021-05-04 11:21:36 -04:00
mike cullerton
7689281d68
Fixed typo. Response should be list, not dict.
2021-05-03 14:52:29 -04:00
mike cullerton
060ee5076d
New script to get IRB Info for a study
2021-05-01 15:52:41 -04:00
Kelly McDonald
7608a889fb
Add default capability to file_data_get
...
script
2021-04-30 10:11:50 -04:00
Kelly McDonald
2b9cee6b89
Update database to include timezone and change all points where we set the time on an event to be utc time. If we get something in the database with a timezone, it will display properly on the front end, but by default everything will be put in the database in UTC
2021-04-29 10:25:28 -04:00
Kelly McDonald
dc6f1cc80d
Emulate checks on keyword arguments and then return. Validate only should have no side effects so the previous behavior was a bug.
2021-04-28 10:03:52 -04:00
Kelly McDonald
40ee20ecca
Add file_data_get and file_data_set functions that can be accessed in a bpmn script function
...
Fixes #299
2021-04-26 09:55:28 -04:00
Kelly McDonald
d3d7eeb309
Add file_data_get and file_data_set functions that can be accessed in a bpmn script function
...
Fixes #299
2021-04-26 09:41:14 -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
f8428378e2
You can now delete a document or list of documents.
...
Also, refactored the fancy bits into `process_document_deletion`
2021-04-05 15:11:06 -04:00
mike cullerton
f0f5cff8d7
Added some checks to do_task to look for valid irb_doc_code and whether or not we found a file
...
Added code for do_task_validate
2021-04-05 13:15:09 -04:00
Dan
4fd8fd13f8
Remove approvals from the study_info script. It was broken, and isn't really possible in this way anymore
2021-04-05 12:52:23 -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
0eb6291740
Script to delete an IRB document. Takes an `irb_document` argument.
...
Deletes all files associated with the workflow with that IRB document code
2021-04-05 08:55:02 -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
123ec50912
Merge pull request #272 from sartography/infinite-validations-262
...
Infinite validations 262
2021-03-26 19:49:42 -04: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
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
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
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
7171219e8b
removed unused import
2021-03-09 07:00:20 -05:00
mike cullerton
44ac55bc32
We can now send emails to users associated with a study, by using 'associated' as the recipient
...
We now use keyword arguments in the email script; subject and recipients
2021-03-09 06:49:39 -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
Dan Funk
3e0541fa15
Merge pull request #250 from sartography/206-extend-study-access
...
206 extend study access
2021-03-01 14:55:38 -05:00
mike cullerton
5c3d791bf3
UVA asked us to remove the extra whitespace in emails.
...
We removed the string replacement of '\n' -> '<br>' to solve this.
This means you can't purposely add blank lines any more.
Trade offs.
2021-02-25 11:08:08 -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
Kelly McDonald
c795dd7aea
Merge branch 'dev' into 206-extend-study-access
2021-02-24 12:16:35 -05:00
Kelly McDonald
3dbe39c6fe
initial checkin of changes for branch
2021-02-24 12:05:06 -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
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