Skip to main content

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-status
  • POST /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-status
  • POST /ticket/ctt/bulk-resolve-by-ticket-id

Flow summary

StepBusiness meaning
receive bulk requestbatch status processing starts
build base audit templateeach item gets traceable audit
resolve CTT set by ids or TMF ticket idstarget population is built
loop each CTT itembatch runs item by item
load latest activityper-item context is prepared
TaaS CTT?latest activity lookup differs for TaaS items
load current CTT LOVslocal status context is refreshed
build resolved activity snapshotper-item resolved payload is prepared
save or upsert resolved activitylocal activity record is written
send resolved state to TaaS or TMFdownstream sync happens
run resolved post-logicfollow-up internal logic executes
write item auditper-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 cttNo pattern
  • 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:211
  • mvp3-ticket-service/src/modules/ctt/ctt.controller.ts:222
  • mvp3-ticket-service/src/modules/ctt/ctt.service.ts:4914
  • mvp3-ticket-service/src/modules/ctt/ctt.service.ts:4945
  • mvp3-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