-
Notifications
You must be signed in to change notification settings - Fork 4
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
Tp2000 1471 task workflow #1298
Draft
paulpepper-trade
wants to merge
70
commits into
master
Choose a base branch
from
TP2000-1471--task-workflow
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Rename UserAssignment model to TaskAssignee * Add TaskCategory and TaskProgressState models * Add parent_task field to Task model * Add creator field to Task model * Add TaskLog model * Don't require that tasks have a workbasket * Make progress_state a required field on Task model * Order task category by name and display progress state by value * Remove Task prefix from Category and ProgressState models * Remove workflow app
* Register Category model in admin site * Register ProgressState in admin site * Register TaskAssignee in admin site * Register Task model in admin site
* Add initial TaskCreate view & form * Add initial Task detail view * Add initial Task edit form & view * Add initial Task delete view & form * Add initial Task list view * Try pre_save signals for TaskLog creation * Tidy templates * Allow Task deletion * Register TaskLog model in admin * Add test for TaskLog creation * Rename user group in conftest * Set up pre_save signal for TaskAssignee to create TaskLog entries * Persist TaskLog entries after Task deletion * Add mixins to override Manager and QuerySet methods for pre_save signal handling * Fix Task delete view * Move WithSignalManagerMixin and WithSignalQuerysetMixin to common/models/mixins * Set initial pagination limit for TaskListView
* create 'subtask create form' with predetermined parent * add test to check that SubtaskCreateForm.save adds correct parent task when creating subtask
… and workflow task items (#1321) * Split models file and add stubbed queue support. * Removed queue from base class; Create TaskItem using TaskItemTemplate position * Amend TaskItem.position exception error message * Override QueueItem metaclass to enforce queue field on conrete subclasses * Export queue-related models from tasks * Implement Queue instance methods using new get_related_objects util method * Implement QueueItem instance methods * Add Queue.get_items() and add return type annotations * Add concrete test-only models for Queue and QueueItem * Add queue tests * Add queue and item tests * Refactor TableLock into a decorator and context manager * Override QueueItem's model manager create method to set queue positions on behalf of subclasses * Amend Queue and QueueItem tests * Docstring updates. * Support only a single reverse FK relationship to QueueItem for queue instances * Support default State instance on ProgressState and Task.progress_state * Remove redundant model manager. Add task and task template util methods. * Add workflow unit tests. * Rely on Task.progress_state default in WB assign users view --------- Co-authored-by: Dale Cannon <[email protected]>
* Implement prototype TaskWorkflowTemplate detail view * Rename workflow template jinja template * Add TaskWorkflowTemplateDetailView test
…ate detail view (#1323) * Add task template reordering capability to workflow template detail view * Catch race condition exception * Add workflow template reorder items view test * Ensure item being moved belongs to workflow template * Add task queue template resembling packaging queue design * Order get_task_templates() and get_tasks() querysets by item position * Add promote_to_first/last form action handling
* Fix misaligned actions. Add links. * Add __str__() method * Task template creation UI support * Add missing trailing slash * Add tasktemplate perms to conftest * Move factories and fixtures to their own modules * Fixture for single item workflow template * Unit tests for create and detail views for task templates * Correct fixture name * Add link to task template detail view
* Fix misaligned actions. Add links. * Add __str__() method * Task template creation UI support * Add missing trailing slash * Add tasktemplate perms to conftest * Move factories and fixtures to their own modules * Fixture for single item workflow template * Unit tests for create and detail views for task templates * Correct fixture name * Add link to task template detail view * Add get_url() method support * Implement forms and views for task template udpate * Add unit test for update view
* shared success template for tasks and subtasks * modified subtask confirmcreate success url to include ID of newly created subtask * added 'create subtask' button to task details page * conditional rendering of 'create subtask' button only for tasks without parent * Remove redirect from get context function, and fix task details button test * Add validation to prevent subtasks being created from subtasks * Add parent name to subtask title * Add test to check for form error --------- Co-authored-by: marya <[email protected]>
* Don't show actions for a single item in queue list * Filter queue items by their own queue when reordering * Support task workflow template creation * Support workflow template editing
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1298 +/- ##
==========================================
+ Coverage 93.18% 93.42% +0.24%
==========================================
Files 652 699 +47
Lines 49768 54786 +5018
Branches 5317 5794 +477
==========================================
+ Hits 46375 51184 +4809
- Misses 2734 2872 +138
- Partials 659 730 +71 ☔ View full report in Codecov by Sentry. |
* Support workflow template deletion * Add TaskWorkflowTemplateDeleteView unit test * Delete task templates together with workflow templates
* wip * add subtask delete and deleteconfirm view * fixed deletesubtask view by adding in get_form_kwargs * Update tasks/jinja2/tasks/delete.jinja Co-authored-by: Paul Pepper <[email protected]> --------- Co-authored-by: Paul Pepper <[email protected]>
* Clean up urls and add update and confirm update urls * Add Update views and templates * amend update link in template to accomodate subtasks * Refactor update link test * Add is_subtask property and amend tests * Merge in megabranch - might be wonky --------- Co-authored-by: Paul Pepper <[email protected]>
* added navigation tile to homepage to link to workflow list views * fixed indentation on lines 153 and 154
* Add TaskWorkflow.summary_task ForeignKey * Refactor, remoging base class * Add factories and fixtures for TaskWorkflow and TaskItem * Add queryset function filter_top_level() with unit test * Add non_workflow() and workflow_summary() queryset filter functions and tests * Remove leftover comment. * Correct variable name
* Avoid dereferencing null * Avoid dereferencing null * Remove spurious operations attribute * Avoid dereferencing null * Avoid dereferencing null * Add default ordering * Inherit model Meta and apply ordering where needed * Do the TODOs in hrefs
* added 'created_at' and 'updated_at' fields to TaskWorkflowTemplateModel and sorting by date functionality for list view * fixed mixin inheritance order for TaskWorkflowTemplateListView, ordering by dates works correctly now * fixed inconsistency in datetime string formatting * fixed datetime format inconsistencies by passing in settings.DATETIME_FORMAT as context variable
* Correctly return context * Fix and simplify test
* Remove redundant assignment * Set missing context variable.
* Add is subtask to Task admin list display * Add filter for subtasks * Refactor filtering to extend from TaskQueryset
* added admin support for task workflow templates and task templates * admin support for task workflow templates and task templates * created ReadOnlyAdminMixIn for use with both taskworkflowtemplate admin and tasktemplate admin
* Add search fields to TaskTemplateAdmin * Display related items on workflow & workflow template admin views
…e methods (#1385) * Evaluate querysets that rely on select_for_update() * Add race condition unit tests for QueueItem instance methods
* Show workbasket assignment on details view * Order attributes the same as on edit view * Pass creator into Task when creating from template * Add assignees row * Update docstring * Add assignees to context data * Add view context elements * Add React components * View and Form support to add TaskAssignees to a Task * Support for unassigning task assignees * Rename refactor * Remove TODO comments * Implement UserQuerySet * Updated model docstring * Add type annotation and docstrings * Remove unused view and URL route * Avoid duplicates in queryset due to multi-group membership. * Link to view from anchors and exclude unassigned * Create User.objects via UserManager.from_queryset() * Define custom manager
* added new urls for task workflow task create * added 2 views for task workflow task create and confirm create * added URL and views for workflow task create and confirm create * failing unit test * fixed failing test for workflow task create and confirm create view * modified TaskBaseForm to explicitly add 'fields' attribute as per Django documentation guidelines * removed redundant comment * Rename migration file after naming conflict * Remove last committed migration * addressing PR comments including reordering assert statements in tests and changing URL to match convention --------- Co-authored-by: Lauren Mullally <[email protected]> Co-authored-by: Paul Pepper <[email protected]>
…odels (#1382) * Ensure only authenticated and authorised users can access WorkBasketViewSet API endpoints * Add a search filter for workbaskets * Add autocomplete_label property to workbasket model * Add new workbasket API endpoint optimised for use with AutoCompleteField in forms * Support other types of model other than TrackedModels in AutoCompleteWidget * Enable specifying a custom API source URL when using an AutoCompleteField * Make workbasket an AutoCompleteField on Task forms * Delegate validation to to_python so that any validation errors will be displayed as form errors * Add note about search rank normalisation * Add comment to caught exception for clarity
* Amend breadcrumb formatting on Task delete view * Avoid dereferencing null category on task and workflow list views * Add parent task breadcrumb on subtask create view * Amend workflow and worklfow template name references on their respective list views * Add a return to workflow template button on task template confirm create view * Truncate long descriptions on workflow template list view * Use sentence case for table column headers on workflow template list view * Show associated workbasket on Task detail view * Preserve filtering when sorting on all Task & Workflow list views * Add page caption and link to parent task for Subtask detail views * Add a return to workflow template button on task template detail view * Remove workbasket breadcrumb from task and workflow views * Rename SortingMixin.clean_query_params() to build_sorting_urls() * Add util function to get resolved URL of current view * Add capability to SortingMixin to build sorting URLs * Update usage of create_sortable_anchor * Fix tests related to sorting changes * Reposition Auto end-date measures summary row above comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TP2000-1471 Task workflows
Why
Discovery and business analysis work has uncovered a core, and probably reasonably stable, set of behaviours around TAP task and workflow integration. Implementing a kernel of that behaviour in software as a type of minimum viable product has advantages including:
What
This PR implements:
TO DO
Checklist