Difference between revisions of "ChangeDefaultRTAtAGlance"

From Request Tracker Wiki
Jump to navigation Jump to search
(Undo revision 7369 by 203.190.132.90 (talk))
Line 5: Line 5:
== Adding Custom Fields to "RT At A Glance" ==
== Adding Custom Fields to "RT At A Glance" ==


Here is how to add a custom fi
Here is how to add a custom field or otherwise customize the display of tickets you own and unowned tickets and have that affect all users as the default.


1. Customize the search
* Login as root.
* Click on the "Edit" link out to the right of "X highest priority tickets I own"
* You'll see a line that says: "You can also edit the predefined search itself: Search - My Tickets". Click on the "Search - My Tickets" link.
* You probably want to keep the default settings around if you are like me, so look to the right under "Saved Searches" and click the "Copy" button.
* A Privacy drop down will now appear above the description. Select "RT Systems's saved searches" and click the Save button.
* Now customize the search to your satisfaction and click Save again.
* Now customize the search to your satisfaction and click Save again.


Line 52: Line 59:


  <nowiki>#####################################################################
  <nowiki>#####################################################################
  WARNING: IF YOU DON'T KNOW YOUR WAY AROUND A DATABASE, STOP HERE.
  WARNING: IF YOU DON'T KNOW YOUR WAY AROUND A DATABASE, STOP HERE.
  It may sound harsh, but you can bugger your RT database with a
  It may sound harsh, but you can bugger your RT database with a
  slightly wrong command and, unless you've backed it up, you're
  slightly wrong command and, unless you've backed it up, you're
  hosed, hosed, hosed.
  hosed, hosed, hosed.
  #####################################################################
  #####################################################################
 
 
  The way I changed the default user setup was:
  The way I changed the default user setup was:
 
 
  1. Run this query and copy/paste the results into a text file.
  1. Run this query and copy/paste the results into a text file.
    This is your emergency backup just in case:
      This is your emergency backup just in case:
 
 
    select * from attributes where name='HomepageSettings';
      select * from attributes where name='HomepageSettings';
 
 
  2. Create a test user and use /Prefs/MyRT.html to set that
  2. Create a test user and use /Prefs/MyRT.html to set that
    user's prefs to be your new default. NOTE: You shouldn't
      user's prefs to be your new default. NOTE: You shouldn't
    use any user-owned saved searches or they'll break for
      use any user-owned saved searches or they'll break for
    everyone else.
      everyone else.
 
 
  3. Get the test user's user ID. You can get this from the
  3. Get the test user's user ID. You can get this from the
    web interface by choosing Configuration-&gt;Users-&gt;testuser
      web interface by choosing Configuration-&gt;Users-&gt;testuser
    and noting the "id=..." part of the URL or you can query
      and noting the "id=..." part of the URL or you can query
    it from the database:
      it from the database:
 
 
    select id,name,realname from users where name='TEST-USER-NAME';
      select id,name,realname from users where name='TEST-USER-NAME';
 
 
  4. Get the content field of testuser's preferences:
  4. Get the content field of testuser's preferences:
 
 
    select content from attributes where
      select content from attributes where
      name='Pref-HomepageSettings' and objectid=TEST-USER-ID;
        name='Pref-HomepageSettings' and objectid=TEST-USER-ID;
 
 
    The content is just a serialized hash ref; if you want to
      The content is just a serialized hash ref; if you want to
    see what's inside it, look at the code in _SerializeContent
      see what's inside it, look at the code in _SerializeContent
    and/or _DeserializeContent in /lib/RT/Attribute_Overlay.pm
      and/or _DeserializeContent in /lib/RT/Attribute_Overlay.pm
    and adapt accordingly.
      and adapt accordingly.
 
 
  5. Copy-and-paste the content you got above into this query.
  5. Copy-and-paste the content you got above into this query.
    It's okay that the content is multi-line; just be sure to
      It's okay that the content is multi-line; just be sure to
    paste it immediately after a single-quote and to type a single
      paste it immediately after a single-quote and to type a single
    quote immediately after the content (no spaces before or after).
      quote immediately after the content (no spaces before or after).
 
 
    NOTE: If you goof this you'll potentially hose the default
      NOTE: If you goof this you'll potentially hose the default
    view of RT for your users and you'll need the backup from
      view of RT for your users and you'll need the backup from
    step 1 to recover. Be very, very careful.
      step 1 to recover. Be very, very careful.
 
 
    update attributes set content='COPY-AND-PASTE-GOES-HERE' where
      update attributes set content='COPY-AND-PASTE-GOES-HERE' where
      name='HomepageSettings';
        name='HomepageSettings';
 
 
  ...and that should do it.
  ...and that should do it.
  </nowiki>
  </nowiki>

