[feature]: (#496) Prevent Duplicate service template task from creation#499
Open
Rakeshsingu wants to merge 1 commit intoParaLogicTech:version-15from
Open
[feature]: (#496) Prevent Duplicate service template task from creation#499Rakeshsingu wants to merge 1 commit intoParaLogicTech:version-15from
Rakeshsingu wants to merge 1 commit intoParaLogicTech:version-15from
Conversation
This file contains hidden or 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
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.
Feature: Prevent Duplicate Task Creation for Specific Task Types During Service Template Task Generation
When a Repair Order (Project) has multiple linked Service Templates (e.g. PPF, Tinting),
it's possible for tasks with the same
task_type(e.g. "Washing") to appear in multiple templates.To avoid creating duplicate tasks for such cases, this update introduces:
✅ New Field:
prevent_duplicate_task: A checkbox in the Service Template'staskschild table.💡 Logic:
During task creation (
create_service_template_tasks):task_types whereprevent_duplicate_task = 1from all service templates.task_types already created for the project.task_typeis in theprevent_duplicate_tasklistOnly the first occurrence of such a task type will be created.
Ensures clean deduplication across all service templates attached to the same project.
🛠️ Example:
If both "PPF" and "Tinting" templates have a
"Washing"task withprevent_duplicate_task = 1,only the first
"Washing"task is created; the duplicate is skipped.This prevents redundant tasks from being added to the same Repair Order, improving task clarity and reducing confusion for workshop staff.
Closes #496