New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workflow needs changes state #6047
Workflow needs changes state #6047
Conversation
Manage this branch in SquashTest this branch here: https://jacobtoppmworkflow-needs-chang-x6m5l.squash.io |
ad7c74c
to
6c06987
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far!
if WorkflowState.objects.filter(status=self.STATUS_IN_PROGRESS, page=self.page).exclude(pk=self.pk).exists(): | ||
raise ValidationError(_('There may only be one in progress workflow state per page.')) | ||
if WorkflowState.objects.filter(Q(status=self.STATUS_IN_PROGRESS) | Q(status=self.STATUS_NEEDS_CHANGES), page=self.page).exclude(pk=self.pk).exists(): | ||
raise ValidationError(_('There may only be one in progress or needs changes workflow state per page.')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should mention "needs changes" here? As a user, I'd probably think of this state as just a variant of "in progress".
Maybe we should relabel it in STATUS_CHOICES
to "In progress (needs changes)"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a user actually going to see this message though? It seems like as a model level error, it's most relevant for developers, where the distinction is probably more relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
… to resume a rejected WorkflowState
…AGTAIL_WORKFLOW_REQUIRE_REAPPROVAL_ON_EDIT in get_next_task logic to determine whether task states created on previous revisions apply or not
…l workflow actions into normal action menu. Adjust page view to cope with new NEEDS_CHANGES state, and add placeholder banner message (which new UI is expected to replace).
…riginal user can cancel the workflow even if the page is locked to them at that workflow step (preparing for locking page to approval groups during workflow)
… string for Python 3.5 compatibility
…in progress and needs changes states only
…ditor to lock page to non-reviewers.
fdeb26f
to
5cac197
Compare
Replace WorkflowState STATUS_REJECTED with STATUS_NEEDS_CHANGES, which does not end a workflow, and add cancellation and resubmit to rejector options. Make Workflows lock pages to non-reviewers. Make the linear mode of workflow the default.
Replace WorkflowState STATUS_REJECTED with STATUS_NEEDS_CHANGES, which does not end a workflow, and add cancellation and resubmit to rejector options. Make Workflows lock pages to non-reviewers. Make the linear mode of workflow the default.
Replace WorkflowState STATUS_REJECTED with STATUS_NEEDS_CHANGES, which does not end a workflow, and add cancellation and resubmit to rejector options. Make Workflows lock pages to non-reviewers. Make the linear mode of workflow the default.
Replace WorkflowState STATUS_REJECTED with STATUS_NEEDS_CHANGES, which does not end a workflow, and add cancellation and resubmit to rejector options. Make Workflows lock pages to non-reviewers. Make the linear mode of workflow the default.
Replace WorkflowState STATUS_REJECTED with STATUS_NEEDS_CHANGES, which does not end a workflow, and add cancellation and resubmit to rejector options. Make Workflows lock pages to non-reviewers. Make the linear mode of workflow the default.
Changes the WorkflowState STATUS_REJECTED to STATUS_NEEDS_CHANGES, and adds the ability to resume a workflow in this state, rather than starting a new one, with the additional options to cancel a workflow, and to restart from scratch.
Removes task state copying between revisions (when set up in linear mode) to prevent swamping the database with unnecessary models, and replacing this by making
WorkflowState
'sget_next_task
method settings-aware.Makes the linear mode (WAGTAIL_WORKFLOW_REQUIRE_REAPPROVAL_ON_EDIT=False) the default.
Adds the ability to cancel a workflow
Moves workflow actions into the action menu proper.
Adds tests for workflow cancellation and resumption.
Lock page to non-reviewers during workflow, but allow workflow cancellation from any user who would normally be able to (this allows the original author to stop a workflow when submitting accidentally, for instance).