Bug #5078

Parameter status in method ListTickets

Added by yllen over 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:10/04/2014
Priority:NormalDue date:
Assignee:yllen% Done:

100%

Category:-
Target version:1.4.3

Description

Version GLPI: 0.84.2
Version WebService: 1.4.2

URL: http://localhost/plugins/webservices/rest.php?method=glpi.listTickets&status=1

Return: {“faultCode”:14, “faultString”:”Bad parameter (status)”}

Associated revisions

Revision 387
Added by yllen over 7 years ago

fix lisTicket for status - fixed #5078

Revision 388
Added by yllen over 7 years ago

fix listTickets for notclosed and notold - see #5078

History

#1 Updated by badconker over 7 years ago

Revision r385 fixes issue in your example but this follwing example doesn't work :

http://localhost/plugins/webservices/rest.php?method=glpi.listTickets&status=notclosed

A solution ? :

$statusticket = Ticket::getAllStatusArray(true);

#2 Updated by yllen over 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r387.

#3 Updated by ecrispim over 7 years ago

The revision r387 returns empty, this works for me:


 case 'notclosed' :
    $status = Ticket::getAllStatusArray();
    $status_closed = Ticket::getClosedStatusArray();               
    unset($status[$status_closed[0]]);
    $where .= " AND `glpi_tickets`.`status` IN (".implode(",",array_keys($status)).") ";
 break;

#4 Updated by yllen about 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF