From 5900c13e08f27122d45a368a0ced05d2455d583b Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 9 May 2025 16:21:42 +0930 Subject: [PATCH] docs(development): Add initial TicketCommentBase ref: #744 #726 --- .../development/core/ticket_comment.md | 45 +++++++++++++++++++ .../centurion_erp/development/models.md | 2 +- mkdocs.yml | 2 + 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 docs/projects/centurion_erp/development/core/ticket_comment.md diff --git a/docs/projects/centurion_erp/development/core/ticket_comment.md b/docs/projects/centurion_erp/development/core/ticket_comment.md new file mode 100644 index 00000000..790bb31b --- /dev/null +++ b/docs/projects/centurion_erp/development/core/ticket_comment.md @@ -0,0 +1,45 @@ +--- +title: Ticket Comment +description: Centurion ERP Base Model Ticket Comment development documentation +date: 2025-04-16 +template: project.html +about: https://github.com/nofusscomputing/centurion_erp +--- + +Ticket Comments is a base model within Centurion ERP. This base provides the core features for all subsequent sub-ticket_comment models. As such extending Centurion ERP with a new ticket comment type is a simple process. The adding of a ticket comment type only requires that you extend an existing ticket model containing only the changes for your new ticket type. + + +## Core Features + +- ... + + +## History + +Ticketing does not use the standard history model of Centurion ERP. History for a ticket is kept in the form of action comments. As each change to a ticket occurs, an action comment is created denoting the from and to in relation to a change. + + +## Model + +When creating your sub-model, do not re-define any field that is already specified within the model you are inheriting from. This is however, with the exception of the code docs specifying otherwise. + + +## Testing + +As with any other object within Centurion, the addition of a feature requires it be tested. The following Test Suites are available: + +- `Unit` Test Cases + + - `core.tests.unit.ticket_comment_base.<*>.InheritedCases` _(if inheriting from `TicketCommentBase`)_ Test cases for sub-models + + - ViewSet `core.tests.unit.ticket_comment_base.test_unit_ticket_comment_base_viewset.TicketCommentBaseViewsetInheritedCases` + +- `Functional` Test Cases + + - `core.tests.functional.ticket_comment_base.<*>.InheritedCases` _(if inheriting from `TicketCommentBase`)_ Test cases for sub-models + + - API Permissions `core.tests.functional.ticket_comment_base.test_functional_ticket_comment_base_permission.TicketCommentBasePermissionsAPIInheritedCases` + + - Model `app.core.tests.functional.ticket_comment_base.test_functional_ticket_comment_base_model.TicketCommentBaseModelInheritedTestCases` _(if inheriting from `TicketCommentBase`)_ Test cases for sub-models + +The above listed test cases cover **all** tests for objects that are inherited from the base class. To complete the tests, you will need to add test cases for the differences your model introduces. diff --git a/docs/projects/centurion_erp/development/models.md b/docs/projects/centurion_erp/development/models.md index 3b36a31a..53dcf582 100644 --- a/docs/projects/centurion_erp/development/models.md +++ b/docs/projects/centurion_erp/development/models.md @@ -96,7 +96,7 @@ We do have some core sub-models available. There intended purpose is to serve as - [Ticket](./core/ticket.md) -- Ticket Comment +- [Ticket Comment](./core/ticket_comment.md) All sub-models are intended to be extended and contain the core features for ALL models. This aids in extensibility and reduces the work required to add a model. diff --git a/mkdocs.yml b/mkdocs.yml index 3686e255..e4aaa8c4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -153,6 +153,8 @@ nav: - projects/centurion_erp/development/core/ticket.md + - projects/centurion_erp/development/core/ticket_comment.md + - projects/centurion_erp/development/views.md - User: