Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Whine Emails - Add QA Contact Column to show RealName

23 views
Skip to first unread message

CJ-77

unread,
Jul 16, 2009, 2:37:30 PM7/16/09
to support-...@lists.mozilla.org

I am trying to add the QA Contact column to our whine emails. I've got it
mostly configured, but the value for the QA Contact is showing as a
numerical value in the email.

Here is what I've done:
**** whine\mail.html.tmpl ****
Header
<th align="left">QA Contact</th>
Data
<td align="left">[% bug.qa_contact FILTER html %]</td>

**** whine.pl ****
@searchfields
'bugs.qa_contact',
'map_qa_contact.login_name',


I'm getting the QA Contact field to show in my email, but again it just is
showing the user id. Can someone tell me how to get it to show the QA
Contact Real Name?

Also, the assignee Real Name and not Login_Name?

Thanks in advance!

--
View this message in context: http://www.nabble.com/Whine-Emails---Add-QA-Contact-Column-to-show-RealName-tp24522081p24522081.html
Sent from the Bugzilla - Users mailing list archive at Nabble.com.

Eric Black

unread,
Jul 16, 2009, 3:25:45 PM7/16/09
to support-...@lists.mozilla.org

>I am trying to add the QA Contact column to our whine emails. I've got it
>mostly configured, but the value for the QA Contact is showing as a
>numerical value in the email.

>Here is what I've done:
>**** whine\mail.html.tmpl ****
>Header
> <th align="left">QA Contact</th>
>Data
> <td align="left">[% bug.qa_contact FILTER html %]</td>

>**** whine.pl ****
>@searchfields
> 'bugs.qa_contact',
> 'map_qa_contact.login_name',


>I'm getting the QA Contact field to show in my email, but again it just is
>showing the user id. Can someone tell me how to get it to show the QA
>Contact Real Name?

>Also, the assignee Real Name and not Login_Name?

I think you'd want to use the same format as assigned_to:

[%# assignee_login_string is a literal string used for getting the
# assignee's name out of the bug data %]
[% SET assignee_login_string="map_assigned_to.login_name" %]

<td align="left">[% bug.$assignee_login_string FILTER html %]</td>

Just make a copy of the above and replace all 'map_assigned_to' to 'map_qa_contact' and 'assignee_login_string' to 'qa_contact_string':

[% SET qa_contact_string="map_qa_contact.login_name" %]

<td align="left">[% bug.$qa_contact_string FILTER html %]</td>


To get the realname, you'll need to run a 'select realname from profiles where userid=?' using the bugs.qa_contact data that you got.

Eric Black

unread,
Jul 16, 2009, 3:41:15 PM7/16/09
to support-...@lists.mozilla.org

> To get the realname, you'll need to run a 'select realname from profiles where userid=?' using the bugs.qa_contact data that you got.

Actually, I looked at this and you don't need to write a separate query, all you need to do is what I said earlier, but replace 'map_qa_contact.login_name' with 'map_qa_contact.realname'.

CJ-77

unread,
Dec 17, 2009, 2:40:30 PM12/17/09
to support-...@lists.mozilla.org

I changed the map_qa_contact.login_name references to
map_qa_contact.realname:

[%# qa_contact_string is a literal string used for getting the
# QA contact's name out of the bug data %]
[% SET qa_contact_string="map_qa_contact.realname" %]

But the email shows nothing now. If I change back to
map_qa_contact.login_name then I see the email address. So, I'm still not
able to get the QA realname to show. {I tried the same for assignee and the
email shows blank assignee data when I reference .realname}

--
View this message in context: http://old.nabble.com/Whine-Emails---Add-QA-Contact-Column-to-show-RealName-tp24522081p26833756.html

Eric Black

unread,
Dec 18, 2009, 11:05:28 AM12/18/09
to support-...@lists.mozilla.org

>>
>>
>>> To get the realname, you'll need to run a 'select realname from profiles
>>> where userid=?' using the bugs.qa_contact data that you got.
>>
>> Actually, I looked at this and you don't need to write a separate query,
>> all you need to do is what I said earlier, but replace
>> 'map_qa_contact.login_name' with 'map_qa_contact.realname'.
>>
>
>I changed the map_qa_contact.login_name references to
>map_qa_contact.realname:
>
> [%# qa_contact_string is a literal string used for getting the
> # QA contact's name out of the bug data %]
> [% SET qa_contact_string="map_qa_contact.realname" %]
>
>But the email shows nothing now. If I change back to
>map_qa_contact.login_name then I see the email address. So, I'm still not
>able to get the QA realname to show. {I tried the same for assignee and the
>email shows blank assignee data when I reference .realname}

I forgot to mention you also need to replace map_qa_contact.login_name with map_qa_contact.realname in the searchfields array in whine.pl.

CJ-77

unread,
Dec 18, 2009, 12:10:26 PM12/18/09
to support-...@lists.mozilla.org

That's exactly what I needed, thank you!!!

> _______________________________________________
> support-bugzilla mailing list
> support-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/support-bugzilla
> PLEASE put support-...@lists.mozilla.org in the To: field when you
> reply.
>
>

--
View this message in context: http://old.nabble.com/Whine-Emails---Add-QA-Contact-Column-to-show-RealName-tp24522081p26846411.html

0 new messages