<Blank> in default preference / search options?

Hi,

is there a way to add a to the
default search options (rt/Prefs/SearchOptions.html) ?

Currently, “NEWLINE” is available, but no “”.

In the normal (advanced) search (not the default one),
it’s possible to add

‘’,

to the Format-Field - works fine. But I don’t know
how to change the default Format.

Kind regards
Danny

Hi,

Default formats can be set in the config.On Mon, May 30, 2011 at 8:32 PM, Daniel Schwager Daniel.Schwager@dtnet.de wrote:

Hi,

is there a way to add a to the
default search options (rt/Prefs/SearchOptions.html) ?

Currently, “NEWLINE” is available, but no “”.

In the normal (advanced) search (not the default one),
it’s possible to add

‘’,

to the Format-Field - works fine. But I don’t know
how to change the default Format.

Kind regards
Danny

Best regards, Ruslan.

Default formats can be set in the config.

I would like to give the user the possibility
to add a to this user default search,
so the new BLANK should appear in the selection
box

Search Preferences / Search options  / Display Columns / "Add Columns:"

I found the available elements setup in
share/html/Search/Elements/BuildFormatString

Is this the right place ?

My DefaultSearchResultFormat looks like:

Set ($DefaultSearchResultFormat, qq{
id/TITLE:#’,
Subject/TITLE:Subject’,
Status,
QueueName,
OwnerName,
Priority,
QuickDelete,
NEWLINE’,
’’,
Requestors’,
CreatedRelative’,
ToldRelative’,
LastUpdatedRelative’,
TimeLeft’});

regards
Danny

Default formats can be set in the config.

I would like to give the user the possibility
to add a to this user default search,
so the new BLANK should appear in the selection
box

   Search Preferences / Search options  / Display Columns / "Add Columns:"

I found the available elements setup in
share/html/Search/Elements/BuildFormatString

Is this the right place ?

Yes.

Also, try NBSP (like NEWLINE). It should work similar or exactly like
what you want.

My DefaultSearchResultFormat looks like:

Set ($DefaultSearchResultFormat, qq{
id/TITLE:#’,
Subject/TITLE:Subject’,
Status,
QueueName,
OwnerName,
Priority,
QuickDelete,
NEWLINE’,
’’,
Requestors’,
CreatedRelative’,
ToldRelative’,
LastUpdatedRelative’,
TimeLeft’});

regards
Danny

Best regards, Ruslan.

I would like to give the user the possibility
to add a to this user default search,
so the new BLANK should appear in the selection
box

   Search Preferences / Search options  / Display Columns / "Add Columns:"

I found the available elements setup in
share/html/Search/Elements/BuildFormatString

Also, try NBSP (like NEWLINE). It should work similar or exactly like
what you want.

Great ! Thx a lot - works fine now:

Add local copy of BuildFormatString

cp -av share/html/Search/Elements/BuildFormatString
local/html/Search/Elements/BuildFormatString

Add NBSP

local/html/Search/Elements/BuildFormatString:
NEWLINE
+ NBSP
); # loc_qw

** Advanced (-:
One additional question - could this be done by using a callback ?
I saw a callback directly after the definition of the fields …
$m->callback( CallbackOnce => 1, CallbackName => ‘SetFieldsOnce’, Fields => @fields );

I tried to create a callback - but it does not work (sorry, I never
used Callbacks). May you can give me a small hint ?

cat /opt/rt3/local/html/Callbacks/MyCallbacks/Prefs/SearchOptions.html/SetFieldsOnce
<%init>
push @fields, “NBSP”;
RT::Logger->debug(“SetFieldsOnce.1: \n”);
</%init>
<%args>
@fields => undef
</%args>

Kind regards
Danny

I would like to give the user the possibility
to add a to this user default search,
so the new BLANK should appear in the selection
box

   Search Preferences / Search options  / Display Columns / "Add Columns:"

I found the available elements setup in
share/html/Search/Elements/BuildFormatString

Also, try NBSP (like NEWLINE). It should work similar or exactly like
what you want.

Great ! Thx a lot - works fine now:

Add local copy of BuildFormatString

cp -av share/html/Search/Elements/BuildFormatString
local/html/Search/Elements/BuildFormatString

Add NBSP

local/html/Search/Elements/BuildFormatString:
NEWLINE
+ NBSP
); # loc_qw

** Advanced (-:
One additional question - could this be done by using a callback ?
I saw a callback directly after the definition of the fields …
$m->callback( CallbackOnce => 1, CallbackName => ‘SetFieldsOnce’, Fields => @fields );

I tried to create a callback - but it does not work (sorry, I never
used Callbacks). May you can give me a small hint ?

cat /opt/rt3/local/html/Callbacks/MyCallbacks/Prefs/SearchOptions.html/SetFieldsOnce

It’s a wrong path. Correct path is:

/opt/rt3/local/html/Callbacks/MyCallbacks/Search/Elements/BuildFormatString/SetFieldsOnce

<%init>
push @fields, “NBSP”;
RT::Logger->debug(“SetFieldsOnce.1: \n”);
</%init>
<%args>
@fields => undef
</%args>

A reference to array is passed, so you should use reference:

<%ARGS>
$fields => []
<%ARGS>
<%INIT>
push @$fields, ‘NBSP’;
</%INIT>

That’s it. Not tested.

Kind regards
Danny

Best regards, Ruslan.

It’s a wrong path. Correct path is:
/opt/rt3/local/html/Callbacks/MyCallbacks/Search/Elements/BuildFormatString/SetFieldsOnce

yes - sorry about this )-: You are right.

A reference to array is passed, so you should use reference:

That’s it. Not tested.

Great, the following works like a charm:
<%INIT>
push @$Fields, ‘NBSP’;
</%INIT>

<%ARGS>
$Fields => []
</%ARGS>

Now, a I can insert a ‘NBSP’ which will be displayed as a “Blank”.

Best regards
Danny