Summary | Empty "Owners" "Requesters" in History summary |
Queue | Whups |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | simon (at) simonandkate (dot) net |
Created | 02/16/2013 (4533 days ago) |
Due | |
Updated | 06/25/2013 (4404 days ago) |
Assigned | 06/19/2013 (4410 days ago) |
Resolved | 06/22/2013 (4407 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
commit a6ef8cc449308ec156b6b50faf737293a0a59746
Author: Jan Schneider <jan@horde.org>
Date: Mon Jun 24 17:17:54 2013 +0200
Allow multiple addresses (
Bug #12051).whups/docs/CHANGES | 1 +
whups/lib/Form/TicketDetails.php | 2 +-
whups/package.xml | 4 ++--
3 files changed, 4 insertions(+), 3 deletions(-)
http://git.horde.org/horde-git/-/commit/a6ef8cc449308ec156b6b50faf737293a0a59746
commit 375a002dc1f55a56a5122099fc0d97e3e776e6f6
Author: Jan Schneider <jan@horde.org>
Date: Mon Jun 24 17:16:44 2013 +0200
[jan] Fix inactive email fields with multiple addresses if
disabling linking (
Bug #12051)..../Core/lib/Horde/Core/Ui/VarRenderer/Html.php | 2 +-
framework/Core/package.xml | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/375a002dc1f55a56a5122099fc0d97e3e776e6f6
are selected!
if multiple assigned (not the end of the world in my environment).
Thanks for the fix.
selected!
State ⇒ Resolved
fixed the problem in my case
My feeling with the missing commit was not so wrong ;-)
I've traced the problem and it relays not on whups.
Problem stays in rendering email-vars.
My actual installation using Horde_Core 2.6.0
in Horde/Core/Ui/VarRenderer/Html.php, function
_renderVarDisplay_email code looks like that:
} else {
$addrs=
$GLOBALS['injector']->getInstance('Horde_Mail_Rfc822')->parseAddressList($email_val,
array(
'limit' => 1
));
$display_email = $var->type->getProperty('strip_domain')
? $addr->mailbox . ' (at) ' . str_replace('.', '
(dot) ', $addr->host)
: $addr->bare_address;
return nl2br(htmlspecialchars($display_email));
}
$addrs is retrieved but later $addr (without the "s") is used and
$addrs is an array ($addr should be replaced by $addrs[0])
It seems that this bug is resolved in git
commit c0850e81710d667e144415a1e09c5b7903c0279f
Author: Jan Schneider <jan@horde.org>
Date: Fri Jun 14 17:24:40 2013 +0200
[jan] Fix rendering of email addresses in inactive forms.
:100644 100644 bc256d4... ec2aa8e... M
framework/Core/lib/Horde/Core/Ui/VarRenderer/Html.php
Code here looks like this:
} else {
$addrs =
$GLOBALS['injector']->getInstance('Horde_Mail_Rfc822')->parseAddressList($email_val,
array(
'limit' => 1
));
$display = array();
foreach ($addrs as $addr) {
$display_email = $var->type->getProperty('strip_domain')
? $addr->mailbox . ' (at) ' . str_replace('.', '
(dot) ', $addr->host)
: $addr->bare_address;
$display[] = htmlspecialchars($display_email);
}
return implode(', ', $display);
}
Updating Horde/Core/Ui/VarRenderer/Html.php to actual git version
fixed the problem in my case
db convert from horde 4) and whups was never installed before, same
problem!
You test with git?
Maybe there is somewhere a commit which is still not in the release,
that would not be the first time ;-)
address gets lost.
string(46) "Samuel Wolf <samuel.wolf@wolf-maschinenbau.de>"
replaced by (at).
Installed packages, channel pear.horde.org:
===========================================
Package Version State
Horde_ActiveSync 2.5.0 stable
Horde_Alarm 2.0.4 stable
Horde_Argv 2.0.7 stable
Horde_Auth 2.0.4 stable
Horde_Autoloader 2.0.1 stable
Horde_Browser 2.0.3 stable
Horde_Cache 2.2.0 stable
Horde_Cli 2.0.3 stable
Horde_Compress 2.0.3 stable
Horde_Compress_Fast 1.0.1 stable
Horde_Constraint 2.0.1 stable
Horde_Controller 2.0.1 stable
Horde_Core 2.6.0 stable
Horde_Crypt 2.2.0 stable
Horde_Crypt_Blowfish 1.0.2 stable
Horde_Css_Parser 1.0.0 stable
Horde_Data 2.0.4 stable
Horde_Date 2.0.6 stable
Horde_Date_Parser 2.0.2 stable
Horde_Dav 1.0.0 stable
Horde_Db 2.0.3 stable
Horde_Editor 2.0.3 stable
Horde_Exception 2.0.3 stable
Horde_Form 2.0.4 stable
Horde_Group 2.0.2 stable
Horde_HashTable 1.0.0 stable
Horde_History 2.1.0 stable
Horde_Http 2.0.3 stable
Horde_Icalendar 2.0.6 stable
Horde_Image 2.0.4 stable
Horde_Imap_Client 2.11.6 stable
Horde_Injector 2.0.2 stable
Horde_Itip 2.0.5 stable
Horde_Ldap 2.0.2 stable
Horde_ListHeaders 1.0.1 stable
Horde_Lock 2.1.0 stable
Horde_Log 2.0.1 stable
Horde_LoginTasks 2.0.2 stable
Horde_Mail 2.0.5 stable
Horde_Memcache 2.0.2 stable
Horde_Mime 2.2.2 stable
Horde_Mime_Viewer 2.0.5 stable
Horde_Nls 2.0.3 stable
Horde_Notification 2.0.1 stable
Horde_Oauth 2.0.1 stable
Horde_Pdf 2.0.3 stable
Horde_Perms 2.1.0 stable
Horde_Prefs 2.4.1 stable
Horde_Queue 1.0.0 stable
Horde_Rdo 2.0.2 stable
Horde_Role 1.0.1 stable
Horde_Routes 2.0.2 stable
Horde_Rpc 2.1.0 stable
Horde_Scheduler 2.0.1 stable
Horde_Secret 2.0.2 stable
Horde_Serialize 2.0.2 stable
Horde_Service_Facebook 2.0.4 stable
Horde_Service_Twitter 2.1.0 stable
Horde_Service_UrlShortener 2.0.1 stable
Horde_Service_Weather 2.0.5 stable
Horde_SessionHandler 2.2.0 stable
Horde_Share 2.0.3 stable
Horde_SpellChecker 2.1.0 stable
Horde_Stream 1.2.0 stable
Horde_Stream_Filter 2.0.1 stable
Horde_Stream_Wrapper 2.0.1 stable
Horde_Support 2.1.0 stable
Horde_SyncMl 2.0.3 stable
Horde_Template 2.0.1 stable
Horde_Text_Diff 2.0.2 stable
Horde_Text_Filter 2.1.3 stable
Horde_Text_Filter_Csstidy 2.0.1 stable
Horde_Text_Flowed 2.0.1 stable
Horde_Timezone 1.0.3 stable
Horde_Token 2.0.4 stable
Horde_Translation 2.0.1 stable
Horde_Tree 2.0.2 stable
Horde_Url 2.2.0 stable
Horde_Util 2.2.2 stable
Horde_Vfs 2.1.0 stable
Horde_View 2.0.2 stable
Horde_Xml_Element 2.0.1 stable
Horde_Xml_Wbxml 2.0.1 stable
ansel 3.0.0beta1 beta
content 2.0.2 stable
gollem 3.0.1 stable
horde 5.1.1 stable
imp 6.1.2 stable
ingo 3.1.1 stable
kronolith 4.1.1 stable
mnemo 4.1.0 stable
nag 4.1.0 stable
passwd 5.0.0 stable
timeobjects 2.0.4 stable
trean 1.0.2 stable
turba 4.1.0 stable
whups 3.0.0beta1 beta
wicked 2.0.0beta1 beta
addresses, interpreted as tags by the browser.
string(46) "Samuel Wolf <samuel.wolf@wolf-maschinenbau.de>"
by (at).
email addresses, interpreted as tags by the browser.
string(46) "Samuel Wolf <samuel.wolf@wolf-maschinenbau.de>"
strings with usernames, interesting is the space in the last three strings:
string(11) "USER2" string(11) "USER2" string(11) "Samuel Wolf"
string(46) "USER2 " string(46) "USER2 " string(46) "Samuel Wolf "
addresses, interpreted as tags by the browser.
array with all the users and mail addresses:
array(4) { ["user"]=> string(0) "" ["type"]=> string(4) "user"
["name"]=> string(0) "" ["email"]=> string(32)
"samuel.wolf@wolf-maschinenbau.de" } array(4) { ["user"]=> string(11)
"USER2" ["type"]=> string(4) "user" ["name"]=> string(11)
"NAMEofUSER2" ["email"]=> object(Horde_Mail_Rfc822_Address)#412 (4) {
["comment"]=> array(0) { } ["mailbox"]=> string(11)
[...]
var_dump($name); on line 790
strings with usernames, interesting is the space in the last three strings:
string(11) "USER2" string(11) "USER2" string(11) "Samuel Wolf"
string(46) "USER2 " string(46) "USER2 " string(46) "Samuel Wolf "
Put instead a var_dump($details); on line 775 and var_dump($name); on line 790
why the email address is not correctly returned.
Try adding this code on line 725 of lib/Whups.php:
var_dump(self::$_users[$user]);
string(4) "user" ["name"]=> string(11) "name-requester" ["email"]=>
object(Horde_Mail_Rfc822_Address)#181 (4) { ["comment"]=> array(0) { }
["mailbox"]=> string(11) "horde-user-requester" ["_host":protected]=>
string(20) "wolf-maschinenbau.de" ["_personal":protected]=> NULL } }
array(4) { ["user"]=> string(11) "horde-user-requester" ["type"]=>
string(4) "user" ["name"]=> string(11) "name-requester" ["email"]=>
object(Horde_Mail_Rfc822_Address)#182 (4) { ["comment"]=> array(0) { }
["mailbox"]=> string(11) "horde-user-requester" ["_host":protected]=>
string(20) "wolf-maschinenbau.de" ["_personal":protected]=> NULL } }
array(4) { ["user"]=> string(11) "samuel.wolf" ["type"]=> string(4)
"user" ["name"]=> string(11) "Samuel Wolf" ["email"]=>
object(Horde_Mail_Rfc822_Address)#187 (4) { ["comment"]=> array(0) { }
["mailbox"]=> string(11) "samuel.wolf" ["_host":protected]=>
string(20) "wolf-maschinenbau.de" ["_personal":protected]=> NULL } }
array(4) { ["user"]=> string(11) "horde-user-requester" ["type"]=>
string(4) "user" ["name"]=> string(11) "name-requester" ["email"]=>
object(Horde_Mail_Rfc822_Address)#183 (4) { ["comment"]=> array(0) { }
["mailbox"]=> string(11) "horde-user-requester" ["_host":protected]=>
string(20) "wolf-maschinenbau.de" ["_personal":protected]=> NULL } }
array(4) { ["user"]=> string(11) "samuel.wolf" ["type"]=> string(4)
"user" ["name"]=> string(11) "Samuel Wolf" ["email"]=>
object(Horde_Mail_Rfc822_Address)#182 (4) { ["comment"]=> array(0) { }
["mailbox"]=> string(11) "samuel.wolf" ["_host":protected]=>
string(20) "wolf-maschinenbau.de" ["_personal":protected]=> NULL } }
(replace horde user by "horde-user-requester" - replace user name by
"name-requester")
is ok or not?
@ simon,
it works for you?
my commit should fix it. I'm afraid you need to track down yourself,
why the email address is not correctly returned.
Try adding this code on line 725 of lib/Whups.php:
var_dump(self::$_users[$user]);
and see if it outputs the correct name and address. If not, there's
something wrong with your preferences and this is not related to Whups
at all.
My mailadress is set in
"Global Preferences -> Personal Information -> The default e-mail
address to use with this identity:"
and
"Preferences for Mail -> The default e-mail address to use with this
identity:"
Open a queue summary show the user name in "Requester" and "Owners",
ticket summary still show
Owners (at)
Requester (at)
Assigned to Jan Schneider
commit f1d7c66fd924271c1a082619a73329f5e7117913
Author: Jan Schneider <jan@horde.org>
Date: Thu Jun 20 11:41:15 2013 +0200
Use explicit methods to retrieve user's full name and email
address (
Bug #12051).whups/lib/Whups.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/f1d7c66fd924271c1a082619a73329f5e7117913
the identities. Where do you store preferences, and does this user
have an email address set in his identities?
2013-06-19T21:21:42+02:00 DEBUG: HORDE [whups] SQL (0,0001s)
SELECT ticket_id AS id, ticket_owner AS owner FROM whups_ticket_owners
WHERE ticket_id IN (640) [pid 13032 on line 319 of
"/usr/share/php/Horde/Db/Adapter/Mysqli.php"]
mysql> SELECT ticket_id AS id, ticket_owner AS owner FROM
whups_ticket_owners WHERE ticket_id IN (640);
+-----+------------------+
| id | owner |
+-----+------------------+
| 640 | user:user1 |
| 640 | user:user2 |
+-----+------------------+
2 rows in set (0.00 sec)
mysql>
New Attachment: whups_ticket_owners.png
New Attachment: horde_whups.png
whups 3.0.0beta1
State ⇒ Feedback
whups_tickets table, and displaying the results in the ticket view,
works fine here.
grep -r "(at)" whups
whups/lib/Whups.php:
array(' (at) ', ' (dot) '),
Whups.php generate only the history, not the history head.
shown in the history tab doesn't show owners, requesters, due,
assigned.
Tickets (whups) 3.0.0-git
Horde (horde) 5.0.4
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: whups.png
Patch ⇒ No
Milestone ⇒
Queue ⇒ Whups
Summary ⇒ Empty "Owners" "Requesters" in History summary
Type ⇒ Bug
Ticket functionality all seems to be working fine, but the Summary
shown in the history tab doesn't show owners, requesters, due, assigned.
See screenshot attached.