6.0.0-RC7
6/16/26

[#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/8/15 (3904 days ago)
Due
Updated 2/11/16 (3778 days ago)
Assigned 1/14/16 (3806 days ago)
Resolved 2/11/16 (3778 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
523 Jan Schneider State ⇒ Not Reproducible
 
181 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.
368 birnbacs (at) gmail (dot) com Comment #1
Priority ⇒ 1. Low
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Framework Packages
Due ⇒ 10/30/15
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