6.0.0-alpha12
6/12/25

[#13011] Calling updateTicket via API not working
Summary Calling updateTicket via API not working
Queue Whups
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester geiger (at) b1-systems (dot) de
Created 03/05/2014 (4117 days ago)
Due
Updated 03/06/2014 (4116 days ago)
Assigned
Resolved 03/06/2014 (4116 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/06/2014 11:24:53 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit bd7c71d9fd11088adf68294220c76a0ab090e917
Author: Jan Schneider <jan@horde.org>
Date:   Thu Mar 6 12:20:04 2014 +0100

     [jan] Fix updateTicket() API method (Bug #13011).

  whups/docs/CHANGES |    1 +
  whups/package.xml  |    2 ++
  2 files changed, 3 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/bd7c71d9fd11088adf68294220c76a0ab090e917
03/06/2014 11:19:44 AM Jan Schneider Comment #4
Assigned to Jan Schneider
State ⇒ Resolved
Reply to this comment
Works fine here after the fixes.
03/06/2014 10:25:49 AM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit d79a1893dcdee3650cc493dc7c5f4300adae7cd5
Author: Jan Schneider <jan@horde.org>
Date:   Thu Mar 6 11:20:35 2014 +0100

     Pass ticket (Bug #13011).

  whups/lib/Api.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/d79a1893dcdee3650cc493dc7c5f4300adae7cd5
03/06/2014 10:25:47 AM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 1fb10ef024b7b2f8fe1d04f1a58067a25f4350e0
Author: Jan Schneider <jan@horde.org>
Date:   Thu Mar 6 11:19:09 2014 +0100

     Fix constructor call (Bug #13011).

  whups/lib/Api.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/1fb10ef024b7b2f8fe1d04f1a58067a25f4350e0
03/05/2014 10:15:12 AM geiger (at) b1-systems (dot) de Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Calling updateTicket via API not working
Queue ⇒ Whups
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
I'm currently trying to update the status of a ticket through the given API.

The call fires as follows:
$this->registry->call('tickets/updateTicket', array($ticket_id, 
array('state' => '1', 'due' => $date)));

The script then dies due to this error:
PHP Fatal error:  Cannot pass parameter 2 by reference in 
/srv/git/horde/whups/lib/Api.php on line 231.

While investigating and tracing the bug I've discovered, that the 
parameter "null" as passed on line 231:
$editform = new Whups_Form_Ticket_Edit($vars, null, $ticket);
is not correct. I've tried adjusting this by changing the call to 
($vars, $ticket, null), which solves this problem, but comes up with 
the next one.

Line 251: $whups_driver->setAttributes($info);
this calles Whups_Driver::setAttributes and passes only one parameter, 
but expects two. Adjusting this also does not solve the problem, but 
I'm not able to track it beyond this.

It would be great if someone can confirm and fix this bug.

Thanks!

Saved Queries