Private
Tracker *Bug Feature Support Testing
Subject *
Description Edit User Story: Enter Actual Inventory Epic: Actuals Capture As a Field Staff I want to enter actual quantities for inventory, equipment, and labour So that accurate resource usage is recorded against the job. Acceptance Criteria Recap Field Staff can enter actuals (inventory, equipment, labour). Validation rules (no negative qty, mandatory reason code if > planned). Draft save possible; Submit notifies Admin. Admin can view entered actuals in preview mode. Audit log created for every save/submit. Developer Test Cases Field Staff Inventory entry Ensure API POST /jobs/{id}/actuals accepts payload with inventory lines. Validate actualQty >= 0. Reject negatives with 400 Bad Request. If actualQty > plannedQty and reasonCode missing → return error. Ensure remarks are optional. Ensure DB snapshot persists with correct schema. Equipment entry Test planned equipment updates correctly (plannedUsed vs actualUsed). Ensure new equipment can be added dynamically with reason/remarks. Labour entry Ensure actual hours are integers/decimals. If actual > planned and remarks missing → reject with error. Ensure multiple roles can be recorded. Attachments Verify file upload API supports .jpg, .png, .pdf only. Reject files > 10MB. Ensure presigned S3 URL is generated. Save as Draft Test DB stores draft with status = draft. Ensure multiple saves overwrite draft but create new audit revision. Submit for Review Ensure status changes to submitted. Notification event ActualsSubmitted emitted. Audit log stored with correct metadata (userId, timestamp, version). Admin Preview Actuals Ensure API GET /jobs/{id}/actuals/preview returns planned vs actual. Ensure variances highlighted if actual ≠ planned. Ensure attachments appear in preview payload. Read-only Access Admin cannot edit field staff draft directly (must use revise flow later). Audit Logs Verify audit endpoint GET /jobs/{id}/actuals/history shows correct actions (saveDraft, submit). Tester QA Test Cases Field Staff Basic Input Validation Try entering negative qty → expect error popup. Enter actual > planned without reason → expect error. Enter actual > planned with reason → expect success. Labour Hours Enter planned = 8, actual = 9 without remarks → expect error. Enter planned = 8, actual = 9 with remarks → expect success. Draft Save Enter partial data, save draft, log out → log back in, confirm draft loads. Attachment Handling Upload .jpg < 10MB → success. Upload .exe → expect rejection. Upload .pdf > 10MB → expect rejection. Submit Flow After submit, verify notification appears in Admin’s inbox. Confirm draft moves to submitted status. Admin Preview Screen Open submitted job → verify planned vs actual table displayed. Confirm variances highlighted (e.g., +2 red, -1 green). Confirm attachments are visible/downloadable. Access Control Attempt to edit field staff draft → ensure UI prevents editing. Confirm only revise flow later allows edits. Audit History Open history tab → confirm actions “Under Review” and “Submitted” appear with correct user info.
Status New
Assignee Ajit AChandra SekharDivya Inapakurthighazala shamimJohn PatchalaKalyan RavulaKarthik PalakondaMadhu BabuMani KantaPavan Kumar MuralaRamu KodaliRavi Shankar PalleRavindra AtthotaRubanraj cSai MahanandaSai Priyatham SadineniSai Teja PopuriSravani RangannapalemSreenivas PisupatiTeja Sriram SanganiThirupathirao Uppuvinay palakondaYalavarthi Thriveni
Target version Sprint (product subscription & deliverable pre- orders) Backlog Sprint2
Parent task
Estimated time Hours