6.0.0-beta1
7/6/25

[#14326] Custom attributes values are not shown if type is string
Summary Custom attributes values are not shown if type is string
Queue Whups
Queue Version 3.0.7
Type Bug
State Resolved
Priority 2. Medium
Owners mrubinsk (at) horde (dot) org
Requester heinz (at) htl-steyr (dot) ac (dot) at
Created 04/10/2016 (3374 days ago)
Due
Updated 10/20/2017 (2816 days ago)
Assigned
Resolved 04/10/2016 (3374 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/20/2017 08:34:57 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 1fb12bbfad843093c1b23b5ab39e42d08e700855
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Sun, 10 Apr 2016 18:54:24 -0400

Bug: 14326 Fix decoding custom_attributes.

These can be json_encoded (which may contain large numeric strings
such as phone numbers), or bare scalar values.

  M lib/Driver.php
  M lib/Driver/Sql.php

https://github.com/horde/whups/commit/1fb12bbfad843093c1b23b5ab39e42d08e700855
04/10/2016 10:55:50 PM Michael Rubinsky Comment #4
Assigned to Michael Rubinsky
State ⇒ Resolved
Reply to this comment
Whups 3.0.8
04/10/2016 10:55:11 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 414a561e1295df8083100df9c8a4ed31d8567208
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Sun Apr 10 18:51:48 2016 -0400

     Bug: 14326 Fix decoding custom_attributes.

     These can be json_encoded (which may contain large numeric strings
     such as phone numbers), or bare scalar values.

  whups/lib/Driver.php     |   50 +++++++++++++++++++++++++++++++++++----------
  whups/lib/Driver/Sql.php |   38 ++--------------------------------
  2 files changed, 42 insertions(+), 46 deletions(-)

http://github.com/horde/horde/commit/414a561e1295df8083100df9c8a4ed31d8567208
04/10/2016 10:53:42 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 3472b95bde312d663fa44b38e6c8b32b4ae4412e
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Sun Apr 10 18:51:48 2016 -0400

     Bug: 14326 Fix decoding custom_attributes.

     These can be json_encoded (which may contain large numeric strings
     such as phone numbers), or bare scalar values.

  whups/lib/Driver.php     |   50 +++++++++++++++++++++++++++++++++++----------
  whups/lib/Driver/Sql.php |   38 ++--------------------------------
  2 files changed, 42 insertions(+), 46 deletions(-)

http://github.com/horde/horde/commit/3472b95bde312d663fa44b38e6c8b32b4ae4412e
04/10/2016 11:39:46 AM heinz (at) htl-steyr (dot) ac (dot) at Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Custom attributes values are not shown if type is string
Queue ⇒ Whups
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
After upgrading whups to 3.0.7 custom attribute values are blank in 
ticket history if they are of type string.

In my existing sql storage the attribute values (in table 
whups_attributes) are stored as string (not json encoded)
Prior upgrading the values were retrived and  tried to decode by 
Horde_Serialize::unserialize
Horde_Serialize::unserialize returned the provided string in case of a 
not JSON-coded argument.

After upgrade json_decode (with JSON_BIGINT_AS_STRING option) is used 
in case of a string.
json_decode is returning NULL if the argument isn't JSON-coded
and so custom string attributes are not shown.

I think, it's a side effect of ticket 14146



Saved Queries