Dan
b7489aea43
merging in PI Name changes from Alicia's #499 PR.
2022-03-18 12:30:20 -04:00
alicia pritchett
b9b8210f8a
rm pi id refs
2022-03-18 12:04:20 -04:00
alicia pritchett
f4cade1b44
remove pi id
2022-03-18 11:58:39 -04:00
alicia pritchett
b6b28ed127
fix tests remove pi id
2022-03-18 11:56:56 -04:00
mike cullerton
d4a1b8ad3b
We didn't return the value for do_task_validation_only
2022-03-18 11:32:37 -04:00
alicia pritchett
12a0e26ee1
Include the PI name on the study model
2022-03-18 11:03:06 -04:00
Dan
ef5aca4fe4
ReviewType now comes back with the user studies, so we don't need to make an additional query to get it.
2022-03-18 09:59:10 -04:00
mike cullerton
276924960b
Merge branch 'dev' into chore/fix_validation_errors
2022-03-18 08:36:03 -04:00
alicia pritchett
2ab96b16a0
Update the study model to include a progress (integer)
2022-03-17 17:20:42 -04:00
mike cullerton
890f849cf2
Only DATELASTMODIFIED can be empty, not DATECREATED
2022-03-17 15:54:21 -04:00
mike cullerton
15750beb10
Added a comment on why we moved the session.add(study) line
2022-03-17 15:18:49 -04:00
mike cullerton
db6f594ba9
Allow for missing data
2022-03-17 15:18:06 -04:00
mike cullerton
a578cf2498
Some studies don't have a DATELASTMODIFIED, so we use DATECREATED instead
2022-03-17 14:50:47 -04:00
mike cullerton
be2b7c07ef
add the new study to the session after we run update_from_protocol_builder
2022-03-17 14:29:38 -04:00
alicia pritchett
9b1a7ff286
Fixes #668 - Cancel/Notify Called when loading last task
...
don't call cancel notify if its an end event
2022-03-17 10:58:25 -04:00
mike cullerton
69b5d80b23
Included templates wrapped by if clause don't always exist
...
Don't raise an error here
2022-03-16 16:57:26 -04:00
mike cullerton
9a345da763
typo
2022-03-16 16:54:36 -04:00
alicia pritchett
c18bc6f876
fix study service
2022-03-16 16:21:02 -04:00
alicia pritchett
5b7e71d42d
meta field for categories
2022-03-16 12:49:35 -04:00
Dan
1506952df7
task_trace was a little mixed up in the errors.
2022-03-16 10:18:50 -04:00
alicia pritchett
829c810807
wip
2022-03-15 13:21:58 -04:00
alicia pritchett
37d92c6a5f
WIP ~ adding a category metadata object
2022-03-15 10:49:41 -04:00
Dan Funk
791ab20f8c
Merge pull request #494 from sartography/chore/fix_validation_errors
...
Chore/fix validation errors
2022-03-14 16:51:27 -04:00
Dan Funk
8ea8993421
Merge pull request #493 from sartography/jinja-included-includes-670
...
Jinja included includes #670
2022-03-14 16:49:56 -04:00
Dan
483d7e858b
Improved Errors - Pick up on the new task_trace information in WorkflowException and pass it on through the api.
...
Also: All script tasks should raise WorkflowTaskExecExceptions - NOT APIExceptions - this is because our scripts are executed by Spiff (not the other way around) so the errors need to pass fluidly through spiff, and come back to use THEN we can convert them to APIErrors. Otherwise we lose all kinds of good information about the error.
2022-03-14 16:00:53 -04:00
mike cullerton
416adcbe69
Recursively parse the included templates
2022-03-14 13:51:41 -04:00
mike cullerton
a974b65333
Remove unused code
2022-03-14 12:03:11 -04:00
mike cullerton
3b049e358d
Remove unused imports
2022-03-14 12:02:48 -04:00
mike cullerton
a6a98bed10
Include workflow_spec_id when adding a log
2022-03-14 11:56:36 -04:00
Dan
90bfbed6fd
Merge branch 'dev' into chore/fix_validation_errors
2022-03-14 10:58:01 -04:00
Dan
dec63839f3
Merge remote-tracking branch 'origin/dev' into chore/log-changes-661
2022-03-12 16:19:23 -05:00
Dan
2fc4b44ef3
Create a path to directly download the spreadsheet file (and avoid the weird dance on the front end of making an API call to get file data.)
...
Fixing pagination. Seems the front end uses a page_index that is 0 based, and sqlAlchemy prefers to start at 1.
2022-03-12 16:19:07 -05:00
mike cullerton
015eeccb54
Change API endpoint to a GET
2022-03-12 14:23:22 -05:00
Dan
4e9fe3a6bb
Merge branch 'dev' into chore/fix_validation_errors
2022-03-12 14:09:40 -05:00
Dan
4ab314c7b8
Be sure to delete the data store items when you delete a study.
2022-03-12 13:38:09 -05:00
Dan
52b5e1d34a
Fixing tests.
2022-03-11 18:02:37 -05:00
alicia pritchett
4f0b9e3c4f
Adds 2 new study progress statuses
2022-03-11 15:40:13 -05:00
mike cullerton
b753f06394
Changes to remove pagination for the get_logs scripts.
...
We only use pagination for the get_logs_for_study API endpoint. (Used on the study page)
2022-03-11 14:03:09 -05:00
mike cullerton
1bfe656817
Remove unused API endpoint to get logs for a workflow.
...
We have a script for this that is used (in workflows)
We do use the API endpoint to get logs for a study. (On the study page)
2022-03-11 14:01:06 -05:00
mike cullerton
733e596283
rename get_logs to get_logs_for_workflow to better represent what it does
2022-03-11 13:58:25 -05:00
mike cullerton
356a322e85
Merge branch 'dev' into chore/log-changes-661
2022-03-11 08:50:13 -05:00
Dan Funk
2d5517bd15
Merge pull request #487 from sartography/chore/update-get-workflow-status-664
...
Chore/update get workflow status #664
2022-03-10 14:30:32 -05:00
Dan
d90bf1c977
always but always return a valid status.
2022-03-10 14:28:47 -05:00
Dan
5990f37183
Making the run-all-validations easier to work with.
2022-03-10 13:18:22 -05:00
mike cullerton
d57d741c10
Added TODO
2022-03-10 12:17:32 -05:00
mike cullerton
423426c2c8
Removed some unused imports
...
Finished up get_all_logs_for_download
2022-03-10 12:14:14 -05:00
mike cullerton
9efb4c4fb3
New spreadsheet_service.
...
Accepts list of dictionaries, and optional headers and title
Creates spreadsheet from list of dictionaries
Returns the spreadsheet as a binary stream
2022-03-10 12:13:10 -05:00
mike cullerton
2224e34a94
Remove unused imports
...
Finish up download_logs_for_study
2022-03-10 12:10:54 -05:00
Dan
c55cc4715d
Fixing a bug that would cause us to evaluate the wrong field almost all of the time.
...
We looped over all the other fields in the task, to assure they at least had a null value, but in doing so, we overwrote the variable containing the field we were trying to test.
2022-03-09 15:26:29 -05:00
mike cullerton
42f430673d
Add metrics to TaskLogLevels
2022-03-09 14:54:56 -05:00
mike cullerton
bf31364b1f
*** WIP ***
...
Committing to fix logging so we can use a level of 'metrics'
2022-03-09 13:07:56 -05:00
mike cullerton
6ec01a0a85
Merge branch 'dev' into chore/log-changes-661
2022-03-09 11:27:13 -05:00
mike cullerton
bbd12da472
Use workflow_spec_id instead of workflow_id, since workflows can be deleted
...
I simplified do_task_validation since we get a random string for the workflow_spec_id
2022-03-09 11:14:54 -05:00
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
e3c1a908fe
A better comment around a tricky part of the code.
2022-03-09 09:43:08 -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
mike cullerton
8cab382926
The task log model expected has_prev instead of has_previous
2022-03-08 16:52:37 -05:00
mike cullerton
c2035b7b40
Add workflow_spec_id to task_log model. This is because workflows can be deleted, so workflow_id is not dependable.
...
Add workflow (display_name) and category (display_name) to TaskLogModelSchema. We display these to the user on study home page in the logs.
2022-03-08 16:45:19 -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
mike cullerton
eb7548ea0f
Use the actual enum values so we don't have to deal with this the next time we make a change to study status
2022-03-07 13:28:29 -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
30f68eb831
If we receive a study_id during validation, return the associates for the study
2022-03-04 16:27:33 -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
027e436546
Cleaned up the description
2022-03-03 11:49:45 -05:00
mike cullerton
c6484f7bdb
Remove print statement
2022-03-03 11:28:21 -05:00
mike cullerton
2cfe1b331c
Merge branch 'dev' into git-integration-596
2022-03-02 15:29:27 -05:00
mike cullerton
3920444acf
*** WIP ***
...
Need to create a migration and some tests.
2022-03-02 15:26:21 -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
Dan Funk
84c420346d
Merge pull request #481 from sartography/feature/add-jinja-to-help-576
...
Feature/add jinja to help #576
2022-03-02 12:33:21 -05:00
Dan
a74ae647d6
Do not send cancel events if you are navigating to the current task.
2022-03-02 12:24:03 -05:00
mike cullerton
cb65a7dc41
Add booleans for displaying push/merge buttons
...
*** WIP ***
Still need to add some tests for this.
Committing so we can work on the frontend
2022-03-02 12:03:08 -05:00
Dan Funk
07e13584e7
Merge pull request #479 from sartography/nonetype-displayname-error-632
...
Clean up error message in test_spec
2022-03-01 16:20:20 -05:00
Dan Funk
cf77480803
Merge pull request #480 from sartography/bug/no-assignment-tasks-639
...
Fixes #650 - Approvals not Clearing When Completed
2022-03-01 16:19:51 -05:00
mike cullerton
5ef2905d3c
Add Jinja templating to form field help
2022-03-01 16:17:02 -05:00
mike cullerton
6da23dc854
Clean up error message in else clause in test_spec
2022-03-01 14:58:53 -05:00
alicia pritchett
e416873916
Fixes #650 - Approvals not Clearing When Completed
2022-03-01 14:45:18 -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
Dan
91ed50e45e
Be sure we update the document list when new workflow documents are added.
2022-02-28 15:49:21 -05:00
mike cullerton
ef4334b1c8
Added a catch for generic exceptions, so the `finally` clause always executes.
...
Also, raise if there is an ApiError, because some tests depend on it.
2022-02-28 14:01:19 -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
1dfebf9f1f
Merge pull request #476 from sartography/bug/no-assignment-tasks-639
...
Fixes #639 - Pending Approvals Panel No longer displaying
2022-02-27 19:37:00 -05:00
Dan
ad17db067d
mild little performance improvement.
2022-02-27 19:32:45 -05:00
alicia pritchett
5dfb3153d1
Fixes #639 - Pending Approvals Panel No longer displaying
2022-02-27 12:21:38 -05:00
Dan
ebbb04a1af
Fixing failing validation.
2022-02-27 10:00:44 -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
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
531802f927
Make sure we don't try to get WorkflowMetadata if the spec does not exist
...
This was raising a 500 error
2022-02-25 14:41:58 -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
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
Dan
3944d00e88
Removing an unused / rogue variable.
...
Adding a logger warning for very large workflow json data.
2022-02-25 09:59:41 -05:00
mike cullerton
9d2436b375
Typo calling script with keywords
2022-02-25 08:18:07 -05:00
Dan
e61ca471db
remove all the @timeit from method calls.
2022-02-24 21:06:22 -05:00
Dan
dde8873c9e
1. defer the loading of the bpmn_json when loading the workflow model. It can be stupidly larger. (see models/workflow.py)
...
2. Shave a little more time off the reset by not re-creating the whole WorkflowProcessor
cleaning up all the firsttime/sincetime statements.
2022-02-24 20:56:57 -05:00