kamau1 commited on
Commit
be71f67
·
1 Parent(s): 101c6eb

Remove regional assignment restrictions and update services/docs to allow cross-region ticket pickup.

Browse files
docs/agent/frontend/TICKET_ACTIONS_SYSTEM.md CHANGED
@@ -4,6 +4,8 @@
4
 
5
  The ticket actions system provides dynamic action buttons based on the ticket state, user assignment, and journey progress. The backend calculates what actions are available and returns them in the ticket detail endpoint.
6
 
 
 
7
  ## How It Works
8
 
9
  ### Backend Calculates Actions
@@ -220,7 +222,6 @@ When `team_info.required_size > 1`:
220
  - "Already assigned to this ticket" - Duplicate assignment
221
 
222
  **403 Forbidden:**
223
- - "Ticket not in your region" - Regional restriction
224
  - "You are not assigned to this ticket" - Wrong user
225
 
226
  **400 Bad Request:**
 
4
 
5
  The ticket actions system provides dynamic action buttons based on the ticket state, user assignment, and journey progress. The backend calculates what actions are available and returns them in the ticket detail endpoint.
6
 
7
+ **Important:** Agents can pick tickets from **any region** in their project. Region is for filtering/preference only, not access control. Agents go where the work is.
8
+
9
  ## How It Works
10
 
11
  ### Backend Calculates Actions
 
222
  - "Already assigned to this ticket" - Duplicate assignment
223
 
224
  **403 Forbidden:**
 
225
  - "You are not assigned to this ticket" - Wrong user
226
 
227
  **400 Bad Request:**
docs/agent/implementation-notes/REGIONAL_ACCESS_FIX.md ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Regional Access Fix - Agents Can Work Across Regions
2
+
3
+ ## Problem
4
+
5
+ The initial implementation blocked agents from picking tickets outside their assigned region:
6
+
7
+ ```json
8
+ {
9
+ "available_actions": [],
10
+ "message": "Ticket not in your assigned region"
11
+ }
12
+ ```
13
+
14
+ This was too restrictive for real-world scenarios.
15
+
16
+ ## Business Reality
17
+
18
+ In real ISP field operations:
19
+ - Agents need to earn a living
20
+ - Agents go where the work is
21
+ - Agents don't wait for work to come to their region
22
+ - Regional assignment is for **preference/filtering**, not **access control**
23
+
24
+ ## Solution
25
+
26
+ Removed regional restrictions from:
27
+
28
+ 1. **`ticket_action_service.py`** - Removed region check in action calculator
29
+ 2. **`ticket_assignment_service.py`** - Removed `_validate_agent_region_match()` call
30
+ 3. **API documentation** - Updated to reflect no regional restrictions
31
+
32
+ ## What Changed
33
+
34
+ ### Before
35
+ ```python
36
+ # Check region match
37
+ if team_member.project_region_id is None:
38
+ can_pick = True
39
+ elif team_member.project_region_id == ticket.project_region_id:
40
+ can_pick = True
41
+ else:
42
+ message = "Ticket not in your assigned region"
43
+ ```
44
+
45
+ ### After
46
+ ```python
47
+ # Agent can pick any ticket in their project (no regional restriction)
48
+ # Region is just for filtering, not access control
49
+ actions = [
50
+ {"action": "pick", "label": "Pick Ticket", "type": "primary"}
51
+ ]
52
+ ```
53
+
54
+ ## How Region Works Now
55
+
56
+ **Region field is used for:**
57
+ - Filtering tickets by location
58
+ - Showing agent's preferred/primary region
59
+ - Analytics and reporting
60
+ - Route optimization suggestions
61
+
62
+ **Region field is NOT used for:**
63
+ - ❌ Blocking access to tickets
64
+ - ❌ Preventing self-assignment
65
+ - ❌ Restricting which tickets agents can see
66
+
67
+ ## Example Scenario
68
+
69
+ **Agent Profile:**
70
+ - Name: John
71
+ - Primary Region: Nairobi East
72
+ - Project: SwiftNet Fiber
73
+
74
+ **Tickets Available:**
75
+ - Ticket A: Nairobi East (his region)
76
+ - Ticket B: Nairobi West (different region)
77
+ - Ticket C: Mombasa (different city)
78
+
79
+ **Result:** John can pick **all three tickets** because they're all in his project.
80
+
81
+ **Why?** John might live near the border of Nairobi West, or he might be willing to travel to Mombasa for a high-value installation. The system shouldn't block him from earning.
82
+
83
+ ## Frontend Impact
84
+
85
+ No changes needed in frontend. The `available_actions` array will now include the "pick" action for all tickets in the agent's project, regardless of region.
86
+
87
+ ## Testing
88
+
89
+ After this fix, agents should see:
90
+
91
+ ```json
92
+ {
93
+ "available_actions": [
94
+ {
95
+ "action": "pick",
96
+ "label": "Pick Ticket",
97
+ "type": "primary"
98
+ }
99
+ ],
100
+ "message": "Available for pickup"
101
+ }
102
+ ```
103
+
104
+ For any open ticket in their project, as long as:
105
+ - They're on the project team
106
+ - They have capacity (< 4 active tickets)
107
+ - Ticket is not already assigned
108
+
109
+ ## Files Modified
110
+
111
+ 1. `src/app/services/ticket_action_service.py` - Removed region check
112
+ 2. `src/app/services/ticket_assignment_service.py` - Removed region validation
113
+ 3. `src/app/api/v1/ticket_assignments.py` - Updated documentation
114
+ 4. `docs/agent/frontend/TICKET_ACTIONS_SYSTEM.md` - Added note about no restrictions
115
+ 5. `docs/agent/implementation-notes/TICKET_ACTIONS_IMPLEMENTATION.md` - Updated testing checklist
116
+
117
+ ## Migration
118
+
119
+ No database migration needed. This is a business logic change only.
120
+
121
+ ## Backward Compatibility
122
+
123
+ Fully backward compatible. Existing assignments are not affected. Only changes how new tickets can be picked.
docs/agent/implementation-notes/TICKET_ACTIONS_IMPLEMENTATION.md CHANGED
@@ -156,9 +156,10 @@ DROPPED (pending_review)
156
  - [ ] Agent with 4 active tickets can't pick more
157
  - [ ] Agent with 3 active tickets can pick 1 more
158
 
159
- ### Regional Restrictions
160
- - [ ] Agent can only pick tickets in their region
161
- - [ ] Agent with no region can pick any ticket
 
162
 
163
  ## Migration Steps
164
 
 
156
  - [ ] Agent with 4 active tickets can't pick more
157
  - [ ] Agent with 3 active tickets can pick 1 more
158
 
159
+ ### Regional Access (No Restrictions)
160
+ - [ ] Agent can pick tickets from any region in their project
161
+ - [ ] Region is for filtering/preference, not access control
162
+ - [ ] Agents go where the work is to earn a living
163
 
164
  ## Migration Steps
165
 
