🇬🇧 A. Core Design Principles
- Service-centric workflow: Parent issue = Service (procurement item). Sub-task = Evidence only (Quote / Invoice). All approvals happen on parent issue. Sub-tasks never participate in approval or rejection.
- Audit-ready & non-spam: Automation uses comments for guidance, not email spam. Entity properties guarantee one-time notification per event. Do not use automatic watchers in automation.
- Simple & debug-friendly: All automation triggers must be FROM → TO transitions. Each rule handles exactly one transition. Never use generic "issue updated" triggers.
🇻🇳 A. Nguyên lý thiết kế cốt lõi
- Lấy Service làm trung tâm. Task cha = 1 dịch vụ / hạng mục mua sắm. Sub-task chỉ để lưu bằng chứng (Quote / Invoice). Approval chỉ xảy ra ở task cha. Sub-task không bao giờ có approve / reject.
- Sẵn sàng audit & không spam. Automation dùng comment để hướng dẫn, không spam email. Dùng entity property để đảm bảo mỗi sự kiện chỉ notify 1 lần. Không dùng watcher tự động trong automation.
- Đơn giản, dễ debug. Mọi automation chỉ trigger theo FROM → TO status. Mỗi rule chỉ xử lý đúng 1 transition. Tuyệt đối không dùng "issue updated" chung chung.
🇬🇧 B. Issue Structure
- Parent – Service: Represents one procurement or service item. Owns workflow, approval lifecycle, and audit trail. Contains labels, business context, dates, owner, and status.
- Sub-task – Evidence: Purpose: store evidence only. Types: Quote, Invoice. Status: OPEN → DONE only. Never participates in approval or controls workflow. Only for file upload and metadata.
🇻🇳 B. Cấu trúc Issue
- Task cha – Service: Đại diện cho 1 hạng mục dịch vụ / mua sắm. Chịu trách nhiệm workflow, approval, audit. Chứa labels, ngữ cảnh nghiệp vụ, ngày tháng, owner, status.
- Sub-task – Evidence: Mục đích chỉ để lưu bằng chứng. Loại Quote, Invoice. Status OPEN → DONE. Không bao giờ tham gia approval hay điều khiển workflow. Chỉ dùng để upload file và metadata.
🇬🇧 C. Workflow – Parent (Service)
SERVICES TO PROCURE → QUOTES → PM APPROVE QUOTE → FM APPROVE QUOTE → SERVICES BEING DELIVERED → INVOICE → FM APPROVE TO PAY → DONE.
Rules: Reject is a transition, not a status. Only parent issue moves in this workflow. Sub-tasks never move in this chain.
🇻🇳 C. Workflow – Task cha (Service)
Chuỗi trạng thái chuẩn như trên. Luật: Reject là transition, không phải status. Chỉ task cha chạy trong workflow này. Sub-task không bao giờ tham gia.
🇬🇧 D. Transition Map
| From | Action | To |
|---|---|---|
| SERVICES TO PROCURE | Start collecting quotes | QUOTES |
| QUOTES | Submit for PM approval | PM APPROVE QUOTE |
| PM APPROVE QUOTE | Approve | FM APPROVE QUOTE |
| PM APPROVE QUOTE | Reject | QUOTES |
| FM APPROVE QUOTE | Approve | SERVICES BEING DELIVERED |
| FM APPROVE QUOTE | Reject | QUOTES |
| SERVICES BEING DELIVERED | Submit invoice | INVOICE |
| INVOICE | Submit for payment | FM APPROVE TO PAY |
| FM APPROVE TO PAY | Approve payment | DONE |
| FM APPROVE TO PAY | Reject | INVOICE |
🇬🇧 E. Automation Principles
Transition-triggered only. One rule = one transition. Every notify rule must have entity property guard.
🇻🇳 E. Nguyên tắc Automation
Chỉ trigger theo FROM → TO. Một rule = một transition. Mọi rule notify phải có entity property guard.
🇬🇧 F. Approval Logic
Parent status = single source of truth. PM approves quotes. FM approves quotes and payment. Jira records status, decision, audit history. Sub-tasks are never approved or rejected.
🇻🇳 F. Logic Approval
Status task cha = nguồn sự thật duy nhất. PM duyệt báo giá. FM duyệt báo giá và thanh toán. Sub-task không bao giờ được duyệt hoặc reject.
🇬🇧 G. Commission (Invoice)
Fields: Invoice Amount, Commission %, Commission Amount. Formula: Commission Amount = Invoice Amount × Commission % / 100. Trigger: When status becomes DONE.
🇻🇳 G. Hoa hồng (Invoice)
Các field và công thức như trên. Trigger khi status sang DONE.
🇬🇧 H. Uploaded At (Attachments)
Trigger: Attachment added. Action: Set Uploaded At = now. Never use generic issue updated trigger.
🇻🇳 H. Uploaded At (Đính kèm)
Trigger: Attachment added. Action: Set Uploaded At = now. Không dùng issue updated.
🇬🇧 I–P. Phase/Program, Visibility, Governance, Notification, Free vs Standard, Metadata, Summary
Use labels (phase-x, cohort-xxxx, loc-xxx). Saved filters = virtual folders. Parent status + watchers for approval visibility. ProSys provides end-to-end procurement lifecycle, clear role separation, auditable trail, predictable automation, zero-spam governance, scalable structure.
🇻🇳 I–P. Lọc Phase/Program, Hiển thị, Kỷ luật, Notification, Free vs Standard, Metadata, Tóm tắt
Dùng labels, filter ảo, status task cha + watchers. ProSys mang lại quản lý mua sắm end-to-end, phân quyền rõ ràng, audit đầy đủ, automation dễ đoán, không spam, mở rộng được.