Revision as of 12:18, 3 February 2016

RT 3.6.4

With 3.6.4 you can easily modify the "RT At A Glance" summary as follows.

Adding Custom Fields to "RT At A Glance"

Here is how to add a custom field or otherwise customize the display of tickets you own and unowned tickets and have that affect all users as the default.

1. Customize the search

  • Login as root.
  • Click on the "Edit" link out to the right of "X highest priority tickets I own"
  • You'll see a line that says: "You can also edit the predefined search itself: Search - My Tickets". Click on the "Search - My Tickets" link.
  • You probably want to keep the default settings around if you are like me, so look to the right under "Saved Searches" and click the "Copy" button.
  • A Privacy drop down will now appear above the description. Select "RT Systems's saved searches" and click the Save button.
  • Now customize the search to your satisfaction and click Save again.

2. Replace the search

  • Stay logged in as root.
  • Click on Configuration
  • Click on Global
  • Click on "RT at a glance"
  • Place the "[_1] highest priority tickets I own copy" search that you just made where you want it.

3. View the results

  • Stay logged in as root.
  • Click on "Home"
  • If you don't see your search you may have customized your display and be overriding the default.
    • Click on "Edit" out to the right of the "RT at a glance" header (/Prefs/MyRT.html).
    • Click "Reset to default"
  • For normal users to see this change you'll need to give PrivilegedUsers the ShowSavedSearches priv in Config > Global > Groups.

Problems

You can put take links back in using the Display Columns section when editing the search itself Add a column of type ID with link 'Take' Best way seems to be using the Advanced section of query builder:

'<a>__id__</a>/TITLE:#',
'<a>__Subject__</a>/TITLE:Subject',
'__QueueName__',
'__ExtendedStatus__',
'__CreatedRelative__',
'<a href="/Ticket/Display.html?Action=Take&id=__id__">Take</a>/TITLE: '

This has a column at the end with a blank header with a 'Take' link for each ticket

Might not be quite as good as the original take link but it works.... RT363 JustinHayes 20070301

RT 3.5.x

NOTE: This applies only to RT 3.5.x and beyond; RT 3.4.x and prior users should search the mailing list archives, wherein will be described how to reorganize the index.html page to suit.

NOTE: JesseVincent says, "This is really dangerous if you mess it up, but I feel guilty that there isn't a supported way to do this."

From a Feb 2006 email describing how to change the default RT At A Glance view in RT 3.5.x where this is a user-configurable preference.

#####################################################################
   WARNING: IF YOU DON'T KNOW YOUR WAY AROUND A DATABASE, STOP HERE.
   It may sound harsh, but you can bugger your RT database with a
   slightly wrong command and, unless you've backed it up, you're
   hosed, hosed, hosed.
   #####################################################################
   
   The way I changed the default user setup was:
   
   1. Run this query and copy/paste the results into a text file.
      This is your emergency backup just in case:
   
      select * from attributes where name='HomepageSettings';
   
   2. Create a test user and use /Prefs/MyRT.html to set that
      user's prefs to be your new default. NOTE: You shouldn't
      use any user-owned saved searches or they'll break for
      everyone else.
   
   3. Get the test user's user ID. You can get this from the
      web interface by choosing Configuration->Users->testuser
      and noting the "id=..." part of the URL or you can query
      it from the database:
   
      select id,name,realname from users where name='TEST-USER-NAME';
   
   4. Get the content field of testuser's preferences:
   
      select content from attributes where
        name='Pref-HomepageSettings' and objectid=TEST-USER-ID;
   
      The content is just a serialized hash ref; if you want to
      see what's inside it, look at the code in _SerializeContent
      and/or _DeserializeContent in /lib/RT/Attribute_Overlay.pm
      and adapt accordingly.
   
   5. Copy-and-paste the content you got above into this query.
      It's okay that the content is multi-line; just be sure to
      paste it immediately after a single-quote and to type a single
      quote immediately after the content (no spaces before or after).
   
      NOTE: If you goof this you'll potentially hose the default
      view of RT for your users and you'll need the backup from
      step 1 to recover. Be very, very careful.
   
      update attributes set content='COPY-AND-PASTE-GOES-HERE' where
        name='HomepageSettings';
   
   ...and that should do it.