docs/devlogs/browser/response.json CHANGED
@@ -1,412 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  {
2
- "total": 9,
3
- "skip": 0,
4
- "limit": 50,
5
- "tickets": [
6
- {
7
- "id": "1f807cf8-f139-421b-86e3-38c2f8bc7070",
8
- "project_id": "0ade6bd1-e492-4e25-b681-59f42058d29a",
9
- "source": "sales_order",
10
- "source_id": "7ad1e823-9c68-448c-8d7c-7fdefbf640cb",
11
- "ticket_name": "Peter Otieno",
12
- "ticket_type": "installation",
13
- "service_type": "ftth",
14
- "work_description": "Install Standard 20Mbps for Peter Otieno",
15
- "status": "open",
16
- "priority": "normal",
17
- "scheduled_date": "2025-12-10",
18
- "scheduled_time_slot": "10:00-14:00",
19
- "due_date": "2025-11-30T11:41:47.990551Z",
20
- "sla_target_date": "2025-11-30T11:41:47.990551Z",
21
- "sla_violated": false,
22
- "started_at": null,
23
- "completed_at": null,
24
- "is_invoiced": false,
25
- "invoiced_at": null,
26
- "project_region_id": "4cd27765-5720-4cc0-872e-bf0da3cd1898",
27
- "work_location_latitude": null,
28
- "work_location_longitude": null,
29
- "work_location_verified": false,
30
- "notes": "Needs router configuration assistance",
31
- "version": 1,
32
- "created_at": "2025-11-27T11:41:47.990551Z",
33
- "updated_at": "2025-11-27T11:41:47.990555Z",
34
- "project_title": null,
35
- "region_name": null,
36
- "customer_name": null,
37
- "is_open": true,
38
- "is_assigned": false,
39
- "is_in_progress": false,
40
- "is_completed": false,
41
- "is_cancelled": false,
42
- "is_active": true,
43
- "is_overdue": false,
44
- "has_region": true,
45
- "has_schedule": true,
46
- "can_be_assigned": true,
47
- "can_be_started": false,
48
- "can_be_completed": false,
49
- "can_be_cancelled": true
50
- },
51
- {
52
- "id": "74ecc2e2-0526-43ec-a454-8aa8668139a1",
53
- "project_id": "0ade6bd1-e492-4e25-b681-59f42058d29a",
54
- "source": "sales_order",
55
- "source_id": "29417f9e-918f-4efb-8a02-0702c5ca14ff",
56
- "ticket_name": "Sarah Wangari",
57
- "ticket_type": "installation",
58
- "service_type": "ftth",
59
- "work_description": "Install Standard 20Mbps for Sarah Wangari",
60
- "status": "open",
61
- "priority": "normal",
62
- "scheduled_date": "2025-12-19",
63
- "scheduled_time_slot": "15:00",
64
- "due_date": "2025-11-29T18:08:27.148533Z",
65
- "sla_target_date": "2025-11-29T18:08:27.148533Z",
66
- "sla_violated": false,
67
- "started_at": null,
68
- "completed_at": null,
69
- "is_invoiced": false,
70
- "invoiced_at": null,
71
- "project_region_id": "24510a5a-13a6-4334-9055-b4d476aa9e0a",
72
- "work_location_latitude": null,
73
- "work_location_longitude": null,
74
- "work_location_verified": false,
75
- "notes": null,
76
- "version": 1,
77
- "created_at": "2025-11-26T18:08:27.148533Z",
78
- "updated_at": "2025-11-26T18:08:27.148538Z",
79
- "project_title": null,
80
- "region_name": null,
81
- "customer_name": null,
82
- "is_open": true,
83
- "is_assigned": false,
84
- "is_in_progress": false,
85
- "is_completed": false,
86
- "is_cancelled": false,
87
- "is_active": true,
88
- "is_overdue": false,
89
- "has_region": true,
90
- "has_schedule": true,
91
- "can_be_assigned": true,
92
- "can_be_started": false,
93
- "can_be_completed": false,
94
- "can_be_cancelled": true
95
- },
96
- {
97
- "id": "f59b29fc-d0b9-4618-b0d1-889e340da612",
98
- "project_id": "0ade6bd1-e492-4e25-b681-59f42058d29a",
99
- "source": "sales_order",
100
- "source_id": "c93b28c0-d7bf-4f57-b750-d0c6864543b0",
101
- "ticket_name": "Elizabeth Muthoni",
102
- "ticket_type": "installation",
103
- "service_type": "ftth",
104
- "work_description": "Install Premium Fiber 100Mbps for Elizabeth Muthoni",
105
- "status": "open",
106
- "priority": "normal",
107
- "scheduled_date": "2025-12-11",
108
- "scheduled_time_slot": null,
109
- "due_date": "2025-11-29T13:24:19.212882Z",
110
- "sla_target_date": "2025-11-29T13:24:19.212882Z",
111
- "sla_violated": false,
112
- "started_at": null,
113
- "completed_at": null,
114
- "is_invoiced": false,
115
- "invoiced_at": null,
116
- "project_region_id": "4cd27765-5720-4cc0-872e-bf0da3cd1898",
117
- "work_location_latitude": null,
118
- "work_location_longitude": null,
119
- "work_location_verified": false,
120
- "notes": null,
121
- "version": 1,
122
- "created_at": "2025-11-26T13:24:19.212882Z",
123
- "updated_at": "2025-11-26T13:24:19.212885Z",
124
- "project_title": null,
125
- "region_name": null,
126
- "customer_name": null,
127
- "is_open": true,
128
- "is_assigned": false,
129
- "is_in_progress": false,
130
- "is_completed": false,
131
- "is_cancelled": false,
132
- "is_active": true,
133
- "is_overdue": false,
134
- "has_region": true,
135
- "has_schedule": true,
136
- "can_be_assigned": true,
137
- "can_be_started": false,
138
- "can_be_completed": false,
139
- "can_be_cancelled": true
140
- },
141
- {
142
- "id": "70090c47-e9c1-4b0a-add4-69bec53d92f9",
143
- "project_id": "0ade6bd1-e492-4e25-b681-59f42058d29a",
144
- "source": "sales_order",
145
- "source_id": "4bbe8e66-b1c2-476c-af4a-ed19d3281e3a",
146
- "ticket_name": "Robert Kimani",
147
- "ticket_type": "installation",
148
- "service_type": "ftth",
149
- "work_description": "Install Premium Fiber 50Mbps for Robert Kimani",
150
- "status": "open",
151
- "priority": "normal",
152
- "scheduled_date": "2025-12-22",
153
- "scheduled_time_slot": "Morning",
154
- "due_date": "2025-11-29T09:33:10.330653Z",
155
- "sla_target_date": "2025-11-29T09:33:10.330653Z",
156
- "sla_violated": false,
157
- "started_at": null,
158
- "completed_at": null,
159
- "is_invoiced": false,
160
- "invoiced_at": null,
161
- "project_region_id": "4cd27765-5720-4cc0-872e-bf0da3cd1898",
162
- "work_location_latitude": null,
163
- "work_location_longitude": null,
164
- "work_location_verified": false,
165
- "notes": null,
166
- "version": 1,
167
- "created_at": "2025-11-26T09:33:10.330653Z",
168
- "updated_at": "2025-11-26T09:33:10.330656Z",
169
- "project_title": null,
170
- "region_name": null,
171
- "customer_name": null,
172
- "is_open": true,
173
- "is_assigned": false,
174
- "is_in_progress": false,
175
- "is_completed": false,
176
- "is_cancelled": false,
177
- "is_active": true,
178
- "is_overdue": false,
179
- "has_region": true,
180
- "has_schedule": true,
181
- "can_be_assigned": true,
182
- "can_be_started": false,
183
- "can_be_completed": false,
184
- "can_be_cancelled": true
185
- },
186
- {
187
- "id": "2de41ce7-dff1-4151-9710-87958d18b5c4",
188
- "project_id": "0ade6bd1-e492-4e25-b681-59f42058d29a",
189
- "source": "sales_order",
190
- "source_id": "a1d04741-b1b5-4a9e-baf6-d1e186886122",
191
- "ticket_name": "Elizabeth Muthoni",
192
- "ticket_type": "installation",
193
- "service_type": "ftth",
194
- "work_description": "Install Premium Fiber 100Mbps for Elizabeth Muthoni",
195
- "status": "open",
196
- "priority": "normal",
197
- "scheduled_date": "2025-12-11",
198
- "scheduled_time_slot": "Anytime",
199
- "due_date": "2025-11-29T09:33:10.216625Z",
200
- "sla_target_date": "2025-11-29T09:33:10.216625Z",
201
- "sla_violated": false,
202
- "started_at": null,
203
- "completed_at": null,
204
- "is_invoiced": false,
205
- "invoiced_at": null,
206
- "project_region_id": "4cd27765-5720-4cc0-872e-bf0da3cd1898",
207
- "work_location_latitude": null,
208
- "work_location_longitude": null,
209
- "work_location_verified": false,
210
- "notes": null,
211
- "version": 1,
212
- "created_at": "2025-11-26T09:33:10.216625Z",
213
- "updated_at": "2025-11-26T09:33:10.216627Z",
214
- "project_title": null,
215
- "region_name": null,
216
- "customer_name": null,
217
- "is_open": true,
218
- "is_assigned": false,
219
- "is_in_progress": false,
220
- "is_completed": false,
221
- "is_cancelled": false,
222
- "is_active": true,
223
- "is_overdue": false,
224
- "has_region": true,
225
- "has_schedule": true,
226
- "can_be_assigned": true,
227
- "can_be_started": false,
228
- "can_be_completed": false,
229
- "can_be_cancelled": true
230
- },
231
- {
232
- "id": "b2c279c7-861a-414f-839d-f4cedddf5aef",
233
- "project_id": "0ade6bd1-e492-4e25-b681-59f42058d29a",
234
- "source": "sales_order",
235
- "source_id": "99dab688-6f3c-4f41-82b7-5b5508e60453",
236
- "ticket_name": "Catherine Njoki",
237
- "ticket_type": "installation",
238
- "service_type": "ftth",
239
- "work_description": "Install Premium Fiber 100Mbps for Catherine Njoki",
240
- "status": "open",
241
- "priority": "high",
242
- "scheduled_date": "2025-12-29",
243
- "scheduled_time_slot": null,
244
- "due_date": "2025-11-28T08:44:48.613265Z",
245
- "sla_target_date": "2025-11-28T08:44:48.613265Z",
246
- "sla_violated": false,
247
- "started_at": null,
248
- "completed_at": null,
249
- "is_invoiced": false,
250
- "invoiced_at": null,
251
- "project_region_id": null,
252
- "work_location_latitude": null,
253
- "work_location_longitude": null,
254
- "work_location_verified": false,
255
- "notes": "Duplicate customer - second location",
256
- "version": 1,
257
- "created_at": "2025-11-26T08:44:48.613265Z",
258
- "updated_at": "2025-11-26T08:44:48.613267Z",
259
- "project_title": null,
260
- "region_name": null,
261
- "customer_name": null,
262
- "is_open": true,
263
- "is_assigned": false,
264
- "is_in_progress": false,
265
- "is_completed": false,
266
- "is_cancelled": false,
267
- "is_active": true,
268
- "is_overdue": false,
269
- "has_region": false,
270
- "has_schedule": true,
271
- "can_be_assigned": true,
272
- "can_be_started": false,
273
- "can_be_completed": false,
274
- "can_be_cancelled": true
275
- },
276
- {
277
- "id": "113e2c5d-80f3-41fc-98c0-6e16b1a1b049",
278
- "project_id": "0ade6bd1-e492-4e25-b681-59f42058d29a",
279
- "source": "sales_order",
280
- "source_id": "dfd0b969-ca77-4433-9791-9339a79a1807",
281
- "ticket_name": "Anne Njeri",
282
- "ticket_type": "installation",
283
- "service_type": "ftth",
284
- "work_description": "Install Premium Fiber 100Mbps for Anne Njeri",
285
- "status": "open",
286
- "priority": "normal",
287
- "scheduled_date": null,
288
- "scheduled_time_slot": null,
289
- "due_date": "2025-11-29T08:33:01.362984Z",
290
- "sla_target_date": "2025-11-29T08:33:01.362984Z",
291
- "sla_violated": false,
292
- "started_at": null,
293
- "completed_at": null,
294
- "is_invoiced": false,
295
- "invoiced_at": null,
296
- "project_region_id": "4cd27765-5720-4cc0-872e-bf0da3cd1898",
297
- "work_location_latitude": null,
298
- "work_location_longitude": null,
299
- "work_location_verified": false,
300
- "notes": null,
301
- "version": 1,
302
- "created_at": "2025-11-26T08:33:01.362984Z",
303
- "updated_at": "2025-11-26T08:33:01.362986Z",
304
- "project_title": null,
305
- "region_name": null,
306
- "customer_name": null,
307
- "is_open": true,
308
- "is_assigned": false,
309
- "is_in_progress": false,
310
- "is_completed": false,
311
- "is_cancelled": false,
312
- "is_active": true,
313
- "is_overdue": false,
314
- "has_region": true,
315
- "has_schedule": false,
316
- "can_be_assigned": true,
317
- "can_be_started": false,
318
- "can_be_completed": false,
319
- "can_be_cancelled": true
320
- },
321
- {
322
- "id": "38feda19-6cb4-4149-a406-04071c3b4620",
323
- "project_id": "0ade6bd1-e492-4e25-b681-59f42058d29a",
324
- "source": "sales_order",
325
- "source_id": "cebea221-402f-49a3-8418-bbcf39697488",
326
- "ticket_name": "Jane Wanjiru",
327
- "ticket_type": "installation",
328
- "service_type": "ftth",
329
- "work_description": "Install Premium Fiber 50Mbps for Jane Wanjiru",
330
- "status": "open",
331
- "priority": "normal",
332
- "scheduled_date": null,
333
- "scheduled_time_slot": null,
334
- "due_date": "2025-11-28T13:05:40.877164Z",
335
- "sla_target_date": "2025-11-28T13:05:40.877164Z",
336
- "sla_violated": false,
337
- "started_at": null,
338
- "completed_at": null,
339
- "is_invoiced": false,
340
- "invoiced_at": null,
341
- "project_region_id": "4cd27765-5720-4cc0-872e-bf0da3cd1898",
342
- "work_location_latitude": null,
343
- "work_location_longitude": null,
344
- "work_location_verified": false,
345
- "notes": null,
346
- "version": 1,
347
- "created_at": "2025-11-25T13:05:40.877164Z",
348
- "updated_at": "2025-11-25T13:05:40.877168Z",
349
- "project_title": null,
350
- "region_name": null,
351
- "customer_name": null,
352
- "is_open": true,
353
- "is_assigned": false,
354
- "is_in_progress": false,
355
- "is_completed": false,
356
- "is_cancelled": false,
357
- "is_active": true,
358
- "is_overdue": false,
359
- "has_region": true,
360
- "has_schedule": false,
361
- "can_be_assigned": true,
362
- "can_be_started": false,
363
- "can_be_completed": false,
364
- "can_be_cancelled": true
365
- },
366
- {
367
- "id": "1e622599-1909-49b9-9d8b-4c5cb483b29e",
368
- "project_id": "0ade6bd1-e492-4e25-b681-59f42058d29a",
369
- "source": "sales_order",
370
- "source_id": "b2a47ac2-e779-4479-846b-f350f041dd43",
371
- "ticket_name": "Nnacy Wanjiru",
372
- "ticket_type": "installation",
373
- "service_type": "ftth",
374
- "work_description": "Install 100 for Nnacy Wanjiru",
375
- "status": "open",
376
- "priority": "normal",
377
- "scheduled_date": "2026-01-01",
378
- "scheduled_time_slot": null,
379
- "due_date": "2025-11-28T13:03:13.104571Z",
380
- "sla_target_date": "2025-11-28T13:03:13.104571Z",
381
- "sla_violated": false,
382
- "started_at": null,
383
- "completed_at": null,
384
- "is_invoiced": false,
385
- "invoiced_at": null,
386
- "project_region_id": "24510a5a-13a6-4334-9055-b4d476aa9e0a",
387
- "work_location_latitude": null,
388
- "work_location_longitude": null,
389
- "work_location_verified": false,
390
- "notes": null,
391
- "version": 1,
392
- "created_at": "2025-11-25T13:03:13.104571Z",
393
- "updated_at": "2025-11-25T13:03:13.104571Z",
394
- "project_title": null,
395
- "region_name": null,
396
- "customer_name": null,
397
- "is_open": true,
398
- "is_assigned": false,
399
- "is_in_progress": false,
400
- "is_completed": false,
401
- "is_cancelled": false,
402
- "is_active": true,
403
- "is_overdue": false,
404
- "has_region": true,
405
- "has_schedule": true,
406
- "can_be_assigned": true,
407
- "can_be_started": false,
408
- "can_be_completed": false,
409
- "can_be_cancelled": true
410
- }
411
- ]
412
  }
 
