1065 Commits

Author SHA1 Message Date
Dan
1e9c9919c2 hot fix, missed a critical part of the jinja include syntax when identifying included templates 2022-03-09 11:03:42 -05:00
Dan
ce57a3753a fixing some comments and error messages for clarity 2022-03-09 10:28:22 -05:00
Dan
41b5106a28 patching up the tests.
Looks like we want to use default values, if they are provided, for validation. So good test, and I didn't have to create a new bug.  Also added skipping the test about requiring a default for hidden+required fields.  Maybe we don't need to after all.
2022-03-08 18:38:05 -05:00
Dan
26eeb2912a Only run the form validation stuff if we have a form.
If there is a default value, use it, regardless of whether the form is hidden (this is how the front end works)
  (accomplished by moving the hide_epxression check -> continue stuff below the set default_value code)
2022-03-08 18:13:54 -05:00
Dan
b03e24bbf4 Properly handle forms where a field is required, based on a later field.
Do an aboutface on saying that if a field is required but hidden, it has to have a default value.  I'm just commenting this out for now, as it made getting these workflows to validate bloody impossible.
Clean up the replication of code for identifying required fields (as it wasn't consistently applied)
Removing some very broken and apparently unused methods.
2022-03-08 17:36:13 -05:00
Dan
0a906a4b3c Cleaning up Print Statements (it was making it hard to see what was happening)
The Jinja2 service was treating all the task data as a possible template, modified it to only include the referenced templates.
(This turned out not to be the problem, but it seems like a good idea to keep it in place)
There is a terrible bug with the wordwrap pipe that will die without any details if you pass it a value of None.  We now cature the terrible error, and replace it with a sensible one.
Removed an unused Jinja_extensions file.
2022-03-08 15:46:36 -05:00
Dan Funk
3f82cdae48
Merge pull request #485 from sartography/bug/validating-associates-659
Bug/validating associates #659
2022-03-07 14:20:20 -05:00
Dan Funk
eae0b5286e
Merge pull request #483 from sartography/chore/study-status-changes-653
Chore/study status changes #653
2022-03-07 14:20:05 -05:00
Dan Funk
0b3fa781c5
Merge pull request #484 from sartography/bug/bleeding_data
Loading latest chages from Spiff whic refactored the way the PythonEx…
2022-03-07 10:22:36 -05:00
mike cullerton
ebaf857a14 Tests for using study in get_study_associates 2022-03-04 16:28:42 -05:00
Dan
0455506e2b Loading latest chages from Spiff whic refactored the way the PythonExpressionEngine works.
This cleans up the _evaluate method which previously accepted arbitrary args and kwargs, and now requires an expression, a context to which exectute it, and, optionally, the current task being executed if the DMN is being executed as a part of a BusinessRuleTask in a BPMN diagram.

This also cleans up several bits of duplicated code.

There is also a bit of code here to assure that the current user is included when running the master workflow.
2022-03-04 15:34:36 -05:00
mike cullerton
0ad12f9c85 Test for set_study_status script 2022-03-03 11:11:54 -05:00
mike cullerton
2cfe1b331c Merge branch 'dev' into git-integration-596 2022-03-02 15:29:27 -05:00
mike cullerton
83e2370778 The frontend passes '' instead of None
Also, tests for the new button display variables
2022-03-02 13:33:22 -05:00
mike cullerton
9c0b5b9e16 Test for new feature 2022-03-01 16:17:34 -05:00
Dan Funk
896ce8934b
Merge pull request #477 from sartography/bug/645_document_updated
An optimization prevented us from picking up a change to the document…
2022-02-28 15:57:13 -05:00
mike cullerton
2ab3df2466 Force an error during test_spec, to make sure we clean up workflows 2022-02-28 14:02:26 -05:00
Dan
51a14311eb An optimization prevented us from picking up a change to the documents associated with a study. This assures that even if scripts run side by side, the document list will get updated, but only on a change. So it's still performant. Also added a sligthly better error message to the workflow service. 2022-02-28 12:17:21 -05:00
Dan Funk
9b004d0dc6
Merge pull request #462 from sartography/feature/delete-variable-script-584
Feature/delete variable script #584
2022-02-25 16:19:51 -05:00
mike cullerton
2c427cc34c Temporary fix for variable issue in SpiffWorkflow.
There is a fix coming in SpiffWorkflow
2022-02-25 15:56:13 -05:00
mike cullerton
f2c97f80d5 Merge branch 'dev' into feature/delete-variable-script-584
# Conflicts:
#	Pipfile.lock
2022-02-25 15:54:34 -05:00
Dan Funk
140de7ed03
Merge pull request #473 from sartography/nonetype-displayname-error-632
Nonetype displayname error #632
2022-02-25 15:41:14 -05:00
mike cullerton
bfcfedbffc Test for the bug fix 2022-02-25 14:43:32 -05:00
Dan Funk
18802d6732
Merge pull request #468 from sartography/chore/performance
Performance Improvements:
2022-02-25 12:10:47 -05:00
Dan Funk
dd7eddb936
Merge pull request #470 from sartography/update-email-reply-address-629
Modify default sender for emails #629
2022-02-25 10:30:21 -05:00
Dan Funk
b6af80f6de
Merge pull request #469 from sartography/feature/modify-spreadsheet-624
modify spreadsheet #624
2022-02-25 10:29:37 -05:00
Dan Funk
5ff84d74f1
Merge pull request #464 from sartography/feature/start-workflow-602
Feature/start workflow #602
2022-02-25 10:28:26 -05:00
mike cullerton
10880d6354 Modify default sender for emails 2022-02-25 08:38:40 -05:00
mike cullerton
9d2436b375 Typo calling script with keywords 2022-02-25 08:18:07 -05:00
Dan
3442655bd1 Performance Improvements:
1. Avoid ever re-generating the list of scripts that can be used in a script task.  Terribly expensive as we call eval constantly, and it never ever changes once the app starts. (see script.py changes, and comments)
2. Cache the DocumentStatus list in the flask session, so we calculate it at most once per API Call.  It's at least .25 seconds per call.  (see study_sevice)
3. We called UserFileService.get_files_for_study (which runs a db query EVERY time) for every possible document type.  Now we run the query once (study service line 321)
4. When returning a workflow, we looped through every single task in that workflow's navigation, and called the expensive spiff_task_to_api_task just to figure out it's proper display name. We run a much faster and more efficient method to calculate the display name naow (see workflow_service on lie 680, and 799)
5. A hellton of @timeit and sincetime() calls, that I want to leave in, to help debug any slowness on production.
2022-02-24 14:25:42 -05:00
mike cullerton
ed0499a573 Make sure we have a workflow.
Raise an ApiError with the workflow_spec_id if we cannot find a workflow
2022-02-24 12:37:25 -05:00
mike cullerton
e1bd301e41 Merge branch 'dev' into feature/start-workflow-602 2022-02-24 10:36:38 -05:00
mike cullerton
0b3187889d We now raise an error if the spreadsheet does not exist.
Added test for case where the spreadsheet does not exist
2022-02-24 10:25:34 -05:00
mike cullerton
1fe1ce2e22 Merge branch 'dev' into feature/modify-spreadsheet-624 2022-02-24 09:42:53 -05:00
Dan Funk
e8617038ab
Merge pull request #461 from sartography/bug/missing-executabe-option-601
Bug/missing executabe option #601
2022-02-24 08:46:46 -05:00
mike cullerton
d378078d6f Change so that we always use the current workflow 2022-02-23 15:18:03 -05:00
mike cullerton
679a875666 Test for new script 2022-02-23 14:30:45 -05:00
mike cullerton
2aea4bc1ae Test for new script 2022-02-22 14:37:53 -05:00
Dan
9fc8158903 Merge branch 'feature/delete-variable-script-584' of github.com:sartography/cr-connect-workflow into feature/delete-variable-script-584 2022-02-21 14:30:41 -05:00
Dan
65ffc37787 fixing a bug in Spiff that was preventing our tests from passing. 2022-02-21 14:30:36 -05:00
mike cullerton
017f228dd9 Cleanup - create name for reused data 2022-02-21 14:01:35 -05:00
mike cullerton
6ec7241a7b Test for new script 2022-02-21 12:55:33 -05:00
mike cullerton
1cd3be70a7 Test for bug fix 2022-02-21 10:17:18 -05:00
alicia pritchett
70fc9451a4 fix tests (update BPMNs)
test_stupid_slow_file_upload_form still fails
2022-02-21 09:44:00 -05:00
Dan
a7f591d2ac Merge branch 'dev' into chore/variables-in-forms-550 2022-02-18 17:19:01 -05:00
Dan
b90be07bca Remove these bloodly log files from the repo. 2022-02-18 11:40:10 -05:00
Dan
e91be2a54d Merge branch 'dev' into chore/variables-in-forms-550 2022-02-18 11:27:58 -05:00
Dan
635a112796 still trying to fix a rogue test. 2022-02-18 10:41:24 -05:00
Dan
6adf1107fe Trying to figure out why these files are not the same on testing. 2022-02-18 10:12:36 -05:00
alicia pritchett
753534c4cd Remove boolean tests
It could only be True or False now. And again this should be a frontend test now
2022-02-18 10:09:24 -05:00