Upgrade to 4.05 broke search editing

We recently upgraded from 4.02 to 4.05. This has broken our ability to
edit our custom searches.

We can still use the searches, and they produce valid results, we just
cannot edit them and cannot create new searches.

Here’s an example of an existing search:

Queue = ‘Water Close-Out’ AND CF.{Work-State} = ‘Pending Invoices’

It produces the correct results when run. However, when we try to edit
it, it produces the following error when we try to use “advanced” editing:

Wrong query, expecting a OPERATOR in ‘Queue = ‘Water Close-Out’ AND
CF.{Work->State}<–here = ‘Pending Invoices’’

And if we try to create a new search, it refuses to accept the

CF.{Work-State} = ‘Pending Invoices’

From looking at the behavior, the sql editor in 4.05 is having trouble
with the ‘-’ in Work-State. Is this illegal RT-SQL or is the editor in
4.05 broken?

On two occasions I have been asked,—“Pray, Mr. Babbage, if you put into
the machine wrong figures, will the right answers come out?” … I am not
able rightly to apprehend the kind of confusion of ideas that could
provoke such a question.
—Charles Babbage, Inventor of the computer, 1864

Wrong query, expecting a OPERATOR in ‘Queue = ‘Water Close-Out’ AND
CF.{Work->State}<–here = ‘Pending Invoices’’

And if we try to create a new search, it refuses to accept the

CF.{Work-State} = ‘Pending Invoices’

From looking at the behavior, the sql editor in 4.05 is having trouble
with the ‘-’ in Work-State. Is this illegal RT-SQL or is the editor in
4.05 broken?

‘CF.{Work-State}’ = ‘Pending Invoices’

Wrong query, expecting a OPERATOR in ‘Queue = ‘Water Close-Out’ AND
CF.{Work->State}<–here = ‘Pending Invoices’’

And if we try to create a new search, it refuses to accept the

CF.{Work-State} = ‘Pending Invoices’

From looking at the behavior, the sql editor in 4.05 is having trouble
with the ‘-’ in Work-State. Is this illegal RT-SQL or is the editor in
4.05 broken?

‘CF.{Work-State}’ = ‘Pending Invoices’

The single quotes do solve one of the problems but on further testing it
seems to be an editor problem. Not sure if this was in 4.02 as well.

To reproduce:

Tickets → New Search

Select Queue

click on Add These Items

Select a Work-State

Click on Add These Items

The correct search will appear in the Current Search pane:

Queue = ‘Water Close-Out’ AND ‘CF.{Work-State}’ LIKE ‘Pending Drawings
Reconciliation’

However, on clicking on the “Advanced” tab it only shows the Queue =
“xxxx” part.

Now:

Tickets → New Search

Select Queue
Select Work-State

Click on Add These Items

Again, the correct search will appear in the Current Search pane, and
clicking Advanced brings up the whole search.

‘CF.{Work-State}’ LIKE ‘Pending Drawings Reconciliation’ AND Queue =
‘Water Close-Out’

The only thing I can think of is that the order of the search items is
reversed. This is reproducible both in Firefox and Chrome.

Our old searches that “lead” with the Queue = ‘xxx’ and are followed by
the CF{Work-State} are failing to edit using the advanced tab.

On two occasions I have been asked,—“Pray, Mr. Babbage, if you put into
the machine wrong figures, will the right answers come out?” … I am not
able rightly to apprehend the kind of confusion of ideas that could
provoke such a question.
—Charles Babbage, Inventor of the computer, 1864

The single quotes do solve one of the problems but on further testing it
seems to be an editor problem. Not sure if this was in 4.02 as well.

To reproduce:

Tickets → New Search

Select Queue

click on Add These Items

Select a Work-State

Click on Add These Items

The correct search will appear in the Current Search pane:

Queue = ‘Water Close-Out’ AND ‘CF.{Work-State}’ LIKE ‘Pending Drawings
Reconciliation’

However, on clicking on the “Advanced” tab it only shows the Queue =
“xxxx” part.

I can’t reproduce this. Have you cleared your mason cache since
upgrading? What local customizations do you have? (Particularly with
regard to the menus.)

Thomas

However, on clicking on the “Advanced” tab it only shows the Queue =
“xxxx” part.

I can’t reproduce this. Have you cleared your mason cache since
upgrading? What local customizations do you have? (Particularly with
regard to the menus.)

Right in one. I had a html/Elements/Tabs in my local tree from 4.02.
Seems to be fixed now.

On two occasions I have been asked,—“Pray, Mr. Babbage, if you put into
the machine wrong figures, will the right answers come out?” … I am not
able rightly to apprehend the kind of confusion of ideas that could
provoke such a question.
—Charles Babbage, Inventor of the computer, 1864

There’s also a known bug in this area too, which is fixed in the up-coming 4.0.6:

http://issues.bestpractical.com/Ticket/Display.html?id=19567

Tim

The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.