1
+ Request URL
2
+ https://kamau1-swiftops-backend.hf.space/api/v1/tickets/8f08ad14-df8b-4780-84e7-0d45e133f2a6/detail
3
+ Request Method
4
+ GET
5
+ Status Code
6
+ 200 OK
7
+ Remote Address
8
+ 3.208.147.173:443
9
+ Referrer Policy
10
+ strict-origin-when-cross-origin
11
+
12
+
13
  {
14
+ "ticket": {
15
+ "id": "8f08ad14-df8b-4780-84e7-0d45e133f2a6",
16
+ "project_id": "0ade6bd1-e492-4e25-b681-59f42058d29a",
17
+ "source": "sales_order",
18
+ "source_id": "5cb76cc5-3d9a-4ce0-87a8-43f912896c1f",
19
+ "ticket_name": "Catherine Njoki",
20
+ "ticket_type": "installation",
21
+ "service_type": "ftth",
22
+ "work_description": "Install Basic 10Mbps for Catherine Njoki",
23
+ "status": "open",
24
+ "priority": "normal",
25
+ "scheduled_date": "2025-12-28",
26
+ "scheduled_time_slot": "Afternoon 1PM-4PM",
27
+ "due_date": "2025-12-01T07:52:17.604326Z",
28
+ "sla_target_date": "2025-12-01T07:52:17.604326Z",
29
+ "sla_violated": false,
30
+ "started_at": null,
31
+ "completed_at": null,
32
+ "is_invoiced": false,
33
+ "invoiced_at": null,
34
+ "project_region_id": null,
35
+ "work_location_latitude": null,
36
+ "work_location_longitude": null,
37
+ "work_location_verified": false,
38
+ "notes": null,
39
+ "version": 1,
40
+ "created_at": "2025-11-28T07:52:17.604326Z",
41
+ "updated_at": "2025-11-28T07:52:17.604328Z",
42
+ "project_title": null,
43
+ "region_name": null,
44
+ "customer_name": null,
45
+ "is_open": true,
46
+ "is_assigned": false,
47
+ "is_in_progress": false,
48
+ "is_completed": false,
49
+ "is_cancelled": false,
50
+ "is_active": true,
51
+ "is_overdue": false,
52
+ "has_region": false,
53
+ "has_schedule": true,
54
+ "can_be_assigned": true,
55
+ "can_be_started": false,
56
+ "can_be_completed": false,
57
+ "can_be_cancelled": true
58
+ },
59
+ "available_actions": [],
60
+ "current_assignment": null,
61
+ "team_info": {
62
+ "required_size": 1,
63
+ "assigned_size": 0,
64
+ "is_full": false,
65
+ "assigned_agents": []
66
+ },
67
+ "message": "Ticket not in your assigned region",
68
+ "source_data": {
69
+ "type": "sales_order",
70
+ "id": "5cb76cc5-3d9a-4ce0-87a8-43f912896c1f",
71
+ "order_number": "ORD-2025-013",
72
+ "customer_preferred_package": "Basic 10Mbps",
73
+ "package_price": 2500.0,
74
+ "installation_address": "1111 Kasarani Road",
75
+ "installation_latitude": null,
76
+ "installation_longitude": null,
77
+ "preferred_visit_date": "2025-12-28",
78
+ "status": "processed"
79
+ },
80
+ "customer": {
81
+ "id": "40bee251-a186-4194-9d01-e74597dc8326",
82
+ "name": "Catherine Njoki",
83
+ "phone": "+254734567891",
84
+ "email": "catherine.njoki@email.com",
85
+ "address": null,
86
+ "location_latitude": null,
87
+ "location_longitude": null
88
+ },
89
+ "expenses": [],
90
+ "images": [],
91
+ "comments": [],
92
+ "assignments": []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  }
docs/devlogs/server/runtimeerror.txt CHANGED
@@ -1,381 +1,281 @@
1
- ===== Application Startup at 2025-11-27 20:32:26 =====
2
 
3
  INFO: Started server process [7]
4
  INFO: Waiting for application startup.
5
- INFO: 2025-11-27T20:32:42 - app.main: ============================================================
6
- INFO: 2025-11-27T20:32:42 - app.main: 🚀 SwiftOps API v1.0.0 | PRODUCTION
7
- INFO: 2025-11-27T20:32:42 - app.main: 📊 Dashboard: Enabled
8
- INFO: 2025-11-27T20:32:42 - app.main: ============================================================
9
- INFO: 2025-11-27T20:32:42 - app.main: 📦 Database:
10
- INFO: 2025-11-27T20:32:42 - app.main: ✓ Connected | 44 tables | 6 users
11
- INFO: 2025-11-27T20:32:42 - app.main: 💾 Cache & Sessions:
12
- INFO: 2025-11-27T20:32:43 - app.services.otp_service: ✅ OTP Service initialized with Redis storage
13
- INFO: 2025-11-27T20:32:43 - app.main: ✓ Redis: Connected
14
- INFO: 2025-11-27T20:32:43 - app.main: 🔌 External Services:
15
- INFO: 2025-11-27T20:32:44 - app.main: ✓ Cloudinary: Connected
16
- INFO: 2025-11-27T20:32:44 - app.main: ✓ Resend: Configured
17
- INFO: 2025-11-27T20:32:44 - app.main: ✓ WASender: Connected
18
- INFO: 2025-11-27T20:32:44 - app.main: ✓ Supabase: Connected | 6 buckets
19
- INFO: 2025-11-27T20:32:44 - app.main: ============================================================
20
- INFO: 2025-11-27T20:32:44 - app.main: ✅ Startup complete | Ready to serve requests
21
- INFO: 2025-11-27T20:32:44 - app.main: ============================================================
22
  INFO: Application startup complete.
23
  INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)
