Sage Abdullah
d839f00a4e
Hide workflow-snippets assignment panel if no snippets have workflows enabled
2023-01-19 14:07:52 +00:00
Sage Abdullah
4b8839f4a4
Optimise WorkflowContentTypeForm init query
2023-01-19 14:07:52 +00:00
Sage Abdullah
2bbbfca746
Wrap WorkflowContentTypeForm.save() in a transaction
2023-01-19 14:07:52 +00:00
Sage Abdullah
3f5a432675
Make LockableMixin not depend on WorkflowMixin
2023-01-19 14:07:52 +00:00
Sage Abdullah
c2f47e4755
Add __str__() to WorkflowContentType and use get_content_type_label
2023-01-19 14:07:52 +00:00
Sage Abdullah
38f65e98a4
Fix workflow report export fields
2023-01-19 14:07:52 +00:00
Sage Abdullah
18c140e8be
Add docs for WorkflowMixin
and enabling workflows for snippets
2023-01-19 14:07:51 +00:00
Sage Abdullah
73903cb40b
Add missing tests
2023-01-19 14:07:51 +00:00
Sage Abdullah
65e2b175fd
Add default response to CollectWorkflowActionData
...
If the form is invalid and the request was not made with XMLHttpRequest,
the method returns None instead of a valid response object
2023-01-19 14:07:51 +00:00
Sage Abdullah
38b66b6f9e
Add tests for workflow preview views
2023-01-19 14:07:51 +00:00
Sage Abdullah
44be89cc75
Add corresponding snippet workflows tests for other page-specific tests
2023-01-19 14:07:51 +00:00
Sage Abdullah
985e084116
Add tests for WorkflowLock on snippets
2023-01-19 14:07:51 +00:00
Sage Abdullah
495cc167c7
Add tests for not purging snippet revisions that are in a workflow
2023-01-19 14:07:50 +00:00
Sage Abdullah
eaa62be925
Add audit log tests for snippet workflows
2023-01-19 14:07:50 +00:00
Sage Abdullah
3386d777bd
Add test for getting select_task_type view when there's only 1 task type
2023-01-19 14:07:50 +00:00
Sage Abdullah
18abdeaa45
Add TestSnippetWorkflowStatus based on TestPageWorkflowStatus
...
TestPageWorkflowStatus is renamed from TestWorkflowStatus
2023-01-19 14:07:50 +00:00
Sage Abdullah
202bd6773f
Add TestDisableViewsWithSnippetWorkflows based on TestDisableViews
2023-01-19 14:07:50 +00:00
Sage Abdullah
6ba984c562
Add for_instance() method to TaskStateManager
2023-01-19 14:07:50 +00:00
Sage Abdullah
b447a4dd53
Add TestSnippetNotificationPreferences based on TestPageNotificationPreferences
...
TestPageNotificationPreferences is renamed from TestNotificationPreferences
2023-01-19 14:07:49 +00:00
Sage Abdullah
5d7c7b44a4
Add TestApproveRejectSnippetWorkflow based on TestApproveRejectPageWorkflow
...
TestApproveRejectPageWorkflow is renamed from TestApproveRejectWorkflow
2023-01-19 14:07:49 +00:00
Sage Abdullah
72455b10f0
Add TestSubmitSnippetToWorkflow based on TestSubmitPageToWorkflow
...
TestSubmitPageToWorkflow is renamed from TestSubmitToWorkflow
2023-01-19 14:07:49 +00:00
Sage Abdullah
7713efa0ab
Add snippet content type tests to workflow views
2023-01-19 14:07:49 +00:00
Sage Abdullah
a6d4fd2d22
Add basic snippet workflow tests in wagtail.tests.test_workflow
2023-01-19 14:07:49 +00:00
Sage Abdullah
4a476a669b
Do not show warning message when disabling a task if there's no in progress states
2023-01-19 14:07:49 +00:00
Sage Abdullah
4a404aee2e
Check Task.user_can_lock/unlock() when checking lock/unlock permissions
2023-01-19 14:07:48 +00:00
Sage Abdullah
c3c76a7ffb
Fix workflow history detail timeline content from showing on initial load
2023-01-19 14:07:48 +00:00
Sage Abdullah
0648edaece
Improve workflow history index accessibility
...
Wrap the workflow name in a link, as using the status tag as the primary link may not be obvious to users
Switch tooltip to use tippy with tabindex="0" so it's accessible via keyboard
2023-01-19 14:07:48 +00:00
Sage Abdullah
384969e130
Show workflow name on workflow history index page
2023-01-19 14:07:48 +00:00
Sage Abdullah
2aa8d17dc7
Show snippet type count on workflow index view's 'used by' column
2023-01-19 14:07:48 +00:00
Sage Abdullah
9ea6c5aabf
Check current workflow task's user_can_access_editor
for snippet edit permission
2023-01-19 14:07:48 +00:00
Sage Abdullah
401b227b76
Handle non-page objects in workflow notification templates
2023-01-19 14:07:47 +00:00
Sage Abdullah
230fe5a66c
Show non-page objects in workflow and workflow task reports
2023-01-19 14:07:47 +00:00
Sage Abdullah
4775990224
Link to workflow history view instead of the edit history in workflow status dialog
2023-01-19 14:07:47 +00:00
Sage Abdullah
4cc3556b16
Add workflow history views for snippets that extend WorkflowMixin
2023-01-19 14:07:47 +00:00
Sage Abdullah
d7f64584c9
Extract generic workflow history views and make pages views extend from them
2023-01-19 14:07:46 +00:00
Sage Abdullah
711d592052
Move pages/workflow_history
templates to shared
2023-01-19 14:06:11 +00:00
Sage Abdullah
4db3ef23d6
Make WorkflowObjectsToModeratePanel
generic
2023-01-19 14:06:11 +00:00
Sage Abdullah
3857935ec9
Rename WorkflowPagesToModeratePanel
to WorkflowObjectsToModeratePanel
2023-01-19 14:06:11 +00:00
Sage Abdullah
66732aebcd
Prefetch content_object's latest_revision instead of current_task_state's revision
...
The latter is unused in the template, while the former might be used if the object is not a page object
2023-01-19 14:06:10 +00:00
Sage Abdullah
dfaf715967
Make user_objects_in_workflow_moderation.html
work with non-Page objects
2023-01-19 14:06:10 +00:00
Sage Abdullah
d910b96cfd
Create is_page
, admin_edit_url
, and latest_str
admin helper tags
2023-01-19 14:06:10 +00:00
Sage Abdullah
6e7394c90f
Make UserPagesInWorkflowModerationPanel
generic
2023-01-19 14:06:10 +00:00
Sage Abdullah
e4dbd88810
Remove unique constraint before using GenericForeignKey
in WorkflowState
...
Prevent migrations crash on SQLite before https://github.com/django/django/pull/15175 landed in Django
2023-01-19 14:06:10 +00:00
Sage Abdullah
c008fdfb39
Avoid querying with GenericRelations
to prevent crash on Postgres
...
Upstream issue: https://code.djangoproject.com/ticket/16055
2023-01-19 14:06:09 +00:00
Sage Abdullah
b151180cc8
Add ModalWorkflow
code in snippets edit view to handle workflow cancellation on publish
2023-01-19 14:06:09 +00:00
Sage Abdullah
6401599bf1
Add workflow views for snippets that extend WorkflowMixin
2023-01-19 14:06:09 +00:00
Sage Abdullah
ef7964f226
Create separate workflow_menu_item.html
template for snippets action menu
2023-01-19 14:06:09 +00:00
Sage Abdullah
301c6d9040
Add workflow_states
default property to WorkflowMixin
2023-01-19 14:06:09 +00:00
Sage Abdullah
ce7e8b47a3
Create shared/confirm_workflow_cancellation.html
template
...
and use it in generic `ConfirmWorkflowCancellation` view
2023-01-19 14:06:09 +00:00
Sage Abdullah
a0567caca3
Make workflow_status.html
template generic
2023-01-19 14:06:08 +00:00