3.6.1 change record format on at a glance page

RT 3.6.1.
I’ve changed my default search results to include some custom fields by
modifying $DefaultSearchResultFormat in RT_SiteConfig.pm.

Additionally, I want to change the default format on the at a glance
page to include these fields. I found this page
http://wiki.bestpractical.com/index.cgi?ChangeDefaultRTAtAGlance
which is about what is displayed on the page rather than how.

So, I tried to assume and extrapolate like this:

The default search formats are apparently stored in the Attributes table
and created by RT_System i.e. Creator = 1.

mysql> select id, name, description from Attributes where Creator = 1;
| id | name | description |
| 19 | Search - My Tickets | [_1] highest priority tickets I own |
| 20 | Search - Unowned Tickets | [_1] newest unowned tickets |
| 21 | HomepageSettings | HomepageSettings |

As user 104, I customized the search results to my satisfaction.

mysql> select id, name, description from Attributes where Creator = 104;
| id | name | description |
| 22 | Pref-RT::Attribute-19 | NULL |
| 23 | Pref-SummaryRows | NULL |
| 25 | Pref-HomepageSettings | NULL |
| 26 | Pref-RT::Attribute-20 | NULL |

I then updated the default searches with the content of my customized
search.

mysql> update Attributes set Content = ‘BQcDAAAABBc…’ where id = 19;
Query OK, 1 row affected (0.04 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> update Attributes set Content = ‘BQcDAAAABBcPQ…’ where id = 20;
Query OK, 1 row affected (0.04 sec)
Rows matched: 1 Changed: 1 Warnings: 0

But now, the at a glance results are all blank. Is there a better way to
do this, or at least a tweak to this method?
Dale Bewley - Unix Administrator - Shields Library - UC Davis
GPG: 0xB098A0F3 0D5A 9AEB 43F4 F84C 7EFD 1753 064D 2583 B098 A0F3

signature.asc (189 Bytes)

RT 3.6.1.
I’ve changed my default search results to include some custom fields by
modifying $DefaultSearchResultFormat in RT_SiteConfig.pm.

Additionally, I want to change the default format on the at a glance
page to include these fields. I found this page
Request Tracker Wiki
which is about what is displayed on the page rather than how.

So, I tried to assume and extrapolate like this:

The default search formats are apparently stored in the Attributes table
and created by RT_System i.e. Creator = 1.

mysql> select id, name, description from Attributes where Creator = 1;
±—±-------------------------±------------------------------------+
| id | name | description |
±—±-------------------------±------------------------------------+
| 19 | Search - My Tickets | [_1] highest priority tickets I own |
| 20 | Search - Unowned Tickets | [_1] newest unowned tickets |
| 21 | HomepageSettings | HomepageSettings |
±—±-------------------------±------------------------------------+

As user 104, I customized the search results to my satisfaction.

mysql> select id, name, description from Attributes where Creator = 104;
±—±----------------------±------------+
| id | name | description |
±—±----------------------±------------+
| 22 | Pref-RT::Attribute-19 | NULL |
| 23 | Pref-SummaryRows | NULL |
| 25 | Pref-HomepageSettings | NULL |
| 26 | Pref-RT::Attribute-20 | NULL |
±—±----------------------±------------+

I then updated the default searches with the content of my customized
search.

mysql> update Attributes set Content = ‘BQcDAAAABBc…’ where id = 19;
Query OK, 1 row affected (0.04 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> update Attributes set Content = ‘BQcDAAAABBcPQ…’ where id = 20;
Query OK, 1 row affected (0.04 sec)
Rows matched: 1 Changed: 1 Warnings: 0

But now, the at a glance results are all blank. Is there a better way to
do this, or at least a tweak to this method?

Well, apparently there is not yet an ordained method for this. :slight_smile:
I did find out why the results are blank.

If I modify Elements/ShowSearch to Data::Dumper the $search->Content
hash, I can see that the content from my record does not contain a query
value unlike the content in the default record #20.

Mine:
$VAR1 = {
‘Order’ => ‘ASC|ASC|ASC|ASC’,
‘OrderBy’ => ‘id’,
‘Format’ => ‘'id/TITLE:#',
'Subject/TITLE:Subject',
'CustomField.{Department}/TITLE:Dept',
'CustomField.{SubQueue}/TITLE:Area',
'QueueName',
'CreatedRelative',
'loc(Take)/TITLE:  '’,
‘RowsPerPage’ => ‘0’
};

Default:
$VAR1 = {
‘Order’ => ‘DESC’,
‘Query’ => ’ Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')',
‘OrderBy’ => ‘Created’,
‘Format’ => ''id/TITLE:#', 'Subject/TITLE:Subject', QueueName, ExtendedStatus, CreatedRelative, 'loc(Take)/TITLE: ' ’
};

So, I guess if I can hack together some code to build a suitable hash
then nfreeze and base64 encode it (as seen in Attribute.pm), I’ll have a
string that will fit.

I tried to decode the content field on the cmd line and got a Storable
module error:
Storable binary image v33.81 more recent than I am (v2.7)
at …/…/lib/Storable.pm (autosplit
into …/…/lib/auto/Storable/thaw.al) line 366

I assume this means there’s some difference in Storable.pm as seen by
mod_perl versus perl and that I’ll have to do this freezing inside
Mason.

Hints happily accepted.
Dale Bewley - Unix Administrator - Shields Library - UC Davis
GPG: 0xB098A0F3 0D5A 9AEB 43F4 F84C 7EFD 1753 064D 2583 B098 A0F3

signature.asc (189 Bytes)