pipes would be OR, so you'd get all subjects with "john" OR "mark"
(john||mark) = lots of results
&& is AND so you *should* find subjects with "john" AND "mark" using
parentheses (john&&mark) (which should also include "john & mark" as a side
effect, but not because the ampersand is included).

The Module/AgentTicketSearch.pm assigns the ExtendedSearchCondition to
ConditionInline:
        my @ViewableTicketIDs = $Self->{TicketObjectSearch}->TicketSearch(
#stuff snipped
            ConditionInline     =>
$Self->{Config}->{ExtendedSearchCondition},

The documentation in System/TicketSearch.pm says:
        # content conditions for From,To,Cc,Subject,Body
        # Title,CustomerID and CustomerUserLogin (all optional)
        ConditionInline => 1,

But ConditionInline only appears once in System/TicketSearch.pm:
            if ( $Param{ConditionInline} && $Key eq 'Title' ) {

So, either ConditionInline/ExtendedSearchCondition is irrelevant to the
search or not applied per documentation.

This, in turn, is called by the DB QueryCondition (System/DB.pm) method:
documentation:
    my $SQL = $DBObject->QueryCondition(
        Key          => 'some_col',
        Value        => '(ABC+DEF)',
        SearchPrefix => '',
        SearchSuffix => '*'
        Extended     => 1, # use also " " as "&&", e.g. "bob smith" ->
"bob&&smith"
    );
applied code:
    # 1. replace " " by "&&"
    if ( $Param{Extended} ) {
        $Param{Value} =~ s/\s/&&/g;
    }


Which seems to be a bit different concept than as originally explained, as
this treats a space as "AND".

Long story short: I'd try (john*mark) or (john * mark)



On Wed, Nov 28, 2012 at 4:09 AM, Neil Simpson <[email protected]> wrote:

> Steven is correct as to what im after. I tried the option from Gerald but
> with limited success, using pipes i get far too many results and using &'s
> i get no results.
>
> I don't know if this has been fixed in later versions but will open bug
> report for now, if it has already been addressed, apologies for duplicating.
>
> Neil
>
>
> On Tue, Nov 27, 2012 at 5:18 PM, Steven Carr <[email protected]> wrote:
>
>> That's not what Neil is looking/asking for, what Neil is wanting to
>> know is how to get the search field to interpret & literally.
>>
>> I'm not sure if this is possible.
>>
>> Steve
>>
>>
>> On 27 November 2012 15:57, Gerald Young <[email protected]> wrote:
>> > Ticket::Frontend::AgentTicketSearch###ExtendedSearchCondition
>> >
>> > Allows extended search conditions in ticket search of the agent
>> interface.
>> > With this feature you can search w. g. with this kind of conditions like
>> > "(key1&&key2)" or "(key1||key2)"
>> >
>> > .
>> >
>> >
>> >
>> > On Tue, Nov 27, 2012 at 9:54 AM, Neil Simpson <[email protected]> wrote:
>> >>
>> >> Hi,
>> >>
>> >> We use otrs 3.1.6. if i have a ticket with subject "john & mark" and
>> >> search for it using "subject" or "text" or "full text" search fields i
>> do
>> >> not find it using it's full subject line.
>> >>
>> >> if i only search on "john" i find it. I assume therefore it's the "&"
>> >> symbol and likely other special characters that the search doesn't
>> like. i
>> >> tried to escape the character with \ but that did not work.
>> >>
>> >> is this a known issue, i dont find a bug report for it.
>> >>
>> >> thanks
>> >>
>> >> Neil
>> >>
>> >> ---------------------------------------------------------------------
>> >> OTRS mailing list: otrs - Webpage: http://otrs.org/
>> >> Archive: http://lists.otrs.org/pipermail/otrs
>> >> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > OTRS mailing list: otrs - Webpage: http://otrs.org/
>> > Archive: http://lists.otrs.org/pipermail/otrs
>> > To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>> ---------------------------------------------------------------------
>> OTRS mailing list: otrs - Webpage: http://otrs.org/
>> Archive: http://lists.otrs.org/pipermail/otrs
>> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>>
>
>
> ---------------------------------------------------------------------
> OTRS mailing list: otrs - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/otrs
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Reply via email to