Hmm I’ve hacked User_Overlay.pm to create the preference when
creating a new user. Not sure if there’s a better way but it seems to
work… Still no default option either.
rt@ceres:~/local/lib/RT$ diff …/…/…/lib/RT/User_Overlay.pm
User_Overlay.pm
327a328,339
# need to hack in out custom display columns preferences
# so users get a nice 1-line results display rather than the
default 2-line
my $attr = RT::Attribute->new ($self->CurrentUser);
my ($attr_id, $attr_msg) = $attr->Create (Name => "Pref-
SearchDisplay", Content =>
“BQcDAAAABBcPQVNDfEFTQ3xBU0N8QVNDAAAABU9yZGVyFwJpZAAAAAdPcmRlckJ5FwI1MAA
AAAtSb3dzUGVyUGFnZRgAAAFqJyAgIDxCPjxBIEhSRUY9Ii9UaWNrZXQvRGlzcGxheS5odG1
sP2lkPV9faWRfXyI
+X19pZF9fPC9hPjwvQj4vVElUTEU6IycsDQonX19RdWV1ZU5hbWVfXycsDQonX19TdGF0dXN
fXycsDQonX19Qcmlvcml0eV9fJywNCic8Qj48QSBIUkVGPSIvVGlja2V0L0Rpc3BsYXkuaHR
tbD9pZD1fX2lkX18iPl9fU3ViamVjdF9fPC9hPjwvQj4vVElUTEU6U3ViamVjdCcsDQonPHN
tYWxsPl9fUmVxdWVzdG9yc19fPC9zbWFsbD4nLA0KJzxzbWFsbD5fX0NyZWF0ZWRSZWxhdGl
2ZV9fPC9zbWFsbD4nLA0KJ19fT3duZXJOYW1lX18nLA0KJzxzbWFsbD5fX0xhc3RVcGRhdGV
kUmVsYXRpdmVfXzwvc21hbGw
+JywNCidfX1Jlc29sdmVkUmVsYXRpdmVfXycAAAAGRm9ybWF0”, ContentType =>
“storable”, ObjectType => “RT::User”, ObjectId => “$id”, Object =>
$self);
unless ($attr_id) {
$RT::Logger->crit("Could not add search display preference
on user creation. Aborted");
$RT::Logger->crit($attr_msg);
$RT::Handle->Rollback();
return ( 0, $self->loc('Could not create user') );
}
Justin Hayes
Support Manager
justin.hayes@orbisuk.comOn 7 Jun 2007, at 09:51, Justin Hayes wrote:
I’m using 3.6.3. You can set up a global default At A Glance layout
in the options, which is great.
However I can’t find any way to set up a global set of ‘Search
Options’ ie the columns returned by searches.
I don’t like the 2-line display and also want to change columns
shown for my users, some of which work in other companies to mine.
I don’t want to have to update the preferences for a user every
time I add one, and if they alter their own there seems to be no
way for them to reset back to a default.
Currently I’m inserting a Pref-SearchDisplay row into the
Attributes table when migrating users from my current system, but
once the migration is done and we’re live I don’t want to have to
be hacking the DB data to reset a user’s options.
Any help appreciated…
Justin
Justin Hayes
Support Manager
justin.hayes@orbisuk.com
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com