CTT Bulk Status Helper
This page explains batch CTT status flow behind bulk-status helper behavior.
API Endpoints
POST /ticket/ctt/bulk-update-ctt-activity-statusPOST /ticket/ctt/bulk-resolve-by-ticket-id
Purpose
Bulk status helper lets system resolve or update many CTT items without forcing one-request-per-ticket handling.
Business meaning
This flow is batch wrapper around per-item resolved-status logic.
It does not invent separate status rules. It reuses same resolved path, but:
- loads many CTT items at once
- finds latest activity per item
- routes each item to TaaS or TMF as needed
- keeps audit per item
Entry points confirmed in code
POST /ticket/ctt/bulk-update-ctt-activity-statusPOST /ticket/ctt/bulk-resolve-by-ticket-id
Flow summary
| Step | Business meaning |
|---|---|
| receive bulk request | batch status processing starts |
| build base audit template | each item gets traceable audit |
| resolve CTT set by ids or TMF ticket ids | target population is built |
| loop each CTT item | batch runs item by item |
| load latest activity | per-item context is prepared |
| TaaS CTT? | latest activity lookup differs for TaaS items |
| load current CTT LOVs | local status context is refreshed |
| build resolved activity snapshot | per-item resolved payload is prepared |
| save or upsert resolved activity | local activity record is written |
| send resolved state to TaaS or TMF | downstream sync happens |
| run resolved post-logic | follow-up internal logic executes |
| write item audit | per-item outcome is stored |
Implementation note
Current repo matches flowchart intent:
- controller exposes two bulk endpoints
- service loops through matched CTTs
- TaaS detection still depends on
cttNopattern - resolved activity is upserted before post-logic
- downstream sync is per item, not one batch call
Code refs:
mvp3-ticket-service/src/modules/ctt/ctt.controller.ts:211mvp3-ticket-service/src/modules/ctt/ctt.controller.ts:222mvp3-ticket-service/src/modules/ctt/ctt.service.ts:4914mvp3-ticket-service/src/modules/ctt/ctt.service.ts:4945mvp3-ticket-service/src/modules/ctt/ctt.service.ts:5091
Important behavior
- bulk flow still depends on valid latest activity per item
- TaaS and TMF routing stays per item
- batch endpoint in controller returns in-progress style message, while service does real work
- one bad item should be investigated at per-item audit level