24
- INFO: 10.16.25.209:29570 - "GET /health HTTP/1.1" 200 OK
25
- INFO: 10.16.11.176:17741 - "GET /health HTTP/1.1" 200 OK
26
- INFO: 10.16.6.70:12408 - "GET /health HTTP/1.1" 200 OK
27
- INFO: 10.16.18.114:53863 - "GET /?logs=container HTTP/1.1" 200 OK
28
- INFO: 10.16.6.70:14130 - "GET /?logs=container HTTP/1.1" 200 OK
29
- INFO: 10.16.18.114:53863 - "GET /health HTTP/1.1" 200 OK
30
- INFO: 10.16.18.114:63110 - "GET /health HTTP/1.1" 200 OK
31
- INFO: 2025-11-27T20:35:25 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
32
- INFO: 2025-11-27T20:35:25 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
33
- INFO: 10.16.18.114:63110 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
34
- INFO: 2025-11-27T20:35:26 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
35
- INFO: 2025-11-27T20:35:26 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
36
- INFO: 10.16.6.70:34729 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
37
- INFO: 2025-11-27T20:35:26 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
38
- INFO: 2025-11-27T20:35:26 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
39
- INFO: 10.16.25.209:47836 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
40
- INFO: 10.16.6.70:48753 - "GET /api/v1/tickets/1f807cf8-f139-421b-86e3-38c2f8bc7070/detail HTTP/1.1" 500 Internal Server Error
41
- ERROR: Exception in ASGI application
42
- Traceback (most recent call last):
43
- File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
44
- result = await app( # type: ignore[func-returns-value]
45
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46
- File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
47
- return await self.app(scope, receive, send)
48
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
- File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__
50
- await super().__call__(scope, receive, send)
51
- File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
52
- await self.middleware_stack(scope, receive, send)
53
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
54
- raise exc
55
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
56
- await self.app(scope, receive, _send)
57
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 91, in __call__
58
- await self.simple_response(scope, receive, send, request_headers=headers)
59
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 146, in simple_response
60
- await self.app(scope, receive, send)
61
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
62
- raise exc
63
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
64
- await self.app(scope, receive, sender)
65
- File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
66
- raise e
67
- File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
68
- await self.app(scope, receive, send)
69
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
70
- await route.handle(scope, receive, send)
71
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
72
- await self.app(scope, receive, send)
73
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
74
- response = await func(request)
75
- ^^^^^^^^^^^^^^^^^^^
76
- File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 274, in app
77
- raw_response = await run_endpoint_function(
78
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79
- File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
80
- return await run_in_threadpool(dependant.call, **values)
81
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
- File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
83
- return await anyio.to_thread.run_sync(func, *args)
84
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85
- File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
86
- return await get_asynclib().run_sync_in_worker_thread(
87
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
- File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
89
- return await future
90
- ^^^^^^^^^^^^
91
- File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
92
- result = context.run(func, *args)
93
- ^^^^^^^^^^^^^^^^^^^^^^^^
94
- File "/app/src/app/api/v1/tickets.py", line 520, in get_ticket_detail
95
- "name": customer.name,
96
- ^^^^^^^^^^^^^
97
- AttributeError: 'Customer' object has no attribute 'name'
98
- INFO: 10.16.6.70:31690 - "GET /api/v1/tickets/1f807cf8-f139-421b-86e3-38c2f8bc7070/detail HTTP/1.1" 500 Internal Server Error
99
- ERROR: Exception in ASGI application
100
- Traceback (most recent call last):
101
- File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
102
- result = await app( # type: ignore[func-returns-value]
103
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104
- File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
105
- return await self.app(scope, receive, send)
106
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107
- File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__
108
- await super().__call__(scope, receive, send)
109
- File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
110
- await self.middleware_stack(scope, receive, send)
111
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
112
- raise exc
113
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
114
- await self.app(scope, receive, _send)
115
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 91, in __call__
116
- await self.simple_response(scope, receive, send, request_headers=headers)
117
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 146, in simple_response
118
- await self.app(scope, receive, send)
119
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
120
- raise exc
121
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
122
- await self.app(scope, receive, sender)
123
- File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
124
- raise e
125
- File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
126
- await self.app(scope, receive, send)
127
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
128
- await route.handle(scope, receive, send)
129
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
130
- await self.app(scope, receive, send)
131
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
132
- response = await func(request)
133
- ^^^^^^^^^^^^^^^^^^^
134
- File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 274, in app
135
- raw_response = await run_endpoint_function(
136
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137
- File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
138
- return await run_in_threadpool(dependant.call, **values)
139
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140
- File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
141
- return await anyio.to_thread.run_sync(func, *args)
142
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143
- File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
144
- return await get_asynclib().run_sync_in_worker_thread(
145
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146
- File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
147
- return await future
148
- ^^^^^^^^^^^^
149
- File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
150
- result = context.run(func, *args)
151
- ^^^^^^^^^^^^^^^^^^^^^^^^
152
- File "/app/src/app/api/v1/tickets.py", line 520, in get_ticket_detail
153
- "name": customer.name,
154
- ^^^^^^^^^^^^^
155
- AttributeError: 'Customer' object has no attribute 'name'
156
- INFO: 10.16.6.70:6111 - "GET /health HTTP/1.1" 200 OK
157
- INFO: 10.16.6.70:55198 - "GET /health HTTP/1.1" 200 OK
158
- INFO: 10.16.18.114:21582 - "GET /health HTTP/1.1" 200 OK
159
- INFO: 10.16.18.114:14432 - "GET /health HTTP/1.1" 200 OK
160
- INFO: 10.16.6.70:19667 - "GET /health HTTP/1.1" 200 OK
161
- INFO: 10.16.18.114:23684 - "GET /health HTTP/1.1" 200 OK
162
- INFO: 10.16.6.70:33485 - "GET /health HTTP/1.1" 200 OK
163
- INFO: 10.16.6.70:19029 - "GET /health HTTP/1.1" 200 OK
164
- INFO: 10.16.6.70:35624 - "GET /health HTTP/1.1" 200 OK
165
- INFO: 10.16.6.70:6090 - "GET /health HTTP/1.1" 200 OK
166
- INFO: 10.16.6.70:43007 - "GET /health HTTP/1.1" 200 OK
167
- INFO: 10.16.25.209:8384 - "GET /health HTTP/1.1" 200 OK
168
- INFO: 10.16.6.70:64193 - "GET /health HTTP/1.1" 200 OK
169
- INFO: 10.16.6.70:19424 - "GET /health HTTP/1.1" 200 OK
170
- INFO: 10.16.25.209:41361 - "GET / HTTP/1.1" 200 OK
171
- INFO: 10.16.11.176:21401 - "GET /robots.txt HTTP/1.1" 404 Not Found
172
- INFO: 10.16.18.114:64632 - "GET / HTTP/1.1" 200 OK
173
- INFO: 10.16.6.70:59735 - "GET /?logs=container HTTP/1.1" 200 OK
174
- INFO: 10.16.18.114:60092 - "GET /?logs=container HTTP/1.1" 200 OK
175
- INFO: 2025-11-28T05:58:34 - app.core.supabase_auth: Session refreshed successfully
176
- INFO: 2025-11-28T05:58:35 - app.api.v1.auth: Token refreshed successfully for: viyisa8151@feralrex.com
177
- INFO: 10.16.30.4:55643 - "POST /api/v1/auth/refresh-token HTTP/1.1" 200 OK
178
- INFO: 2025-11-28T05:58:35 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
179
- INFO: 2025-11-28T05:58:35 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
180
- INFO: 10.16.34.155:42283 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
181
- INFO: 2025-11-28T05:58:36 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
182
- INFO: 2025-11-28T05:58:36 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
183
- INFO: 10.16.34.155:19500 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
184
- INFO: 2025-11-28T05:58:36 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
185
- INFO: 2025-11-28T05:58:36 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
186
- INFO: 10.16.6.70:34709 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
187
- INFO: 10.16.34.155:42283 - "GET /api/v1/tickets/1f807cf8-f139-421b-86e3-38c2f8bc7070/detail HTTP/1.1" 500 Internal Server Error
188
- ERROR: Exception in ASGI application
189
- Traceback (most recent call last):
190
- File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
191
- result = await app( # type: ignore[func-returns-value]
192
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
193
- File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
194
- return await self.app(scope, receive, send)
195
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196
- File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__
197
- await super().__call__(scope, receive, send)
198
- File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
199
- await self.middleware_stack(scope, receive, send)
200
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
201
- raise exc
202
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
203
- await self.app(scope, receive, _send)
204
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 91, in __call__
205
- await self.simple_response(scope, receive, send, request_headers=headers)
206
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 146, in simple_response
207
- await self.app(scope, receive, send)
208
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
209
- raise exc
210
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
211
- await self.app(scope, receive, sender)
212
- File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
213
- raise e
214
- File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
215
- await self.app(scope, receive, send)
216
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
217
- await route.handle(scope, receive, send)
218
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
219
- await self.app(scope, receive, send)
220
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
221
- response = await func(request)
222
- ^^^^^^^^^^^^^^^^^^^
223
- File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 274, in app
224
- raw_response = await run_endpoint_function(
225
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
226
- File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
227
- return await run_in_threadpool(dependant.call, **values)
228
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
229
- File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
230
- return await anyio.to_thread.run_sync(func, *args)
231
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
232
- File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
233
- return await get_asynclib().run_sync_in_worker_thread(
234
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
235
- File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
236
- return await future
237
- ^^^^^^^^^^^^
238
- File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
239
- result = context.run(func, *args)
240
- ^^^^^^^^^^^^^^^^^^^^^^^^
241
- File "/app/src/app/api/v1/tickets.py", line 520, in get_ticket_detail
242
- "name": customer.name,
243
- ^^^^^^^^^^^^^
244
- AttributeError: 'Customer' object has no attribute 'name'
245
- INFO: 10.16.21.146:55025 - "GET /health HTTP/1.1" 200 OK
246
- INFO: 10.16.30.4:44640 - "GET /health HTTP/1.1" 200 OK
247
- INFO: 10.16.30.4:36006 - "GET /health HTTP/1.1" 200 OK
248
- INFO: 10.16.30.4:63239 - "GET /health HTTP/1.1" 200 OK
249
- INFO: 10.16.6.70:47934 - "GET /health HTTP/1.1" 200 OK
250
- INFO: 10.16.21.146:8549 - "GET /health HTTP/1.1" 200 OK
251
- INFO: 10.16.6.70:51111 - "GET /health HTTP/1.1" 200 OK
252
- INFO: 10.16.6.70:45192 - "GET /health HTTP/1.1" 200 OK
253
- INFO: 10.16.30.4:48755 - "GET /health HTTP/1.1" 200 OK
254
- INFO: 10.16.18.114:48907 - "GET /health HTTP/1.1" 200 OK
255
- INFO: 10.16.6.70:46431 - "GET /health HTTP/1.1" 200 OK
256
- INFO: 10.16.6.70:30972 - "GET /health HTTP/1.1" 200 OK
257
- INFO: 10.16.34.155:37704 - "GET /health HTTP/1.1" 200 OK
258
- INFO: 10.16.34.155:31605 - "GET /health HTTP/1.1" 200 OK
259
- INFO: 10.16.11.176:8634 - "GET /health HTTP/1.1" 200 OK
260
- INFO: 10.16.30.4:45218 - "GET /health HTTP/1.1" 200 OK
261
- INFO: 10.16.6.70:1379 - "GET /health HTTP/1.1" 200 OK
262
- INFO: 10.16.34.155:57980 - "GET /health HTTP/1.1" 200 OK
263
- INFO: 10.16.18.114:59411 - "GET /health HTTP/1.1" 200 OK
264
- INFO: 10.16.11.176:17358 - "GET /health HTTP/1.1" 200 OK
265
- INFO: 10.16.18.114:45014 - "GET /health HTTP/1.1" 200 OK
266
- INFO: 10.16.34.155:37968 - "GET /health HTTP/1.1" 200 OK
267
- INFO: 10.16.18.114:20251 - "GET /health HTTP/1.1" 200 OK
268
- INFO: 10.16.18.114:50786 - "GET /health HTTP/1.1" 200 OK
269
- INFO: 10.16.30.4:42629 - "GET /health HTTP/1.1" 200 OK
270
- INFO: 10.16.11.176:40671 - "GET /health HTTP/1.1" 200 OK
271
- INFO: 10.16.11.176:42457 - "GET /health HTTP/1.1" 200 OK
272
- INFO: 10.16.6.70:43008 - "GET /health HTTP/1.1" 200 OK
273
- INFO: 10.16.18.114:43465 - "GET /health HTTP/1.1" 200 OK
274
- INFO: 10.16.11.176:2383 - "GET /health HTTP/1.1" 200 OK
275
- INFO: 10.16.18.114:53681 - "GET /health HTTP/1.1" 200 OK
276
- INFO: 10.16.6.70:37712 - "GET /health HTTP/1.1" 200 OK
277
- INFO: 10.16.18.114:9640 - "GET /health HTTP/1.1" 200 OK
278
- INFO: 10.16.6.70:37554 - "GET /health HTTP/1.1" 200 OK
279
- INFO: 10.16.11.176:16958 - "GET /health HTTP/1.1" 200 OK
280
- INFO: 10.16.34.155:25832 - "GET /health HTTP/1.1" 200 OK
281
- INFO: 10.16.11.176:41114 - "GET /health HTTP/1.1" 200 OK
282
- INFO: 10.16.34.155:63560 - "GET /health HTTP/1.1" 200 OK
283
- INFO: 10.16.30.4:23007 - "GET /health HTTP/1.1" 200 OK
284
- INFO: 10.16.6.70:18228 - "GET /health HTTP/1.1" 200 OK
285
- INFO: 10.16.18.114:29760 - "GET /health HTTP/1.1" 200 OK
286
- INFO: 10.16.6.70:2247 - "GET /health HTTP/1.1" 200 OK
287
- INFO: 10.16.34.155:11053 - "GET /health HTTP/1.1" 200 OK
288
- INFO: 10.16.30.4:31710 - "GET /health HTTP/1.1" 200 OK
289
- INFO: 10.16.34.155:56207 - "GET /health HTTP/1.1" 200 OK
290
- INFO: 10.16.34.155:28647 - "GET /health HTTP/1.1" 200 OK
291
- INFO: 10.16.11.176:41856 - "GET /health HTTP/1.1" 200 OK
292
- INFO: 10.16.11.176:29713 - "GET /health HTTP/1.1" 200 OK
293
- INFO: 10.16.6.70:27821 - "GET /health HTTP/1.1" 200 OK
294
- INFO: 10.16.11.176:58046 - "GET /health HTTP/1.1" 200 OK
295
- INFO: 10.16.11.176:12537 - "GET /health HTTP/1.1" 200 OK
296
- INFO: 10.16.34.155:2786 - "GET /health HTTP/1.1" 200 OK
297
- INFO: 10.16.18.114:1698 - "GET /health HTTP/1.1" 200 OK
298
- INFO: 10.16.11.176:4353 - "GET /health HTTP/1.1" 200 OK
299
- INFO: 2025-11-28T06:53:36 - app.core.supabase_auth: Session refreshed successfully
300
- INFO: 2025-11-28T06:53:36 - app.api.v1.auth: ✅ Token refreshed successfully for: viyisa8151@feralrex.com
301
- INFO: 10.16.34.155:2653 - "POST /api/v1/auth/refresh-token HTTP/1.1" 200 OK
302
- INFO: 10.16.11.176:59167 - "GET /health HTTP/1.1" 200 OK
303
- INFO: 10.16.30.4:27342 - "GET /health HTTP/1.1" 200 OK
304
- INFO: 10.16.6.70:65206 - "GET /health HTTP/1.1" 200 OK
305
- INFO: 10.16.6.70:13529 - "GET /health HTTP/1.1" 200 OK
306
- INFO: 10.16.34.155:34047 - "GET /health HTTP/1.1" 200 OK
307
- INFO: 10.16.30.4:49777 - "GET /health HTTP/1.1" 200 OK
308
- INFO: 10.16.34.155:65510 - "GET /health HTTP/1.1" 200 OK
309
- INFO: 10.16.34.155:47461 - "GET /health HTTP/1.1" 200 OK
310
- INFO: 10.16.6.70:65017 - "GET /health HTTP/1.1" 200 OK
311
- INFO: 10.16.11.176:43726 - "GET /health HTTP/1.1" 200 OK
312
- INFO: 10.16.6.70:26756 - "GET /health HTTP/1.1" 200 OK
313
- INFO: 10.16.34.155:9349 - "GET /health HTTP/1.1" 200 OK
314
- INFO: 10.16.11.176:24378 - "GET /health HTTP/1.1" 200 OK
315
- INFO: 10.16.6.70:13592 - "GET /health HTTP/1.1" 200 OK
316
- INFO: 10.16.34.155:18080 - "GET /health HTTP/1.1" 200 OK
317
- INFO: 10.16.11.176:40230 - "GET /health HTTP/1.1" 200 OK
318
- INFO: 10.16.34.155:53722 - "GET /health HTTP/1.1" 200 OK
319
- INFO: 10.16.34.155:23460 - "GET /health HTTP/1.1" 200 OK
320
- INFO: 10.16.34.155:63342 - "GET /health HTTP/1.1" 200 OK
321
- INFO: 10.16.18.114:61060 - "GET /health HTTP/1.1" 200 OK
322
- INFO: 10.16.6.70:13630 - "GET /api/v1/tickets/1f807cf8-f139-421b-86e3-38c2f8bc7070/detail HTTP/1.1" 500 Internal Server Error
323
- ERROR: Exception in ASGI application
324
- Traceback (most recent call last):
325
- File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
326
- result = await app( # type: ignore[func-returns-value]
327
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
328
- File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
329
- return await self.app(scope, receive, send)
330
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
331
- File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__
332
- await super().__call__(scope, receive, send)
333
- File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
334
- await self.middleware_stack(scope, receive, send)
335
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
336
- raise exc
337
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
338
- await self.app(scope, receive, _send)
339
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 91, in __call__
340
- await self.simple_response(scope, receive, send, request_headers=headers)
341
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 146, in simple_response
342
- await self.app(scope, receive, send)
343
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
344
- raise exc
345
- File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
346
- await self.app(scope, receive, sender)
347
- File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
348
- raise e
349
- File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
350
- await self.app(scope, receive, send)
351
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
352
- await route.handle(scope, receive, send)
353
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
354
- await self.app(scope, receive, send)
355
- File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
356
- response = await func(request)
357
- ^^^^^^^^^^^^^^^^^^^
358
- File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 274, in app
359
- raw_response = await run_endpoint_function(
360
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
361
- File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
362
- return await run_in_threadpool(dependant.call, **values)
363
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
364
- File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
365
- return await anyio.to_thread.run_sync(func, *args)
366
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
367
- File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
368
- return await get_asynclib().run_sync_in_worker_thread(
369
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
370
- File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
371
- return await future
372
- ^^^^^^^^^^^^
373
- File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
374
- result = context.run(func, *args)
375
- ^^^^^^^^^^^^^^^^^^^^^^^^
376
- File "/app/src/app/api/v1/tickets.py", line 520, in get_ticket_detail
377
- "name": customer.name,
378
- ^^^^^^^^^^^^^
379
- AttributeError: 'Customer' object has no attribute 'name'
380
- INFO: 10.16.25.209:13148 - "GET /health HTTP/1.1" 200 OK
381
-
 
1
+ ===== Application Startup at 2025-11-28 08:34:02 =====
2
 
3
  INFO: Started server process [7]
4
  INFO: Waiting for application startup.
5
+ INFO: 2025-11-28T08:34:18 - app.main: ============================================================
6
+ INFO: 2025-11-28T08:34:18 - app.main: 🚀 SwiftOps API v1.0.0 | PRODUCTION
7
+ INFO: 2025-11-28T08:34:18 - app.main: 📊 Dashboard: Enabled
8
+ INFO: 2025-11-28T08:34:18 - app.main: ============================================================
9
+ INFO: 2025-11-28T08:34:18 - app.main: 📦 Database:
10
+ INFO: 2025-11-28T08:34:18 - app.main: ✓ Connected | 44 tables | 6 users
11
+ INFO: 2025-11-28T08:34:18 - app.main: 💾 Cache & Sessions:
12
+ INFO: 2025-11-28T08:34:19 - app.services.otp_service: ✅ OTP Service initialized with Redis storage
13
+ INFO: 2025-11-28T08:34:19 - app.main: ✓ Redis: Connected
14
+ INFO: 2025-11-28T08:34:19 - app.main: 🔌 External Services:
15
+ INFO: 2025-11-28T08:34:20 - app.main: ✓ Cloudinary: Connected
16
+ INFO: 2025-11-28T08:34:20 - app.main: ✓ Resend: Configured
17
+ INFO: 2025-11-28T08:34:20 - app.main: ✓ WASender: Connected
18
+ INFO: 2025-11-28T08:34:20 - app.main: ✓ Supabase: Connected | 6 buckets
19
+ INFO: 2025-11-28T08:34:20 - app.main: ============================================================
20
+ INFO: 2025-11-28T08:34:20 - app.main: ✅ Startup complete | Ready to serve requests
21
+ INFO: 2025-11-28T08:34:20 - app.main: ============================================================
22
  INFO: Application startup complete.
23
  INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)
24
+ INFO: 10.16.34.155:48281 - "GET /health HTTP/1.1" 200 OK
25
+ INFO: 10.16.34.155:13442 - "GET /health HTTP/1.1" 200 OK
26
+ INFO: 10.16.30.4:31862 - "GET /health HTTP/1.1" 200 OK
27
+ INFO: 10.16.30.4:4191 - "GET /health HTTP/1.1" 200 OK
28
+ INFO: 10.16.34.155:54844 - "GET /health HTTP/1.1" 200 OK
29
+ INFO: 10.16.6.70:38661 - "GET /health HTTP/1.1" 200 OK
30
+ INFO: 10.16.34.155:7190 - "GET /health HTTP/1.1" 200 OK
31
+ INFO: 10.16.30.4:1055 - "GET /health HTTP/1.1" 200 OK
32
+ INFO: 10.16.11.176:23069 - "GET /health HTTP/1.1" 200 OK
33
+ INFO: 10.16.11.176:55052 - "GET /health HTTP/1.1" 200 OK
34
+ INFO: 10.16.18.114:46668 - "GET /health HTTP/1.1" 200 OK
35
+ INFO: 10.16.18.114:63687 - "GET /health HTTP/1.1" 200 OK
36
+ INFO: 10.16.34.155:2063 - "GET /health HTTP/1.1" 200 OK
37
+ INFO: 10.16.6.70:61630 - "GET /health HTTP/1.1" 200 OK
38
+ INFO: 10.16.11.176:13365 - "GET /health HTTP/1.1" 200 OK
39
+ INFO: 10.16.11.176:19451 - "GET /health HTTP/1.1" 200 OK
40
+ INFO: 10.16.11.176:21587 - "GET /health HTTP/1.1" 200 OK
41
+ INFO: 10.16.30.4:64924 - "GET /health HTTP/1.1" 200 OK
42
+ INFO: 10.16.6.70:27597 - "GET /health HTTP/1.1" 200 OK
43
+ INFO: 10.16.18.114:18324 - "GET /health HTTP/1.1" 200 OK
44
+ INFO: 10.16.30.4:63395 - "GET /health HTTP/1.1" 200 OK
45
+ INFO: 10.16.6.70:4916 - "GET /health HTTP/1.1" 200 OK
46
+ INFO: 10.16.18.114:45757 - "GET /health HTTP/1.1" 200 OK
47
+ INFO: 10.16.6.70:55132 - "GET /health HTTP/1.1" 200 OK
48
+ INFO: 10.16.11.176:21091 - "GET /health HTTP/1.1" 200 OK
49
+ INFO: 10.16.18.114:56091 - "GET /health HTTP/1.1" 200 OK
50
+ INFO: 10.16.6.70:32033 - "GET /health HTTP/1.1" 200 OK
51
+ INFO: 10.16.30.4:19735 - "GET /health HTTP/1.1" 200 OK
52
+ INFO: 2025-11-28T08:49:07 - app.core.supabase_auth: User signed in successfully: viyisa8151@feralrex.com
53
+ INFO: 2025-11-28T08:49:07 - app.services.audit_service: Audit log created: login on auth by viyisa8151@feralrex.com
54
+ INFO: 2025-11-28T08:49:07 - app.api.v1.auth: User logged in successfully: viyisa8151@feralrex.com
55
+ INFO: 10.16.30.4:14744 - "POST /api/v1/auth/login HTTP/1.1" 200 OK
56
+ INFO: 2025-11-28T08:49:08 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
57
+ INFO: 2025-11-28T08:49:08 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
58
+ INFO: 10.16.11.176:8395 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
59
+ INFO: 2025-11-28T08:49:09 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
60
+ INFO: 2025-11-28T08:49:09 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
61
+ INFO: 10.16.30.4:14744 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
62
+ INFO: 2025-11-28T08:49:09 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
63
+ INFO: 2025-11-28T08:49:09 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
64
+ INFO: 10.16.18.114:3287 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
65
+ INFO: 2025-11-28T08:49:09 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
66
+ INFO: 2025-11-28T08:49:09 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
67
+ INFO: 10.16.34.155:24084 - "GET /api/v1/analytics/user/overview?limit=50 HTTP/1.1" 200 OK
68
+ INFO: 2025-11-28T08:49:10 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
69
+ INFO: 2025-11-28T08:49:10 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
70
+ INFO: 10.16.11.176:8395 - "GET /api/v1/projects?page=1&per_page=100&status=active HTTP/1.1" 200 OK
71
+ INFO: 10.16.6.70:11130 - "GET /health HTTP/1.1" 200 OK
72
+ INFO: 2025-11-28T08:49:17 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
73
+ INFO: 2025-11-28T08:49:17 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
74
+ INFO: 2025-11-28T08:49:17 - app.services.dashboard_service: Dashboard cache MISS for project 0ade6bd1-e492-4e25-b681-59f42058d29a, user 43b778b0-2062-4724-abbb-916a4835a9b0 - building fresh data
75
+ INFO: 2025-11-28T08:49:17 - app.services.dashboard_service: Built and cached dashboard for project 0ade6bd1-e492-4e25-b681-59f42058d29a
76
+ INFO: 10.16.11.176:54485 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/dashboard HTTP/1.1" 200 OK
77
+ INFO: 10.16.34.155:29631 - "GET /api/v1/tickets/stats?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a HTTP/1.1" 200 OK
78
+ /app/src/app/services/ticket_service.py:694: SAWarning: Coercing Subquery object into a select() for use in IN(); please pass a select() construct explicitly
79
+ query = query.filter(Ticket.project_id.in_(team_projects))
80
+ INFO: 10.16.18.114:8515 - "GET /api/v1/tickets?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&skip=0&limit=50 HTTP/1.1" 200 OK
81
+ INFO: 2025-11-28T08:49:24 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
82
+ INFO: 2025-11-28T08:49:24 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
83
+ INFO: 10.16.18.114:8515 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
84
+ INFO: 10.16.18.114:28199 - "GET /api/v1/tickets/8f08ad14-df8b-4780-84e7-0d45e133f2a6/detail HTTP/1.1" 200 OK
85
+ INFO: 10.16.30.4:43842 - "GET /health HTTP/1.1" 200 OK
86
+ INFO: 10.16.11.176:23271 - "GET /health HTTP/1.1" 200 OK
87
+ INFO: 10.16.18.114:7491 - "GET /health HTTP/1.1" 200 OK
88
+ INFO: 10.16.34.155:64171 - "GET /health HTTP/1.1" 200 OK
89
+ INFO: 2025-11-28T08:50:08 - app.core.supabase_auth: Session refreshed successfully
90
+ INFO: 2025-11-28T08:50:08 - app.api.v1.auth: ✅ Token refreshed successfully for: viyisa8151@feralrex.com
91
+ INFO: 10.16.6.70:35401 - "POST /api/v1/auth/refresh-token HTTP/1.1" 200 OK
92
+ INFO: 2025-11-28T08:50:09 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
93
+ INFO: 2025-11-28T08:50:09 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
94
+ INFO: 10.16.30.4:51767 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
95
+ INFO: 2025-11-28T08:50:10 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
96
+ INFO: 2025-11-28T08:50:10 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
97
+ INFO: 10.16.34.155:64171 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
98
+ INFO: 2025-11-28T08:50:10 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
99
+ INFO: 2025-11-28T08:50:10 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
100
+ INFO: 2025-11-28T08:50:10 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
101
+ INFO: 2025-11-28T08:50:10 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
102
+ INFO: 10.16.30.4:13383 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
103
+ INFO: 10.16.30.4:51767 - "GET /api/v1/analytics/user/overview?limit=50 HTTP/1.1" 200 OK
104
+ INFO: 2025-11-28T08:50:11 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
105
+ INFO: 2025-11-28T08:50:11 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
106
+ INFO: 10.16.6.70:35401 - "GET /api/v1/projects?page=1&per_page=100&status=active HTTP/1.1" 200 OK
107
+ INFO: 2025-11-28T08:50:12 - app.core.supabase_auth: Session refreshed successfully
108
+ INFO: 2025-11-28T08:50:12 - app.api.v1.auth: Token refreshed successfully for: viyisa8151@feralrex.com
109
+ INFO: 10.16.6.70:35401 - "POST /api/v1/auth/refresh-token HTTP/1.1" 200 OK
110
+ INFO: 2025-11-28T08:50:19 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
111
+ INFO: 2025-11-28T08:50:19 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
112
+ INFO: 2025-11-28T08:50:19 - app.services.dashboard_service: Dashboard cache HIT for project 0ade6bd1-e492-4e25-b681-59f42058d29a, user 43b778b0-2062-4724-abbb-916a4835a9b0
113
+ INFO: 10.16.30.4:28566 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/dashboard HTTP/1.1" 200 OK
114
+ INFO: 10.16.30.4:28566 - "GET /api/v1/tickets?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&skip=0&limit=50 HTTP/1.1" 200 OK
115
+ INFO: 10.16.34.155:47736 - "GET /api/v1/tickets/stats?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a HTTP/1.1" 200 OK
116
+ INFO: 2025-11-28T08:50:22 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
117
+ INFO: 2025-11-28T08:50:22 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
118
+ INFO: 10.16.34.155:47736 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
119
+ INFO: 10.16.30.4:37811 - "GET /health HTTP/1.1" 200 OK
120
+ INFO: 10.16.6.70:7156 - "GET /health HTTP/1.1" 200 OK
121
+ INFO: 10.16.11.176:11098 - "GET /health HTTP/1.1" 200 OK
122
+ INFO: 10.16.30.4:41140 - "GET /health HTTP/1.1" 200 OK
123
+ INFO: 10.16.11.176:29957 - "GET /api/v1/tickets/8f08ad14-df8b-4780-84e7-0d45e133f2a6/detail HTTP/1.1" 200 OK
124
+ INFO: 10.16.30.4:49809 - "GET /health HTTP/1.1" 200 OK
125
+ INFO: 10.16.6.70:20369 - "GET /health HTTP/1.1" 200 OK
126
+ INFO: 10.16.6.70:27736 - "GET /health HTTP/1.1" 200 OK
127
+ INFO: 10.16.11.176:34940 - "GET /health HTTP/1.1" 200 OK
128
+ INFO: 2025-11-28T08:52:17 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
129
+ INFO: 2025-11-28T08:52:17 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
130
+ INFO: 10.16.30.4:50527 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
131
+ INFO: 10.16.11.176:42066 - "GET /health HTTP/1.1" 200 OK
132
+ INFO: 10.16.30.4:15072 - "GET /health HTTP/1.1" 200 OK
133
+ INFO: 10.16.34.155:28089 - "GET /health HTTP/1.1" 200 OK
134
+ INFO: 10.16.6.70:54206 - "GET /health HTTP/1.1" 200 OK
135
+ INFO: 2025-11-28T08:53:24 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
136
+ INFO: 2025-11-28T08:53:24 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
137
+ INFO: 2025-11-28T08:53:24 - app.services.audit_service: Audit log created: update on user_preferences by viyisa8151@feralrex.com
138
+ INFO: 2025-11-28T08:53:24 - app.api.v1.auth: Preferences updated for user: viyisa8151@feralrex.com
139
+ INFO: 10.16.11.176:49281 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
140
+ INFO: 2025-11-28T08:53:25 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
141
+ INFO: 2025-11-28T08:53:25 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
142
+ INFO: 10.16.6.70:4546 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
143
+ INFO: 2025-11-28T08:53:25 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
144
+ INFO: 2025-11-28T08:53:25 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
145
+ INFO: 10.16.6.70:4546 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
146
+ INFO: 2025-11-28T08:53:25 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
147
+ INFO: 2025-11-28T08:53:25 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
148
+ INFO: 10.16.30.4:39484 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
149
+ INFO: 10.16.18.114:26025 - "GET /health HTTP/1.1" 200 OK
150
+ INFO: 2025-11-28T08:53:35 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
151
+ INFO: 2025-11-28T08:53:35 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
152
+ INFO: 2025-11-28T08:53:35 - app.services.audit_service: Audit log created: logout on auth by system
153
+ INFO: 2025-11-28T08:53:35 - app.api.v1.auth: User logged out: viyisa8151@feralrex.com
154
+ INFO: 10.16.6.70:37815 - "POST /api/v1/auth/logout HTTP/1.1" 200 OK
155
+ INFO: 10.16.6.70:2267 - "GET /health HTTP/1.1" 200 OK
156
+ INFO: 2025-11-28T08:53:40 - app.core.supabase_auth: User signed in successfully: nadina73@nembors.com
157
+ INFO: 2025-11-28T08:53:40 - app.services.audit_service: Audit log created: login on auth by nadina73@nembors.com
158
+ INFO: 2025-11-28T08:53:40 - app.api.v1.auth: User logged in successfully: nadina73@nembors.com
159
+ INFO: 10.16.30.4:53227 - "POST /api/v1/auth/login HTTP/1.1" 200 OK
160
+ INFO: 2025-11-28T08:53:40 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
161
+ INFO: 2025-11-28T08:53:40 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
162
+ INFO: 10.16.30.4:53227 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
163
+ INFO: 2025-11-28T08:53:41 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
164
+ INFO: 2025-11-28T08:53:41 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
165
+ INFO: 10.16.6.70:2267 - "GET /api/v1/analytics/user/overview HTTP/1.1" 200 OK
166
+ INFO: 2025-11-28T08:53:42 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
167
+ INFO: 2025-11-28T08:53:42 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
168
+ INFO: 10.16.30.4:53227 - "GET /api/v1/projects?page=1&per_page=100 HTTP/1.1" 200 OK
169
+ INFO: 2025-11-28T08:53:56 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
170
+ INFO: 2025-11-28T08:53:56 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
171
+ INFO: 10.16.6.70:41346 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
172
+ INFO: 10.16.18.114:18728 - "GET /health HTTP/1.1" 200 OK
173
+ INFO: 2025-11-28T08:53:56 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
174
+ INFO: 2025-11-28T08:53:56 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
175
+ INFO: 10.16.18.114:18728 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
176
+ INFO: 2025-11-28T08:53:56 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
177
+ INFO: 2025-11-28T08:53:56 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
178
+ INFO: 2025-11-28T08:53:56 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
179
+ INFO: 2025-11-28T08:53:56 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
180
+ INFO: 10.16.30.4:60251 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
181
+ INFO: 10.16.30.4:61903 - "GET /api/v1/analytics/user/overview HTTP/1.1" 200 OK
182
+ INFO: 2025-11-28T08:53:57 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
183
+ INFO: 2025-11-28T08:53:57 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
184
+ INFO: 10.16.34.155:23626 - "GET /api/v1/projects?page=1&per_page=100 HTTP/1.1" 200 OK
185
+ INFO: 2025-11-28T08:53:58 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
186
+ INFO: 2025-11-28T08:53:58 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
187
+ INFO: 10.16.18.114:18728 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
188
+ INFO: 10.16.18.114:12849 - "GET /health HTTP/1.1" 200 OK
189
+ INFO: 2025-11-28T08:53:58 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
190
+ INFO: 2025-11-28T08:53:58 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
191
+ INFO: 2025-11-28T08:53:58 - app.services.audit_service: Audit log created: update on user_preferences by nadina73@nembors.com
192
+ INFO: 2025-11-28T08:53:58 - app.api.v1.auth: Preferences updated for user: nadina73@nembors.com
193
+ INFO: 10.16.30.4:61903 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
194
+ INFO: 2025-11-28T08:53:58 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
195
+ INFO: 2025-11-28T08:53:58 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
196
+ INFO: 2025-11-28T08:53:58 - app.services.dashboard_service: Dashboard cache MISS for project 0ade6bd1-e492-4e25-b681-59f42058d29a, user c5cf92be-4172-4fe2-af5c-f05d83b3a938 - building fresh data
197
+ INFO: 2025-11-28T08:53:59 - app.services.dashboard_service: Built and cached dashboard for project 0ade6bd1-e492-4e25-b681-59f42058d29a
198
+ INFO: 10.16.30.4:61903 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/dashboard HTTP/1.1" 200 OK
199
+ INFO: 2025-11-28T08:53:59 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
200
+ INFO: 2025-11-28T08:53:59 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
201
+ INFO: 10.16.18.114:12849 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
202
+ INFO: 2025-11-28T08:53:59 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
203
+ INFO: 2025-11-28T08:53:59 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
204
+ INFO: 10.16.6.70:22593 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
205
+ INFO: 2025-11-28T08:53:59 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
206
+ INFO: 2025-11-28T08:53:59 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
207
+ INFO: 10.16.34.155:23626 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
208
+ INFO: 10.16.30.4:60251 - "GET /api/v1/notifications?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&page_size=50 HTTP/1.1" 200 OK
209
+ INFO: 10.16.18.114:18728 - "GET /api/v1/tickets/8f08ad14-df8b-4780-84e7-0d45e133f2a6/detail HTTP/1.1" 200 OK
210
+ INFO: 10.16.18.114:18728 - "GET /api/v1/tickets/stats?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a HTTP/1.1" 200 OK
211
+ INFO: 10.16.18.114:18728 - "GET /api/v1/tickets/stats?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a HTTP/1.1" 200 OK
212
+ INFO: 10.16.18.114:18728 - "GET /api/v1/tickets?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&skip=0&limit=50 HTTP/1.1" 200 OK
213
+ INFO: 2025-11-28T08:54:01 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
214
+ INFO: 2025-11-28T08:54:01 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
215
+ INFO: 10.16.34.155:23626 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
216
+ INFO: 10.16.34.155:26775 - "GET /health HTTP/1.1" 200 OK
217
+ INFO: 10.16.11.176:15220 - "GET /health HTTP/1.1" 200 OK
218
+ INFO: 10.16.18.114:1357 - "GET /health HTTP/1.1" 200 OK
219
+ INFO: 10.16.11.176:37649 - "GET /health HTTP/1.1" 200 OK
220
+ INFO: 10.16.30.4:28768 - "GET /health HTTP/1.1" 200 OK
221
+ INFO: 10.16.6.70:15383 - "GET /health HTTP/1.1" 200 OK
222
+ INFO: 10.16.18.114:47374 - "GET /health HTTP/1.1" 200 OK
223
+ INFO: 10.16.6.70:55583 - "GET /health HTTP/1.1" 200 OK
224
+ INFO: 10.16.34.155:25174 - "GET /health HTTP/1.1" 200 OK
225
+ INFO: 10.16.30.4:63005 - "GET /health HTTP/1.1" 200 OK
226
+ INFO: 10.16.6.70:4677 - "GET /health HTTP/1.1" 200 OK
227
+ INFO: 10.16.18.114:53372 - "GET /health HTTP/1.1" 200 OK
228
+ INFO: 10.20.25.113:52398 - "GET /health HTTP/1.1" 200 OK
229
+ INFO: 2025-11-28T08:58:39 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
230
+ INFO: 2025-11-28T08:58:39 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
231
+ INFO: 10.16.6.70:54541 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
232
+ INFO: 10.16.6.70:44650 - "GET /health HTTP/1.1" 200 OK
233
+ INFO: 2025-11-28T08:59:02 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
234
+ INFO: 2025-11-28T08:59:02 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
235
+ INFO: 10.16.34.155:12690 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
236
+ INFO: 10.16.11.176:18899 - "GET /health HTTP/1.1" 200 OK
237
+ INFO: 2025-11-28T08:59:12 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
238
+ INFO: 2025-11-28T08:59:12 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
239
+ INFO: 10.16.18.114:36469 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
240
+ INFO: 2025-11-28T08:59:22 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
241
+ INFO: 2025-11-28T08:59:22 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
242
+ INFO: 10.16.34.155:40636 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
243
+ INFO: 10.16.34.155:52393 - "GET /health HTTP/1.1" 200 OK
244
+ INFO: 10.16.6.70:61087 - "GET /health HTTP/1.1" 200 OK
245
+ INFO: 10.16.18.114:64087 - "GET /health HTTP/1.1" 200 OK
246
+ INFO: 10.16.6.70:17635 - "GET /health HTTP/1.1" 200 OK
247
+ INFO: 2025-11-28T09:00:50 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
248
+ INFO: 2025-11-28T09:00:50 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
249
+ INFO: 2025-11-28T09:00:50 - app.services.dashboard_service: Dashboard cache MISS for project 0ade6bd1-e492-4e25-b681-59f42058d29a, user 43b778b0-2062-4724-abbb-916a4835a9b0 - building fresh data
250
+ INFO: 2025-11-28T09:00:50 - app.services.dashboard_service: Built and cached dashboard for project 0ade6bd1-e492-4e25-b681-59f42058d29a
251
+ INFO: 10.16.34.155:50377 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/dashboard HTTP/1.1" 200 OK
252
+ INFO: 2025-11-28T09:00:53 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
253
+ INFO: 2025-11-28T09:00:53 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
254
+ INFO: 10.16.34.155:50377 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
255
+ INFO: 10.16.18.114:27638 - "GET /health HTTP/1.1" 200 OK
256
+ INFO: 10.16.11.176:12906 - "GET /health HTTP/1.1" 200 OK
257
+ INFO: 10.16.34.155:7521 - "GET /health HTTP/1.1" 200 OK
258
+ INFO: 2025-11-28T09:01:13 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
259
+ INFO: 2025-11-28T09:01:13 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
260
+ INFO: 10.16.18.114:54198 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
261
+ INFO: 10.16.6.70:55645 - "GET /api/v1/tickets/8f08ad14-df8b-4780-84e7-0d45e133f2a6/detail HTTP/1.1" 200 OK
262
+ INFO: 2025-11-28T09:01:13 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
263
+ INFO: 2025-11-28T09:01:13 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
264
+ INFO: 10.16.6.70:55645 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
265
+ INFO: 2025-11-28T09:01:13 - app.api.deps: Checking active user: 43b778b0-2062-4724-abbb-916a4835a9b0, is_active: True, type: <class 'bool'>
266
+ INFO: 2025-11-28T09:01:13 - app.api.deps: User 43b778b0-2062-4724-abbb-916a4835a9b0 is active - proceeding
267
+ INFO: 10.16.11.176:25553 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
268
+ INFO: 10.16.34.155:13536 - "GET /health HTTP/1.1" 200 OK
269
+ INFO: 10.16.18.114:37253 - "GET /health HTTP/1.1" 200 OK
270
+ INFO: 10.16.11.176:3463 - "GET /health HTTP/1.1" 200 OK
271
+ INFO: 10.16.20.7:28143 - "GET /health HTTP/1.1" 200 OK
272
+ INFO: 10.16.18.114:13674 - "GET /health HTTP/1.1" 200 OK
273
+ INFO: 10.16.20.7:19383 - "GET /health HTTP/1.1" 200 OK
274
+ INFO: 10.16.34.155:32956 - "GET /health HTTP/1.1" 200 OK
275
+ INFO: 10.16.18.114:62899 - "GET /health HTTP/1.1" 200 OK
276
+ INFO: 10.16.34.155:20803 - "GET /health HTTP/1.1" 200 OK
277
+ INFO: 10.16.34.155:26110 - "GET /health HTTP/1.1" 200 OK
278
+ INFO: 10.16.18.114:41664 - "GET /health HTTP/1.1" 200 OK
279
+ INFO: 10.16.34.155:43876 - "GET /health HTTP/1.1" 200 OK
280
+ INFO: 10.16.18.114:60319 - "GET /health HTTP/1.1" 200 OK
281
+ INFO: 10.16.11.176:26906 - "GET /health HTTP/1.1" 200 OK
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/api/v1/ticket_assignments.py CHANGED
@@ -226,10 +226,11 @@ def get_available_tickets_for_me(
226
  **Validations:**
227
  - Ticket must be OPEN (not already assigned)
228
  - Agent must be on project team
229
- - Agent's region must match ticket region
230
  - Agent must have capacity (< 4 active tickets)
231
  - No duplicate active assignment
232
 
 
 
233
  **Effects:**
234
  - Creates assignment row (action='self_assigned', is_self_assigned=True)
235
  - assigned_by_user_id = user_id (self)
@@ -251,7 +252,6 @@ def get_available_tickets_for_me(
251
  **Error Cases:**
252
  - 409: Ticket already assigned (someone else picked it first)
253
  - 409: At capacity (already have 4 active tickets)
254
- - 403: Ticket not in your region
255
  - 400: Agent not on project team
256
  """,
257
  tags=["Ticket Assignments - Self Assignment"]
 
226
  **Validations:**
227
  - Ticket must be OPEN (not already assigned)
228
  - Agent must be on project team
 
229
  - Agent must have capacity (< 4 active tickets)
230
  - No duplicate active assignment
231
 
232
+ **Note:** No regional restrictions - agents can work across regions
233
+
234
  **Effects:**
235
  - Creates assignment row (action='self_assigned', is_self_assigned=True)
236
  - assigned_by_user_id = user_id (self)
 
252
  **Error Cases:**
253
  - 409: Ticket already assigned (someone else picked it first)
254
  - 409: At capacity (already have 4 active tickets)
 
255
  - 400: Agent not on project team
256
  """,
257
  tags=["Ticket Assignments - Self Assignment"]
src/app/services/ticket_action_service.py CHANGED
@@ -204,32 +204,15 @@ class TicketActionService:
204
  ).count()
205
 
206
  if active_count < TicketActionService.MAX_AGENT_CAPACITY:
207
- # Check region match
208
- team_member = db.query(ProjectTeam).filter(
209
- ProjectTeam.user_id == current_user.id,
210
- ProjectTeam.project_id == ticket.project_id,
211
- ProjectTeam.deleted_at.is_(None)
212
- ).first()
213
-
214
- can_pick = False
215
- if team_member:
216
- # If agent has no regional restriction, can pick any ticket
217
- if team_member.project_region_id is None:
218
- can_pick = True
219
- # If agent restricted to region, ticket must match
220
- elif team_member.project_region_id == ticket.project_region_id:
221
- can_pick = True
222
-
223
- if can_pick:
224
- actions = [
225
- {"action": "pick", "label": "Pick Ticket", "type": "primary"}
226
- ]
227
- if team_info["assigned_size"] > 0:
228
- message = f"Team ticket ({team_info['assigned_size']}/{team_info['required_size']} assigned)"
229
- else:
230
- message = "Available for pickup"
231
  else:
232
- message = "Ticket not in your assigned region"
233
  else:
234
  message = f"At capacity ({active_count}/{TicketActionService.MAX_AGENT_CAPACITY} active tickets)"
235
  else:
 
204
  ).count()
205
 
206
  if active_count < TicketActionService.MAX_AGENT_CAPACITY:
207
+ # Agent can pick any ticket in their project (no regional restriction)
208
+ # Region is just for filtering, not access control
209
+ actions = [
210
+ {"action": "pick", "label": "Pick Ticket", "type": "primary"}
211
+ ]
212
+ if team_info["assigned_size"] > 0:
213
+ message = f"Team ticket ({team_info['assigned_size']}/{team_info['required_size']} assigned)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  else:
215
+ message = "Available for pickup"
216
  else:
217
  message = f"At capacity ({active_count}/{TicketActionService.MAX_AGENT_CAPACITY} active tickets)"
218
  else:
src/app/services/ticket_assignment_service.py CHANGED
@@ -379,8 +379,8 @@ class TicketAssignmentService:
379
  agent = self._get_user_or_404(user_id)
380
  self._validate_agent_on_project(agent.id, ticket.project_id)
381
 
382
- # Validate region match
383
- self._validate_agent_region_match(agent.id, ticket.project_id, ticket.project_region_id)
384
 
385
  # Check agent capacity
386
  self._validate_agent_capacity(agent.id)
 
379
  agent = self._get_user_or_404(user_id)
380
  self._validate_agent_on_project(agent.id, ticket.project_id)
381
 
382
+ # Note: No region validation - agents can work across regions
383
+ # Region is for filtering/preference, not access control
384
 
385
  # Check agent capacity
386
  self._validate_agent_capacity(agent.id)