6.0.0-beta1
8/10/25

[#14131] monthdayyear object not logged in history
Summary monthdayyear object not logged in history
Queue Horde Framework Packages
Type Bug
State Not Reproducible
Priority 1. Low
Owners
Requester birnbacs (at) gmail (dot) com
Created 10/08/2015 (3594 days ago)
Due
Updated 02/11/2016 (3468 days ago)
Assigned 01/14/2016 (3496 days ago)
Resolved 02/11/2016 (3468 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
02/11/2016 03:11:52 PM Jan Schneider State ⇒ Not Reproducible
 
01/14/2016 01:55:18 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
I cannot reproduce this. After fixing bug #14130 the monthdayyear 
attribute is displayed both in the summary and the history.
10/08/2015 08:54:36 AM birnbacs (at) gmail (dot) com Comment #1
Priority ⇒ 1. Low
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Framework Packages
Due ⇒ 10/30/2015
Summary ⇒ monthdayyear object not logged in history
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
This ticket is related to ticket #14130.

After fixing the monthdayyear object so that it would be usable in 
whups I noticed that its history does not get displayed properly, the 
amended value never showed up.

In pear module Form the class of the monthdayyear object is defined in 
file Form/Type.php. Its init() method is defined in line 2851:
class Horde_Form_Type_monthdayyear extends Horde_Form_Type 
{$start_year = '', $end_year = '', $picker = true,
                    $format_in = null, $format_out = '%x')

The init() method accepts 5 arguments, the last of which is 
$format_out and has a default value of '%x'. In line 2865 the 
protected variable $this->_format_out is unconditionally set to 
$format_out. However, at least in the context of a user defined 
attribute in whups, the init() method is called with $format_out = 
null, which causes incorrect rendering of the variable saved in the 
history (i.e. no rendering at all).

I fixed this by checking that $format_out is not null before 
overwriting the protected variable:

         if ($format_out != null) { // line 2865: don't overwrite the 
default value with null
           $this->_format_out = $format_out;

Saved Queries