Commit Graph

249 Commits

Author SHA1 Message Date
Dan 8ec58fd6d7 Assure better error messages when parsing word documents with jinja syntax.
I also have a pull request into the folks that run the python docx library to improve their error messages that we depend on here.
2021-11-23 14:38:48 -05:00
Dan 4a1285b8e0 When validating a workflow, don't run the master workflow multiple times, its a huge waste of time.
Provide decent data when calling get_study_associate(s) scripts.
2021-11-22 17:17:19 -05:00
Dan 12b78c1f99 Value Errors should also alert us that we can't serialize the json.
Enum Label was depending on the options attribute not existing in some situtations, which is a bad assumption.  Rather, check for specific properties, and call back to using options as the default.
2021-11-22 12:37:10 -05:00
Dan 4d1f4429ff Fixing a bug in enum_label that was not working when lookup up an select list from a spreadsheet.
Assure we raise more thoughtful error messages when running getting exceptions in engine tasks.
Field Options should always be available now due to a fix in Spiffworkflow.
2021-11-22 12:26:30 -05:00
mike cullerton a8b7cd8bba Merge branch 'dev' into test-protocol-builder-519 2021-11-10 16:32:34 -05:00
Dan d1eae3c15a Validation was failing for enum_label() expressions when called within a sub-process. Possible (but unlikely) that this would occur outside validation. 2021-11-09 12:55:06 -05:00
mike cullerton d186b24de3 UVA PB returns the info in a list. We want the dictionary in the list 2021-11-05 14:26:21 -04:00
Dan Funk 3a36a48b88
Merge pull request #418 from sartography/convert-timestamp-499
Added ordered arguments to the get_localtime script #499
2021-11-03 14:28:57 -04:00
mike cullerton 1f9c80d70d Added ordered arguments to the get_localtime script
Modified the workflow so the first task is a form with booleans that allows me to test all the permutations.
Modified tests to cover all the permutations for calling the script
2021-11-03 08:36:24 -04:00
mike cullerton 47ead5ab45 Fixed validation bug.
There is no element documentation available in the task, so we mock up the email content.
2021-11-02 10:00:41 -04:00
Dan Funk c4f3a3ad0d
Merge pull request #413 from sartography/logging-script-513
Logging script #513
2021-11-01 15:41:38 -04:00
mike cullerton 5e569b9167 Unused imports 2021-10-27 17:19:27 -04:00
mike cullerton 81bb0013c8 Doh 2021-10-27 17:15:49 -04:00
mike cullerton c76d8230c0 Cleaned up validation 2021-10-27 17:03:27 -04:00
mike cullerton 6322353c88 Scripts to retrieve logging information 2021-10-27 16:39:25 -04:00
mike cullerton c61fad752f Bug fix 2021-10-27 16:38:36 -04:00
mike cullerton e783da00af Script to add a log message from a task.
Also added `*args` to the definitions for `do_task` and `do_task_validate_only` to the main script file. (These are the methods we overwrite in scripts.)
2021-10-27 12:21:38 -04:00
mike cullerton b252d11eb5 Merge branch 'convert-timestamp-499' of https://github.com/sartography/cr-connect-workflow into convert-timestamp-499
# Conflicts:
#	crc/scripts/email.py
2021-10-26 15:39:38 -04:00
mike cullerton a65c104a0b To validate get_email_data 2021-10-26 15:27:24 -04:00
Mike Cullerton 45fd317dc6
Merge branch 'dev' into convert-timestamp-499 2021-10-26 14:35:33 -04:00
mike cullerton f88aba1db0 Cleanup validation for get_locatime.
Make sure we send the same type of values back for validation.
2021-10-26 14:29:38 -04:00
Dan 1e1da2292b fixing a stupid mistake. 2021-10-26 13:36:38 -04:00
Dan d2799a758e Merge branch 'refactor/enums_as_key_value' into dev 2021-10-26 13:02:36 -04:00
Dan d0446cbc8a A quick fix to enum_label script. 2021-10-26 12:59:43 -04:00
alicia pritchett 7959f8ca3f
Merge pull request #405 from sartography/refactor/enums_as_key_value
Death to enumerated dictionaries
2021-10-25 15:17:17 -04:00
mike cullerton 7e3c47f8bf Added timestamp, and now return a schema just like the do_task method 2021-10-22 12:52:43 -04:00
Dan Funk 61e51e736f
Merge pull request #408 from sartography/jinja-complete-template-508
Jinja complete template #508
2021-10-21 14:22:00 -04:00
Dan Funk 36d30f23a1
Merge pull request #407 from sartography/jinja-include-403
Jinja include #403
2021-10-21 14:20:04 -04:00
Dan Funk 2ef03b0c79
Merge pull request #406 from sartography/convert-timestamp-499
Convert timestamp #499
2021-10-21 14:12:59 -04:00
Dan 84ce24243f add an enum_label script that will return the label given a value selection. 2021-10-21 13:57:49 -04:00
mike cullerton 3619240bae Move the parts for using Word documents as Jinja templates into JinjaService 2021-10-21 10:29:56 -04:00
mike cullerton 3291ea8cb0 Unused imports 2021-10-20 14:04:45 -04:00
mike cullerton 073875aa51 Put this back the way it was 2021-10-20 13:56:09 -04:00
mike cullerton 8fd55565a4 Move changes to another branch 2021-10-20 13:11:06 -04:00
mike cullerton 7d48fa6b31 The get_localtime script now returns a datetime object instead of a string.
Validation also returns a datetime object instead of boolean
2021-10-20 12:15:45 -04:00
mike cullerton 45e119a435 Changed validation to return an email_model, so it can be used in further validation 2021-10-20 12:14:16 -04:00
mike cullerton e707783cea *** WIP ***
committing changes to work on another ticket.
Still need to figure out the complete_template piece
2021-10-20 09:21:45 -04:00
mike cullerton 1c02928d04 Merge branch 'dev' into jinja-include-403 2021-10-19 10:09:18 -04:00
mike cullerton d84625c51e Merge branch 'convert-timestamp-499' into email-attachment-error-503
# Conflicts:
#	tests/emails/test_email_script.py
2021-10-18 17:08:56 -04:00
mike cullerton 0122029e30 *** WIP ***
Migrating the complete_template script stuff to JinjaService.
Having trouble with the tools stuff.
Pulled back to spot where test pass using CompleteTemplate
2021-10-18 16:56:03 -04:00
mike cullerton 8de05b8fb6 Don't process attachments if argument is None or ''
This can happen during workflow processing
2021-10-18 11:19:56 -04:00
mike cullerton f9856d68a9 complete_template works a little different.
It uses a Word doc as the Jinja template
Need to decide what to do about this case
2021-10-16 14:22:07 -04:00
mike cullerton c2c79bd014 Convert UTC datetime object to a different timezone.
JSON doesn't know about dates, so we have to return a string
2021-10-14 11:02:16 -04:00
mike cullerton 1ef063de37 Merge branch 'email-cleanup-498' into convert-timestamp-499 2021-10-13 15:50:01 -04:00
mike cullerton 8015d35424 Script to get localtime from a UTC datetime 2021-10-13 15:36:37 -04:00
mike cullerton e72cf27fe3 Return email model from email script. 2021-10-13 11:41:44 -04:00
mike cullerton 32aa1fba85 Change workflow_id to workflow_spec_id
We can use workflow_spec_id along with study_id to get a group of emails
2021-10-12 13:44:36 -04:00
mike cullerton 63df614f41 Change workflow_id to workflow_spec_id 2021-10-12 13:43:29 -04:00
mike cullerton 24932072dc Merge branch 'dev' into email-data-script-487 2021-10-07 12:30:13 -04:00
mike cullerton 826b98a6ea Can't use workflow_id, because that conflicts with the id of the current workflow (that we pass in to every script) 2021-10-07 12:10:37 -04:00