mike cullerton
1247744463
Test and workflow for new code.
2021-02-03 09:50:37 -05:00
mike cullerton
b090e31e00
This fixes 2 issues with setting boolean defaults
...
- If the default was False, we failed an early test and returned None. We now only return None if default is None
- We have a better test for deciding if the default value we return should be True or False. We used to return True if the value was the string 'false'.
2021-02-03 09:50:16 -05:00
mike cullerton
6f7abc0a97
Added tests to test_workflow_restart to make sure we call cancel_notify events when appropriate.
2021-01-29 14:48:35 -05:00
mike cullerton
c5cf3ea7ff
Changed call to WorkflowProcessor.reset to reflect change from class method to instance method.
2021-01-29 14:34:09 -05:00
mike cullerton
f9e4b6a972
Test and workflow for the new code. We test the correct cancel notify is called, and only when appropriate.
2021-01-29 14:09:42 -05:00
mike cullerton
c026717b4a
Changed the call to WorkflowProcessor.reset to reflect the change from class method to instance method
2021-01-29 14:06:25 -05:00
mike cullerton
7e76639cf3
When a study is put on hold, we now reset workflows and call any pending cancel_notify events.
...
In api.study.update_study we test the study status and call the new WorkflowService method process_workflows_for_cancels.
In services.workflow_service we added the new method process_workflows_for_cancels. It loops through workflows for a study, and resets them if they are in progress.
In services.workflow_processor, we changed the reset method to be an instance method so we can call self.cancel_notify.
In tests.test_lookup_service we changed the call to WorkflowProcessor.reset to reflect the change from class method to instance method
2021-01-29 14:05:07 -05:00
mike cullerton
83632c64de
added exclusion for email template in sonarcloud properties file.
2021-01-28 10:42:15 -05:00
mike cullerton
958d5a6281
Possible solution for W3C issues raised by Sonarcloud
2021-01-28 09:45:53 -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
Dan Funk
328de0e584
Merge pull request #228 from sartography/dev
...
Dev to Test
2021-01-27 11:32:00 -05:00
mike cullerton
7b91fb9f61
Modified test to check for display_order within workflow category.
2021-01-27 11:08:28 -05:00
Dan Funk
cccb722e07
Merge pull request #226 from sartography/enum_default_value_expression_162
...
Enum default value expression 162
2021-01-27 10:43:46 -05:00
mike cullerton
420ef0b2b0
Test and data for cleaning up my smell. We now test explicitly whether a task has both a default_value and value_expression. If so, we raise an error.
2021-01-27 10:22:43 -05:00
mike cullerton
81e55b6055
Cleaning up my smell. A task should only have default_value *or* value_expresion, not both.
2021-01-27 10:21:13 -05:00
mike cullerton
c99a388405
We now set the display_order automatically. Users can modify order using the arrows.
2021-01-27 09:50:29 -05:00
Dan Funk
98f946c119
Merge pull request #227 from sartography/missing_form_key_163
...
Missing form key 163
2021-01-27 09:42:46 -05:00
Dan Funk
691b779a0c
Merge pull request #223 from sartography/152-workflow-spec-pull
...
152 workflow spec pull
2021-01-27 09:39:09 -05:00
mike cullerton
e72be4a217
Needed to define SERVER_NAME so get_url worked properly. Made the port into a constant in config.default so I can import it into config.testing.
...
Dan, I'm not sure this is the best approach. Let me know if you want something different.
2021-01-26 09:35:35 -05:00
mike cullerton
ecc553c4ea
Jinja templates and svg file for pretty emails
2021-01-26 09:20:16 -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
d01f8e1018
This workflow had a form with a missing form key, so it's associated test failed after my changes in this ticket. I added a form key to the form. Test now passes.
2021-01-22 12:16:02 -05:00
mike cullerton
2438779470
Test and workflow file for missing form key. Ticket 163
2021-01-22 12:14:59 -05:00
mike cullerton
b71fd93dd4
We now make sure that forms have a form key. Ticket 163
2021-01-22 12:14:17 -05:00
mike cullerton
1ee6a11d46
Test and associated data files for setting enum default values from value_expression. Ticket 162
2021-01-22 10:01:20 -05:00
mike cullerton
00d9276483
In spiff_task_to_api_task, when looping through fields, if the field doesn't have a value, we now try to set it with the default value
...
In test_spec, we now check for FIELD_PROP_VALUE_EXPRESSION when setting default values
2021-01-22 10:00:28 -05:00
Dan
5921ce9f10
Merge branch 'dev' into 152-workflow-spec-pull
2021-01-21 12:30:43 -05:00
Dan Funk
c60754155f
Merge pull request #225 from sartography/dev
...
dev to testing
2021-01-20 17:49:40 -05:00
Dan Funk
5b13195182
Merge pull request #224 from sartography/restart-with-no-data-99
...
Restart with no data 99
2021-01-20 17:22:18 -05:00
Dan
41dac33039
Removed two tests around soft_reset that are no longer required.
...
Reset should construct the workflow_processor, thus completing the reset process.
Removed the spec argument from init, as it is never used anywhere.
2021-01-20 13:24:53 -05:00
Dan
6a7ee09a5d
Updating the readme file.
2021-01-20 11:00:41 -05:00
mike cullerton
27a8383898
Not sure about this one. We no longer support the task this test is testing (soft_reset). I commented out that part of the test. We can discuss, if necessary.
2021-01-19 15:44:11 -05:00
mike cullerton
61d366c111
Fixed hard_reset test. Now we reset the workflow and run do_engine_steps
2021-01-19 15:39:59 -05:00
mike cullerton
61b34fd6f4
Fixed hard_reset test. We now call restart_workflow_api.
2021-01-19 15:34:46 -05:00
mike cullerton
1b18b53107
Fixed hard_reset test. We now call restart_workflow_api.
2021-01-19 15:32:38 -05:00
mike cullerton
bfb3871671
Added method for restart_workflow_api. Pulled out some common code with get_workflow_api.
2021-01-19 15:27:44 -05:00
mike cullerton
9281a93abb
New test for new restart_workflow endpoint
2021-01-19 15:15:44 -05:00
mike cullerton
039a1dcd79
WorkflowProcessor code for new restart_workflow api endpoint. WorkflowProcessor.reset will clear workflow_model.bpmn_workflow_json, and if clear_data is True will clear form data.
...
WorkflowProcessor.__init__ is mostly unchanged.
2021-01-19 15:14:36 -05:00
mike cullerton
9c71a503ca
Python code for new restart_workflow api endpoint. Cleaned up code and docstring in get_workflow to match.
2021-01-19 15:09:20 -05:00
mike cullerton
e1532a90c9
New api endpoint for restarting a workflow. Unsure if I needed the responses section. **Dan, can you check this?**
...
Also, removed clear_data and reload_spec as parameters for standard get workflow endpoint.
2021-01-19 15:00:39 -05:00
mike cullerton
6a9e6d3570
Restart workflow without form data. Committing so Dan can check it out
2021-01-14 15:32:14 -05:00
mike cullerton
99c1d1b129
Test for changes to hard_reset and soft_reset
2021-01-13 16:12:14 -05:00
Kelly McDonald
442a4524c4
Test for new functionality and code coverage
2021-01-12 10:18:35 -05:00
Kelly McDonald
cf7990ce85
Refactor for better readability due to code smell test
2021-01-12 08:54:32 -05:00
Kelly McDonald
abc17add89
file order was not deterministic - alter test to make sure we updated the 'right' file rather than relying on ordering
2021-01-12 08:54:15 -05:00
Dan Funk
3056fe28e1
Merge pull request #222 from sartography/dev
...
dev to testing
2021-01-11 14:18:46 -05:00
Kelly McDonald
e14b896225
Add documentation
2021-01-11 09:31:08 -05:00
Kelly McDonald
f282a9ef73
Make sure that top_level_workflow is transferred over, also include reference files in the list of files to sync
...
We may want to revisit this because I used a 'Magic' workflow_ref_id of 'REFERENCE_FILES' as a special case so I could re-use most of what I already had. This works well, but we may want to structure it different.
2021-01-11 09:21:44 -05:00
Dan
336c093bf8
Catch errors when building enumeration lists.
2021-01-08 15:15:24 -05:00
Dan Funk
4bb4a93161
Merge pull request #221 from sartography/validate-form-field-names-96
...
We now check form field IDs so they play well with Python and Javascript
2021-01-08 14:42:54 -05:00