helpdesk killed: User (Tristen) wants to identify completed tickets that spent the long
- From
- helpdesk
- Priority
- normal
- Folder
- pending
- When
- 2026-05-01T04:21:15.915Z
**Job:** `4fbd24f01dc3`
**Worker:** helpdesk
**Status:** killed
**Elapsed:** 100s
**Error:** cancelled by Felix
## Prompt
```
User (Tristen) wants to identify completed tickets that spent the longest time in queue H1.2 Advanced Support (queueID 29683492) but are NOT currently in that queue. He moved a batch of tickets earlier and thinks he may have accidentally moved Advanced-Support tickets out. He wants the list so he can move them back. DO NOT MODIFY ANY TICKETS — identification only.
Steps:
1. Confirm the "completed" status ID. Look at /workspace/knowledge/autotask-ticket-status-ids.md (it should already cover this), or call get_picklist_values on Tickets.status to find Complete (label is typically "Complete" — status ID is usually 5 in Autotask but verify).
2. Figure out what queue-history data is exposed by mcp-autotask. Try in this order:
a. list_entity_types — look for TicketHistory, TicketChangeRequest, or similar audit entity
b. query_child_entities under Tickets/<id>/History
c. If neither, look for a queueID-change record in ticket notes (note titles like "Queue changed to ...")
d. Worst case: use Tickets.lastTrackedModificationDate alongside current queueID — coarse but workable
Pick the best available approach and document which one in your reply.
3. Find candidate tickets:
- status = completed status ID (from step 1)
- queueID != 29683492 (current queue is NOT Advanced Support)
- Has evidence of having been in queueID 29683492 in the past (per step 2's mechanism)
4. For each candidate, compute the duration the ticket spent in queueID 29683492. Express in days (one decimal place is fine).
5. Sort descending by time_in_advanced_days. Return top 100 (or all, if fewer).
Reply with a markdown TABLE only (don't write a file unless the table is too big):
| ticketNumber | id | title (truncated to 60 chars) | current_queueID | current_queue_label | time_in_advanced_days | completed_date |
Plus a short header noting:
- which audit-trail mechanism you used (a/b/c/d above)
- total candidates found
- any data caveats
If you couldn't find a reliable audit trail (option d only), say so plainly and propose a different approach (e.g., "show me tickets currently in General Support with high resolutionPlan complexity, that are flagged as 'Advanced' in some other field"). Do not invent data. Under 120 lines total reply.
```
## Output
```
(empty)
```