Commit graph

125 commits

Author SHA1 Message Date
Suraj Shetty
41a3b8c284
fix(workflow): Update modified timestamp (#12093)
To sync changes in https://github.com/frappe/frappe/pull/11787 after migrate
2020-12-17 20:44:23 +05:30
conncampbell
7a773d2461 feat: Workflow transition condition allows datetime functions 2020-12-14 20:07:39 -07:00
UrvashiKishnani
fc180b72d4
fix: space missing in description 2020-10-27 07:48:52 +04:00
Rushabh Mehta
373403c97e fix(minor): test_workflow.py 2020-10-26 13:44:32 +05:30
Rushabh Mehta
7f1b35b0de fix(tests): test_workflow.py, full cleanup 2020-10-26 12:01:39 +05:30
Suraj Shetty
198e255710
fix: Replace invalid translations
Co-authored-by: Faris Ansari <netchampfaris@users.noreply.github.com>
2020-10-12 16:04:27 +05:30
Suraj Shetty
89f97257dd fix: Replace incorrect translation syntax usages 2020-10-12 12:26:38 +05:30
Suraj Shetty
a147e45d0c fix: Replace incorrect translation syntax usages 2020-10-11 22:08:22 +05:30
Rushabh Mehta
6535751e1d debug(tests): test_workflow 2020-08-17 09:56:45 +05:30
Rushabh Mehta
7ee1fe3caf debug: test_workflow 2020-08-17 09:41:54 +05:30
Rushabh Mehta
2af7c7dc33 debug: test_workflow 2020-08-17 09:41:54 +05:30
Rushabh Mehta
f6bc6786ac debug: test_workflow 2020-08-17 09:41:54 +05:30
Rushabh Mehta
b09beb9147 fix(tests): cleanup 2020-08-17 09:41:54 +05:30
Rushabh Mehta
26a9230fdd fix(tests): more debugging 2020-08-17 09:41:54 +05:30
Rushabh Mehta
72e266f908 fix(tests): cleanup workflow test and commits 2020-08-17 09:41:54 +05:30
Suraj Shetty
e27c910f66 fix: Make users while setting up class 2020-08-12 00:02:39 +05:30
Suraj Shetty
4f37f9a452
test: Try committing after Role creation 2020-08-06 09:33:39 +05:30
Suraj Shetty
86a9ceb29b
test: Clear role cache 2020-08-04 11:16:18 +05:30
Suraj Shetty
744a9413fd fix: Use common function to get_roles 2020-08-04 10:36:16 +05:30
Suraj Shetty
6e9169a0aa test: Remove debug statements & clear-cache 2020-08-04 10:12:41 +05:30
Suraj Shetty
89dfd82134 chore: Add debug statement
- Uncomment innocent test
2020-08-04 00:36:42 +05:30
Suraj Shetty
88b68c6cf5 chore: Remove unwanted changes 2020-08-04 00:11:48 +05:30
Suraj Shetty
00a8edf910 test: Make User records before executing test 2020-08-03 23:53:01 +05:30
Suraj Shetty
f0729ff6a8 test: Reset workflow doc 2020-08-03 12:00:44 +05:30
Suraj Shetty
d3e4a97b6f
test: Make email account is email account test (#11139) 2020-07-29 17:17:53 +05:30
marination
92a778c44a fix: Made Workflow State Field Mandatory 2020-07-16 14:03:11 +05:30
Suraj Shetty
a5ed59bb4e fix: Do not check for orphaned states in new workflows 2020-07-06 12:08:34 +05:30
prssanna
c7f0aafa7e feat: add button to go to ref doctype list 2020-05-30 15:28:25 +05:30
prssanna
62ac2494e7 style: fix formatting 2020-05-30 15:28:25 +05:30
prssanna
d621a994a1 fix: fix state filter 2020-05-30 15:28:25 +05:30
prssanna
49f4eea963 fix: don't get states count if form is new 2020-05-30 15:28:25 +05:30
prssanna
37dcef5f53 fix: code formatting 2020-05-30 15:28:25 +05:30
prssanna
2df481e990 fix: increase table width 2020-05-30 15:28:24 +05:30
prssanna
f61f5ec834 fix: get indicator color from state 2020-05-30 15:28:24 +05:30
prssanna
aaf1618898 refactor: refactor rendering of table 2020-05-30 15:28:24 +05:30
prssanna
d1c4af1255 refactor: use frappe.warn and render table in form also 2020-05-30 15:28:07 +05:30
prssanna
09dd31a79c feat: show warning if documents have workflow states that do not exist in the workflow 2020-05-30 15:28:07 +05:30
Suraj Shetty
3b93b2a456 refactor: Commonify transition condition evaluation
- This add safe_globals for transition evaluation in workflow_action
2020-03-24 13:28:30 +05:30
Chinmay D. Pai
9d36b05804
fix: correctly pickle email_args for workflow emails
currently, since we return possible actions as dict_values, pickle fails
to work with it with the following error:

```python-traceback
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 99, in execute_job
    method(**kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/workflow/doctype/workflow_action/workflow_action.py", line 210, in send_workflow_action_email
    enqueue(method=frappe.sendmail, queue='short', **email_args)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 69, in enqueue
    kwargs=queue_args)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/queue.py", line 258, in enqueue_call
    job = self.enqueue_job(job, at_front=at_front)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/queue.py", line 324, in enqueue_job
    job.save(pipeline=pipe)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py", line 516, in save
    connection.hmset(key, self.to_dict(include_meta=include_meta))
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py", line 469, in to_dict
    obj['data'] = zlib.compress(self.data)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py", line 234, in data
    self._data = dumps(job_tuple)
TypeError: can't pickle dict_values objects
```

passing the values as a list instead works fine.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-07 18:06:02 +05:30
Suraj Shetty
ddd091d9f7 fix: Wrap condition field with bactick since it is a reserved keyword 2020-02-07 17:54:18 +05:30
Suraj Shetty
0461696fd8 fix: De-duplicate actions sent in mail 2020-02-07 11:19:01 +05:30
mergify[bot]
62ea837d07
Merge pull request #9363 from prssanna/workflow-fix
fix(Workflow): Set workflow state when some action is performed on a …
2020-02-05 10:04:49 +00:00
prssanna
70316e8670 fix(test): set workflow state Approved docstatus to 1 in test 2020-02-05 11:47:03 +05:30
prssanna
2edfca9fb5 test: add test case to check if workflow state is set 2020-02-04 12:09:18 +05:30
Suraj Shetty
51bae0df50 fix(translations): Incorrect syntax 2020-01-29 15:35:28 +05:30
Suraj Shetty
dee4a7336c fix(translations): Incorrect syntax 2020-01-29 15:22:35 +05:30
Suraj Shetty
160d495743
style: Update docstring and fix formatting 2020-01-08 09:37:06 +05:30
prssanna
3cce101c2d test: add test to check if document status is updated 2020-01-07 00:58:43 +05:30
prssanna
04e7b7a96b fix: compare docs by state as key 2020-01-05 15:59:38 +05:30
prssanna
764f18e2e9 fix: check if doc_before_save exists 2019-12-31 12:24:30 +05:30