Cleanest way to include "initial" tickets in simplesearch etc

I’ve upgraded an instance from 3.8.8 to 5.0.2.

In 3.8.8 we are used to tickets with “new” status being found by default with a SimpleSearch. Now, I see that with Lifecycles, SimpleSearch only considers “active” tickets, and “active” tickets are defined as those with statuses “open” or “stalled”. Tickets that are “new” being considered “initial”.

Is there a clean and simple way to get SimpleSearch to consider both “initial” and “active” tickets?

I see I could move the “new” status from “initial” to “active” but that seems like it may have far-reaching implications, not least that I’d have to set all of the Lifecycle stuff in my config just for that, when we’re otherwise happy with the default Lifecycle settings.

I have searched around looking for settings that allow changing what statuses SimpleSearch considers by default, but so far I’ve only found information that predates Lifecycles, so is probably incorrect.

I know you can just add status names to the query e.g. foobar new open would search for foobar in both new and open tickets but it’d be nice to not have to remember.

I see that I can set OnlySearchActiveTicketsInSimpleSearch. That would of course make SimpleSearch look in all tickets so that’s not ideal.

Looking at /opt/rt5/lib/RT/Search/Simple.pm it seems like that would be the only option though, as it just checks for that and if that’s not set then it hard codes

$limits->{status} = ["Status = '__Active__'"];

(line 191)

If I did want to consider patching the source, what should I change it to, to add “new”?

Would anyone apart from me want an AlsoSearchNewTicketsInSimpleSearch setting?

Thanks,
Andy

Searching with __Active__ should find tickets in the status “new” as well. If you run a direct search in the query builder on a queue and use Status = '__Active__' you aren’t seeing tickets in “new”?

You’re right, I just tested it and I do see tickets of “new” status when I search for Status = '__Active__'. This is very odd, as I’m sure I tested it before and they didn’t show!

I must be confused, though I don’t understand why those tickets actually do show up given the default configuration as mentioned where state “new” is not included in “active” but in “initial” - or am I confusing two different concepts here, between searching and lifecycles?

The naming of the lifecycle categories and the search grouping are a bit confusing. In the lifecycle, “initial” is provided to define where tickets should be created, but on the search side, we include the initial tickets in the __Active__ grouping since newly created tickets generally are active.

1 Like