#7396 changing columns does not log status changes#183
Conversation
Introduce logStatusChangeActivity() to write human-readable status changes to zp_ticket_status_changes using TicketHistoryModel. Co-authored-by: Cursor <cursoragent@cursor.com>
Detect status changes on the dragged ticket during kanban sort updates and write them to zp_ticket_status_changes via logStatusChangeActivity(). Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughWalkthroughKanban ticket updates now capture the moved ticket’s previous state, compare it after bulk updates, and log changed statuses in ticket history using resolved status labels. ChangesTicket status history
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Kanban as Kanban update flow
participant Tickets as Ticket model
participant Logger as logStatusChangeActivity
participant History as TicketHistoryModel
Kanban->>Tickets: Load handler ticket and capture prior status
Kanban->>Tickets: Apply bulk status updates
Kanban->>Tickets: Reload updated ticket
Kanban->>Logger: Log changed status
Logger->>History: Persist status-select activity
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/Domain/Tickets/Services/Tickets.php (1)
2048-2050: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winComplete the phpDoc for the new helper.
The doc block omits
@param/@return. Add them to satisfy the project's phpDoc standard.📝 Proposed phpDoc
/** * Log a kanban status change to the ticket activity history. + * + * `@param` int $ticketId The ticket whose status changed. + * `@param` int $oldStatus The previous status id. + * `@param` int $newStatus The new status id. + * `@param` int $projectId The project id used to resolve status labels. */ private function logStatusChangeActivity(As per coding guidelines: "Add valid phpDoc comments to all methods and classes".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/Domain/Tickets/Services/Tickets.php` around lines 2048 - 2050, Complete the phpDoc for the new kanban status-change helper by adding valid `@param` tags for every method argument and an `@return` tag matching the method’s return type, following the project’s existing documentation conventions.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@app/Domain/Tickets/Services/Tickets.php`:
- Around line 2048-2050: Complete the phpDoc for the new kanban status-change
helper by adding valid `@param` tags for every method argument and an `@return` tag
matching the method’s return type, following the project’s existing
documentation conventions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 65a94133-509f-43a6-8fdc-f13896608fa6
📒 Files selected for processing (1)
app/Domain/Tickets/Services/Tickets.php
Description
Resolves: http://pearlog.pearshadow.com/tickets/showKanban?tab=ticketdetails#/tickets/showTicket/7396