* feat: add dynamic value support for workflow update_value field
* feat: add evaluate as expression checkbox to workflow states
* test: add tests for dynamic workflow update_value expression
* fix: use description field instead of sender in workflow
tests
* chore: fix typo
---------
Co-authored-by: UmakanthKaspa <kaspaumakanth1999@gmail.com>
Co-authored-by: Akhil Narang <me@akhilnarang.dev>
* feat: add workflow task doctypes
* chore: add Workflow Task to Script Type of Server Scripts
* chore: add description for Workflow Tasks
* feat: fetch dotted paths and corresponding names from hooks
* fix: use Select field instead of Autocomplete
* feat: execute tasks in the background on state transition
* fix: throw error when task not found
* fix: naming for transition task set by user
* fix: child table views
* feat: support for server scripts
* chore: comments and description
* fix: change the casing of docevent options
* fix: change test casing
* feat: Add Workflow Transition field to webhooks
* fix: temporarily remove filter
* feat: add webhooks as workflow actions
* test: test execution of synchronous app-defined methods and server scripts
* chore: shorten the description and change the fieldname of the field 'execute_asynchronously' to 'asynchronous'
* test: server script executipn
* fix: add field to UI
* test: change customer to domain
* test: change Customer to Domain
* fix: patch for change in webhook fields
* chore: fetch only used fields in get_all
* fix: don't run test logic in application code 🙂
* test: separate tests for workflow tasks
* Revert "fix: patch for change in webhook fields"
This reverts commit 2e9c51c43ca2b3698991fbe75cc4032368ab174c.
* chore: break into smaller functions
* test: webhooks with workflow tasks
isolate mock responses to test_sync_tasks
* Revert "fix: change test casing"
This reverts commit e2bad96ed01dea0a26d002ea44a1e0175525ed31.
* Revert "fix: change the casing of docevent options"
This reverts commit ddfc81bf775fad74225f25815b8e3e7b255dc9eb.
* fix: webhook casing
* fix: type hint for doc
When queue is overloaded every job gets delayed by size of the queue,
this means even interactive jobs like prepared reports face significant
wait times.
This flag allows developer to selectively enable LIFO on such jobs where
ordering doesn't matter. Any time we observe queue to be too large,
we'll insert the job at front so it gets highest priority.
This is a common strategy to deal with queue starvation, we are only
applying it explicitly because job execution order matters for
correctness in some cases.
* Load from db only if doc passed is not of type Document. This was
added earlier to load in case of dicts. ref: https://github.com/frappe/frappe/pull/11883
* Move blocks to evaluate only if required
* Add typing hints
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
* feat: utility methods for docstatus
* refactor: use utility method for doctsatus
* refactor: enum for docstatus
* refactor: docstatus as property
* fix: set docstatus
* feat: docstatus extends int class
* test: docstatus of BaseDocument
* refactor: occurrences of docstatus
* fix: typo
* refactor: move docstatus to a separate file
* test: docstatus
* fix: sider
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass