[rt-users] Alternative GUIs for RT?
Vegard Vesterheim
vegard.vesterheim at uninett.no
Tue Jun 7 03:29:04 EDT 2016
On Wed, 1 Jun 2016 15:17:15 +0200 Christian Loos <cloos at netcologne.de> wrote:
> Am 01.06.2016 um 11:53 schrieb Vegard Vesterheim:
>> I tried to register a new User Custom Field, naming the Field
>> 'PreferEditDisplay', and allowing two values for the field: 'Edit' or
>> 'Display'. I have registered the value 'Edit' for a specific user for
>> this Custom Field, but I am not able to extract the value
>> programmatically. I expected the following code to work, but I get no
>> values back.
>>
>> my $UserObj = RT::User->new( $session{'CurrentUser'} );
>> my $cf_values = $UserObj->CustomFieldValues('PreferEditDisplay');
>
>
> You can easily add custom user preferences.
> Have a look here:
> https://github.com/tbrumm/RT-Extension-SideBySideView/blob/master/lib/RT/Extension/SideBySideView.pm#L9-L17
Ah, this is much better than using a User Custom Field, since this is a
custom user preference after all. Thank you.
> This new preference is used here:
> https://github.com/tbrumm/RT-Extension-SideBySideView/blob/master/html/Callbacks/SideBySideView/Ticket/Display.html/BeforeShowSummary#L15
I ended up using the EachRow callback from CollectionList. I sneakingly
alter the link for the Ticket landing page (from Display.html to our
local Edit.html) according to the user preference.
The callback hooks in RT is *very* useful for doing these sorts of
hacks;-)
--
- Vegard V -
More information about the rt-users
mailing list