Commit 6d7b617
Dolicraft
Fix Dolibarr#35086 do not show TicketMarkedAsClosed when close() failed
Ticket::close() returns >0 on success, 0 on no-op, <0 on error (including when a
custom TICKET_CLOSE trigger blocks the close). Two action handlers in ticket/card.php
relied on PHP's truthiness, so a returned -1 was treated as success, showing the
green TicketMarkedAsClosed message together with the trigger's error. Check >0
explicitly in both confirm_close/confirm_abandon and confirm_public_close.
Signed-off-by: Dolicraft <contact@dolicraft.com>1 parent 13f21da commit 6d7b617
1 file changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
| 482 | + | |
482 | 483 | | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
488 | 490 | | |
489 | 491 | | |
490 | 492 | | |
| |||
0 commit comments