نفس مصدر الإدارات والموديولات والـWorkflows؛ يتم تحميل 20 قصة فقط في كل صفحة.
632 نتيجة من نفس الـSRS Graphصفحة 5 من 32الكتالوج الكامل 632 Story فريدة
HRM-V1-E09-US007
الموارد البشرية والإدارة · موديول Epic 9: Time, Attendance & Shift ManagementHRM V1.0c · المصدر الأساسي
بصفتي مسؤول النظام، أريد عرض ومتابعة سجلات موديول Epic 9: Time, Attendance & Shift Management مع الفلاتر والإجماليات المسموح بها، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance Processing Process
فتح سريع للقصة
Actor: HR Administrator
حسب المصدر الأساسي HRM V1.0c — As an HR Administrator, I want to review and approve a period's attendance data before it feeds payroll, so that payroll always calculates from a confirmed, not provisional, attendance dataset.
As an HR Administrator, I want to review and approve a period's attendance data before it feeds payroll, so that payroll always calculates from a confirmed, not provisional, attendance dataset.
Acceptance Criteria (2)
Approval is required per payroll period before that period's attendance data is eligible for the Payroll Engine (Epic 19) to consume — an unapproved period blocks payroll generation for the employees affected, with a clear error naming which period/employees are unresolved.
Any unresolved conflicts (US-001) or open Attendance Correction Requests (US-009) for the period block approval until addressed.
HRM-V1-E09-US008
الموارد البشرية والإدارة · موديول Epic 9: Time, Attendance & Shift ManagementHRM V1.0c · المصدر الأساسي
بصفتي مسؤول النظام، أريد تنفيذ المتطلب التشغيلي في موديول Epic 9: Time, Attendance & Shift Management، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance Processing Process
فتح سريع للقصة
Actor: HR Administrator
حسب المصدر الأساسي HRM V1.0c — As an HR Administrator, I want to configure grace time and exception rules relative to each employee's effective Working Schedule, so that minor lateness within policy doesn't get flagged, while genuine exceptions are caught.
As an HR Administrator, I want to configure grace time and exception rules relative to each employee's effective Working Schedule, so that minor lateness within policy doesn't get flagged, while genuine exceptions are caught.
Acceptance Criteria (2)
Grace time (minutes) is configurable per company/schedule template, applied relative to each employee's own effective shift start time from Epic 7, not a global fixed clock time.
Exception types (Late, Early Leave, Missing Check-out, Absence) are computed against the employee's specific schedule for that day, correctly handling employees on different shift templates within the same company.
HRM-V1-E09-US009
الموارد البشرية والإدارة · موديول Epic 9: Time, Attendance & Shift ManagementHRM V1.0c · المصدر الأساسي
بصفتي الموظف، أريد تنفيذ المتطلب التشغيلي في موديول Epic 9: Time, Attendance & Shift Management، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance Processing Process
فتح سريع للقصة
Actor: Employee
حسب المصدر الأساسي HRM V1.0c — As an Employee, I want to submit a self-service request disputing or explaining an attendance record (e.g. forgot to check out, device malfunction), so that I have a formal channel to get my attendance corrected rather than relying on an informal conversation with HR.
As an Employee, I want to submit a self-service request disputing or explaining an attendance record (e.g. forgot to check out, device malfunction), so that I have a formal channel to get my attendance corrected rather than relying on an informal conversation with HR.
Acceptance Criteria (4)
Employee submits an Attendance Correction Request for a specific date, stating the claimed correct time and a reason, optionally with supporting attachment.
Request routes through the employee's Report Line (Epic 4, US-014-017) for approval, exactly like any other request type.
Approved corrections feed into the attendance record as a 'Manual Entry — Correction' with precedence per US-001, referencing the approved request for audit traceability.
Rejected corrections leave the original attendance record unchanged, with the rejection reason visible to the employee.
HRM-V1-E09-US010
الموارد البشرية والإدارة · موديول Epic 9: Time, Attendance & Shift ManagementHRM V1.0c · المصدر الأساسي
بصفتي الموظف، أريد إنشاء سجل جديد في موديول Epic 9: Time, Attendance & Shift Management بعد التحقق من البيانات والقواعد، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance Processing Process
فتح سريع للقصة
Actor: Employee or Manager
حسب المصدر الأساسي HRM V1.0c — As an Employee or Manager, I want to receive notifications for attendance-related events (missing check-out, unresolved conflict, correction request status), so that issues are addressed promptly rather than discovered at payroll time.
As an Employee or Manager, I want to receive notifications for attendance-related events (missing check-out, unresolved conflict, correction request status), so that issues are addressed promptly rather than discovered at payroll time.
Acceptance Criteria (1)
Notifications cover: missing check-out same-day reminder, correction request submitted/approved/rejected, and (for HR) new conflicts entering the review queue (US-001).
HRM-V1-E09-US011
الموارد البشرية والإدارة · موديول Epic 9: Time, Attendance & Shift ManagementHRM V1.0c · المصدر الأساسي
بصفتي مسؤول النظام، أريد إنشاء سجل جديد في موديول Epic 9: Time, Attendance & Shift Management بعد التحقق من البيانات والقواعد، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance Processing Process
فتح سريع للقصة
Actor: IT/Facilities Administrator
حسب المصدر الأساسي HRM V1.0c — As an IT/Facilities Administrator, I want to register physical Gate/access-control devices (turnstiles, door readers) separately from biometric time-attendance devices, so that entry-exit access logs and time-attendance punches can be correctly distinguished even when the same physical hardware vendor provides both.
As an IT/Facilities Administrator, I want to register physical Gate/access-control devices (turnstiles, door readers) separately from biometric time-attendance devices, so that entry-exit access logs and time-attendance punches can be correctly distinguished even when the same physical hardware vendor provides both.
Acceptance Criteria (3)
Gate device record has Location, Device Type, and an explicit 'Counts as Attendance Punch' flag — only devices with this flag feed the Attendance Data Sources pipeline (US-001); others log access-only events for security/facilities purposes.
Employee access-card issuance (created during onboarding custody provisioning, Epic 6 US-014) is linked to Gate device permissions, so IT can configure which gates a badge opens without that being conflated with attendance tracking.
Revoking access during offboarding (Epic 23, US-005's Admin/Facilities checklist) disables the badge across all linked Gate devices in one action, not per-device individually.
HRM-V1-E09-US012
الموارد البشرية والإدارة · موديول Epic 9: Time, Attendance & Shift ManagementHRM V1.0c · المصدر الأساسي
بصفتي مسؤول النظام، أريد تنفيذ المتطلب التشغيلي في موديول Epic 9: Time, Attendance & Shift Management، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance Processing Process
فتح سريع للقصة
Actor: HR Administrator
حسب المصدر الأساسي HRM V1.0c — As an HR Administrator, I want to configure attendance policy categories — Office Attendance rules, Time Management rules, and General Policies — as distinct configurable groups, so that different work arrangements (on-site vs. remote/hybrid) can follow appropriately different rules without one giant undifferentiated settings screen.
As an HR Administrator, I want to configure attendance policy categories — Office Attendance rules, Time Management rules, and General Policies — as distinct configurable groups, so that different work arrangements (on-site vs. remote/hybrid) can follow appropriately different rules without one giant undifferentiated settings screen.
Acceptance Criteria (4)
Office Attendance policy group covers on-site-specific rules: gate/biometric requirement, grace time (cross-referenced from US-008), minimum on-site hours.
Time Management policy group covers punch-source precedence and rounding rules (cross-referenced from US-001's multi-source precedence).
General Policies group covers company-wide defaults not specific to a work arrangement (e.g. default absence-marking behavior after N consecutive missing days).
Each policy group can be assigned per Organizational Unit or Job Position (e.g. a remote-eligible department skips the Office Attendance group's on-site rules entirely), consistent with the most-specific-policy-wins pattern already used for Resignation/Termination Policy (Epic 5, US-002).
HRM-V1-E10-US001
الموارد البشرية والإدارة · موديول Epic 10: Overtime ManagementHRM V1.0c · المصدر الأساسي
بصفتي الموظف، أريد عرض ومتابعة سجلات موديول Epic 10: Overtime Management مع الفلاتر والإجماليات المسموح بها، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance & Leave Control Process
فتح سريع للقصة
Actor: Employee
حسب المصدر الأساسي HRM V1.0c — As an Employee, I want to submit an overtime request for hours worked beyond my standard schedule, so that it can be reviewed and correctly compensated per company policy.
As an Employee, I want to submit an overtime request for hours worked beyond my standard schedule, so that it can be reviewed and correctly compensated per company policy.
Acceptance Criteria (3)
Request captures Date, Start/End Time, Reason; system auto-calculates hours and applies the relevant multiplier (weekday/rest-day/holiday/night per Epic 5, US-004) for preview before submission.
If the company has Pre-Authorization Mode enabled, the request must be submitted and approved BEFORE the overtime work occurs; after-the-fact submissions are flagged as 'Retroactive — requires justification' and require an additional reason field.
System checks the employee's running monthly OT hours against a configurable monthly cap; requests that would exceed the cap are still submittable but flagged for escalated approval (a second approval step) rather than being blocked outright.
HRM-V1-E10-US002
الموارد البشرية والإدارة · موديول Epic 10: Overtime ManagementHRM V1.0c · المصدر الأساسي
بصفتي المدير المسؤول، أريد تنفيذ المتطلب التشغيلي في موديول Epic 10: Overtime Management، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance & Leave Control Process
فتح سريع للقصة
Actor: Direct Manager
حسب المصدر الأساسي HRM V1.0c — As a Direct Manager, I want to submit an overtime record on behalf of an employee, so that I can log overtime for team members who can't self-submit (e.g. no system access).
As a Direct Manager, I want to submit an overtime record on behalf of an employee, so that I can log overtime for team members who can't self-submit (e.g. no system access).
Acceptance Criteria (1)
Manager-submitted overtime is marked with source 'Manager-Submitted' and, if the employee later submits their own request for an overlapping date/time, the system blocks the duplicate with a message identifying the existing manager-submitted record, rather than creating two competing OT records for the same hours.
HRM-V1-E10-US003
الموارد البشرية والإدارة · موديول Epic 10: Overtime ManagementHRM V1.0c · المصدر الأساسي
بصفتي المعتمد، أريد عرض ومتابعة سجلات موديول Epic 10: Overtime Management مع الفلاتر والإجماليات المسموح بها، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance & Leave Control Process
فتح سريع للقصة
Actor: Approver
حسب المصدر الأساسي HRM V1.0c — As an Approver, I want to review and approve/reject overtime requests with visibility into the employee's monthly cap status, so that I can make an informed decision rather than approving blind.
As an Approver, I want to review and approve/reject overtime requests with visibility into the employee's monthly cap status, so that I can make an informed decision rather than approving blind.
Acceptance Criteria (2)
Approval screen shows the employee's running monthly OT total, the cap, and whether this request would push them over it.
Escalated (over-cap) requests require a higher-privilege approver role, configured per company.
HRM-V1-E10-US004
الموارد البشرية والإدارة · موديول Epic 10: Overtime ManagementHRM V1.0c · المصدر الأساسي
بصفتي الموظف، أريد عرض ومتابعة سجلات موديول Epic 10: Overtime Management مع الفلاتر والإجماليات المسموح بها، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance & Leave Control Process
فتح سريع للقصة
Actor: Employee or HR Administrator
حسب المصدر الأساسي HRM V1.0c — As an Employee or HR Administrator, I want to view overtime requests (mine, or company-wide for HR) with status and totals, so that I can track overtime usage.
As an Employee or HR Administrator, I want to view overtime requests (mine, or company-wide for HR) with status and totals, so that I can track overtime usage.
Acceptance Criteria (1)
Employee view: own requests only, with running monthly total displayed. HR/Admin view: company-wide, filterable by employee, status, date range, and 'over-cap' flag.
HRM-V1-E10-US005
الموارد البشرية والإدارة · موديول Epic 10: Overtime ManagementHRM V1.0c · المصدر الأساسي
بصفتي مسؤول النظام، أريد عرض ومتابعة سجلات موديول Epic 10: Overtime Management مع الفلاتر والإجماليات المسموح بها، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Attendance & Leave Control Process
فتح سريع للقصة
Actor: HR Administrator
حسب المصدر الأساسي HRM V1.0c — As an HR Administrator, I want an overtime summary report by employee/department/period, so that I can monitor overtime cost trends.
As an HR Administrator, I want an overtime summary report by employee/department/period, so that I can monitor overtime cost trends.
Acceptance Criteria (1)
Report includes total OT hours and estimated cost (hours x multiplier x hourly rate per Epic 5, US-004) by employee and department, exportable per the standard export permission/kill-switch pattern.
HRM-V1-E11-US001
الموارد البشرية والإدارة · موديول Epic 11: Time offHRM V1.0c · المصدر الأساسي
بصفتي مسؤول النظام، أريد إنشاء سجل جديد في موديول Epic 11: Time off بعد التحقق من البيانات والقواعد، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Leave Management Process
فتح سريع للقصة
Actor: HR Administrator
حسب المصدر الأساسي HRM V1.0c — As an HR Administrator, I want the system to ship pre-configured with the 17 leave types mandated by Egyptian Labor Law No. 14/2025 (exact duration, wage ratio, and legal article per type), with the ability to add my own custom non-statutory types on top, so that my company is compliant by default without needing a lawyer to configure leave policy.
As an HR Administrator, I want the system to ship pre-configured with the 17 leave types mandated by Egyptian Labor Law No. 14/2025 (exact duration, wage ratio, and legal article per type), with the ability to add my own custom non-statutory types on top, so that my company is compliant by default without needing a lawyer to configure leave policy.
Acceptance Criteria (5)
Leave Type has Name (EN/AR), Category (Statutory / Custom), Allocation Method (Flat Annual / Monthly Accrual / Event-Triggered), Wage Ratio (100% / 85% / 75% / 50% / Unpaid, or Tiered for Sick Leave), Legal Article Reference (read-only for Statutory types), Approval Workflow Pattern (per Feature: Dynamic Approval Workflow), Attachment Requirement (None / Optional / Mandatory), and Gender/Marital-status eligibility filters where legally applicable.
Statutory-category types cannot have their Wage Ratio, minimum Duration, or Legal Article edited below the legal floor; HR may only extend duration/wage ratio above the statutory minimum, never relax below the law.
Monthly Accrual method (used for Annual Leave) defines an accrual rate and a cap, with configurable carry-over rules at year-end (forfeit / cap-and-carry / unlimited carry).
Sick Leave's tiered wage ratio (75% days 1-90, 85% days 91-180) is modeled as a wage-ratio schedule, not a flat percentage, so payroll applies the correct tier based on cumulative sick days taken within the entitlement period.
Deleting a Statutory Leave Type is permanently blocked; deactivation is also blocked for Statutory types since employees always retain the legal right to these categories. Custom types follow the standard reference-data CRUD pattern (Epic 5, US-001).
HRM-V1-E11-US002
الموارد البشرية والإدارة · موديول Epic 11: Time offHRM V1.0c · المصدر الأساسي
بصفتي مسؤول النظام، أريد احتساب ومطابقة القيم والأرصدة في موديول Epic 11: Time off، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Leave Management Process
فتح سريع للقصة
Actor: HR Administrator
حسب المصدر الأساسي HRM V1.0c — As an HR Administrator, I want to allocate leave balances at company level with individual overrides for exceptions, so that standard entitlements don't require per-employee manual setup.
As an HR Administrator, I want to allocate leave balances at company level with individual overrides for exceptions, so that standard entitlements don't require per-employee manual setup.
Acceptance Criteria (2)
Company-level allocation sets the default entitlement per Leave Type; individual overrides apply only to specific employees, taking precedence over the company default, and can never be set below the statutory floor for Statutory-category types.
Allocation respects the Leave Type's method (flat grant vs. accrual schedule kickoff vs. event-triggered grant).
HRM-V1-E11-US003
الموارد البشرية والإدارة · موديول Epic 11: Time offHRM V1.0c · المصدر الأساسي
بصفتي مسؤول النظام، أريد عرض ومتابعة سجلات موديول Epic 11: Time off مع الفلاتر والإجماليات المسموح بها، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Leave Management Process
فتح سريع للقصة
Actor: HR Administrator
حسب المصدر الأساسي HRM V1.0c — As an HR Administrator, I want to view and search leave allocations at both company and individual level, so that I can audit entitlements.
As an HR Administrator, I want to view and search leave allocations at both company and individual level, so that I can audit entitlements.
Acceptance Criteria (1)
Company-level list shows Leave Type, default entitlement, employee count using the default. Individual list shows employee, Leave Type, current balance, and whether it's an override.
HRM-V1-E11-US004
الموارد البشرية والإدارة · موديول Epic 11: Time offHRM V1.0c · المصدر الأساسي
بصفتي الموظف، أريد احتساب ومطابقة القيم والأرصدة في موديول Epic 11: Time off، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Leave Management Process
فتح سريع للقصة
Actor: Employee
حسب المصدر الأساسي HRM V1.0c — As an Employee, I want to submit a leave request for a date range, with the system automatically excluding non-working days and public holidays from the balance deduction, so that I'm not charged leave for days I wasn't scheduled to work anyway.
As an Employee, I want to submit a leave request for a date range, with the system automatically excluding non-working days and public holidays from the balance deduction, so that I'm not charged leave for days I wasn't scheduled to work anyway.
Acceptance Criteria (6)
On submission the system assigns a Request Number LR-YYYY-NNNNN (BR-001: unique, sequential within calendar year, never reused even if cancelled).
Duration auto-calculates as working days only, per the employee's effective Working Schedule and company Holiday Calendar, displayed before submission.
If Leave Type's allow_negative_balance is false (default), a request exceeding available balance is blocked with the exact shortfall (BR-002: balance check occurs before submission proceeds to any approval layer); if true, allowed with a clear warning to employee and approver.
Attachment is enforced per the Leave Type's Attachment Requirement (BR-003): Mandatory-attachment types block submission until a file is attached; Optional types allow submission but flag it missing on the approver's screen.
Balance is reserved on submission and finally deducted only on final approval; rejection/cancellation releases the reservation (BR-004).
Requests against a future accrual period are evaluated against projected balance as of the leave start date, not submission date (BR-005).
HRM-V1-E11-US005
الموارد البشرية والإدارة · موديول Epic 11: Time offHRM V1.0c · المصدر الأساسي
بصفتي الموظف، أريد تعديل بيانات موديول Epic 11: Time off مع حفظ التاريخ وإعادة الاحتساب، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Leave Management Process
فتح سريع للقصة
Actor: Employee
حسب المصدر الأساسي HRM V1.0c — As an Employee, I want to request cancellation or partial cut of an approved leave, so that my balance and payroll correctly reflect a change in plans.
As an Employee, I want to request cancellation or partial cut of an approved leave, so that my balance and payroll correctly reflect a change in plans.
Acceptance Criteria (3)
Not-yet-started leave: full cancellation releases the full reserved balance immediately upon approval.
In-progress leave: partial cut recalculates balance/payroll only for the affected remaining days.
Cancellation of a request tied to a payroll cycle already Calculated or Approved (Epic 19) triggers a recalculation flag rather than a silent balance change (BR-007).
HRM-V1-E11-US006
الموارد البشرية والإدارة · موديول Epic 11: Time offHRM V1.0c · المصدر الأساسي
بصفتي الموظف، أريد عرض ومتابعة سجلات موديول Epic 11: Time off مع الفلاتر والإجماليات المسموح بها، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Leave Management Process
فتح سريع للقصة
Actor: Employee
حسب المصدر الأساسي HRM V1.0c — As an Employee, I want to view my leave request history with status, so that I can track my requests.
As an Employee, I want to view my leave request history with status, so that I can track my requests.
Acceptance Criteria (1)
List shows Request Number, Type, dates, working-days deducted, status, and current approval layer; filterable by Type and Status.
HRM-V1-E11-US007
الموارد البشرية والإدارة · موديول Epic 11: Time offHRM V1.0c · المصدر الأساسي
بصفتي المعتمد، أريد عرض ومتابعة سجلات موديول Epic 11: Time off مع الفلاتر والإجماليات المسموح بها، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Leave Management Process
فتح سريع للقصة
Actor: Employee or Approver
حسب المصدر الأساسي HRM V1.0c — As an Employee or Approver, I want to view full leave request details including the working-day calculation breakdown, so that the deducted amount is transparent and auditable.
As an Employee or Approver, I want to view full leave request details including the working-day calculation breakdown, so that the deducted amount is transparent and auditable.
Acceptance Criteria (1)
Shows each date in range with a flag for excluded non-working/holiday days, plus the full approval-layer history (who acted, when, comments) per BR-008.
HRM-V1-E11-US009
الموارد البشرية والإدارة · موديول Epic 11: Time offHRM V1.0c · المصدر الأساسي
بصفتي مسؤول النظام، أريد مراجعة واعتماد أو رفض العملية في موديول Epic 11: Time off حسب الصلاحية، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Leave Management Process
فتح سريع للقصة
Actor: HR Administrator
حسب المصدر الأساسي HRM V1.0c — As an HR Administrator, I want each Leave Type to follow one of four distinct approval patterns, so that sensitive leave (e.g. medical) is routed appropriately while routine leave isn't bottlenecked by unnecessary layers.
As an HR Administrator, I want each Leave Type to follow one of four distinct approval patterns, so that sensitive leave (e.g. medical) is routed appropriately while routine leave isn't bottlenecked by unnecessary layers.
Acceptance Criteria (6)
Pattern 1: Standard - Employee to Direct Manager to HR. Used for Annual Leave, Casual Leave, Marriage Leave, Bereavement Leave, and similar routine types.
Pattern 2: HR-Direct (Manager Skipped) - Employee to HR directly, with the Direct Manager receiving an Informed-only notification. Used for Sick/Medical Leave and Court Summons Leave, preserving employee medical privacy.
Pattern 3: Multi-Level - Employee to Direct Manager to HR to HR Manager to Top Management, for durations/types exceeding a configurable threshold (e.g. Unpaid Leave beyond 30 days, Hajj/Umrah Leave). Rejection at any layer terminates the request and returns it with the rejecting layer's mandatory comment.
Pattern 4: Automatic - no approval required (used only for system-recognized Public Holiday coverage, not a requestable leave type).
The applicable pattern is set once per Leave Type (US-001) and applied consistently to every request of that type, not selectable per-request.
Each approval layer has an SLA timer (default 24 hours, configurable); on timeout the request auto-escalates to the next layer up with an in-system notification (BR-009).
HRM-V1-E11-US010
الموارد البشرية والإدارة · موديول Epic 11: Time offHRM V1.0c · المصدر الأساسي
بصفتي مستخدم الأعمال، أريد تنفيذ المتطلب التشغيلي في موديول Epic 11: Time off، حتى تكتمل العملية بنتيجة صحيحة وقابلة للتتبع.
دورة العمل: دورة Leave Management Process
فتح سريع للقصة
Actor: system architect
حسب المصدر الأساسي HRM V1.0c — As a system architect, I want the leave request lifecycle to follow a formal state machine, so that status transitions are predictable, auditable, and impossible to corrupt via invalid transitions.
As a system architect, I want the leave request lifecycle to follow a formal state machine, so that status transitions are predictable, auditable, and impossible to corrupt via invalid transitions.
Valid transitions only: Draft to Submitted (employee); Submitted to Layer1_Approved or Rejected (first-layer approver); Layer1_Approved to Layer2_Approved or Approved or Rejected depending on pattern; any pending state to Timeout_Escalated (system, SLA-driven), which re-enters the normal flow at the escalation target; Submitted/Layer1_Approved/Layer2_Approved to Cancelled (employee, only before leave start date, or HR override after).
Invalid transitions (e.g. approving an already-Approved or Cancelled request) are rejected with a clear error identifying the current state, never silently ignored.
Every transition writes an immutable audit-log row (BR-008): request_number, from_state, to_state, actor, timestamp, comment (mandatory on Rejected).