Bugs in RT 3.4.2 - Query Builder

Hello All,

I’ve been working with RT 3.4.2 since it was released, and in this period, I identified 2 critical bugs in Query Builder Page.

1- Error “Can’t locate object method “removeChild” via package “root””

I.e.: I add 2 criteria. After I set 2 others criteria to be added and in the same time I select that 2 (that were added) to be removed and then, when I click in delete button appear this error:

Can’t locate object method “removeChild” via package “root” (perhaps you forgot to load “root”?) at /l/disk1/ccdsin/rt3.4.1/share/html/Search/Build.html line 432.
context: …
428: }
429: }
430: elsif ( $ARGS{“DeleteClause”} ) {
431: if (@current_values) {
432: $->getParent()->removeChild($) for @current_values;
433: }
434: else {
435: push( @actions, [ loc(“error: nothing to delete”), -1 ] );
436: }

These steps above are just to ilustrate when this error happens, but I already had the same error in other situations.

2- Change operator AND to OR (or vice versa)

In a query, I’ve this scenario:
DependedOnBy = ‘1128’
OR id = 755
OR Status != ‘stalled’
So, if I try to change the second OR operator (in “OR Status != ‘stalled’”) to AND, this operation is applied also to the first OR operator (in “OR id = 755”) and both are changed to AND. I can bypass this bug (putting some parenthesis using advantage page), although it’s “too hard” for end users (you know that ! :))

Someone already had these errors?! Is there a way to fix?! Does the 3.4.3 version solve these problems?!

Thanks in advance!!

Regards,

Rodolfo de Moraes Reis
Diretoria de Soluções de
Inteligência de Negócios
CPqD Telecom & IT Solutions
Tel.: +55 19 3705-5986
Fax: +55 19 3705-6786
rmreis@cpqd.com.br
www.cpqd.com.br

Rodolfo de Moraes Reis wrote:

I’ve been working with RT 3.4.2 since it was released, and in this period, I identified 2 critical bugs in Query Builder Page.

1- Error “Can’t locate object method “removeChild” via package “root””

I.e.: I add 2 criteria. After I set 2 others criteria to be added and in the same time I select that 2 (that were added) to be removed and then, when I click in delete button appear this error:

Can’t locate object method “removeChild” via package “root” (perhaps you forgot to load “root”?) at /l/disk1/ccdsin/rt3.4.1/share/html/Search/Build.html line 432.
context: …

Good catch. I’ve reproduced the bug with rt 3.4.3rc2 and I’m attaching a
patch. I looks to me like the problem occurs because new criteria are
added before the selected ones are deleted. The patch changes that order
(and reloads cached values that may have been deleted).

On the other hand, since the “Add” button has not been pressed, maybe
there should be no added conditions. In that case the whole block could
be made conditional on the “Add” button (and probably the “Search”
button aswell!) and wouldn’t need to be moved.

2- Change operator AND to OR (or vice versa)

In a query, I’ve this scenario:
DependedOnBy = ‘1128’
OR id = 755
OR Status != ‘stalled’
So, if I try to change the second OR operator (in “OR Status != ‘stalled’”) to AND, this operation is applied also to the first OR operator (in “OR id = 755”) and both are changed to AND. I can bypass this bug (putting some parenthesis using advantage page), although it’s “too hard” for end users (you know that ! :))

This is intentional. The “And/Or” button changes the aggregator for all
expressions on the same level. You can’t even have different aggregators
on the same level (by editing it that way in the advanced page), because
it is stored in the parent node.

Someone already had these errors?! Is there a way to fix?! Does the 3.4.3 version solve these problems?!

Hopefully, it will be fixed in the upcoming 3.4.4 release.

Rolf.

rt.patch (5.44 KB)

Hello All,

I’ve been working with RT 3.4.2 since it was released, and in this period, I identified 2 critical bugs in Query Builder Page.

1- Error “Can’t locate object method “removeChild” via package “root””

I.e.: I add 2 criteria. After I set 2 others criteria to be added and in the same time I select that 2 (that were added) to be removed and then, when I click in delete button appear this error:

Can’t locate object method “removeChild” via package “root” (perhaps you forgot to load “root”?) at /l/disk1/ccdsin/rt3.4.1/share/html/Search/Build.html line 432.
context: …
428: }
429: }
430: elsif ( $ARGS{“DeleteClause”} ) {
431: if (@current_values) {
432: $->getParent()->removeChild($) for @current_values;
433: }
434: else {
435: push( @actions, [ loc(“error: nothing to delete”), -1 ] );
436: }

These steps above are just to ilustrate when this error happens, but I already had the same error in other situations.

2- Change operator AND to OR (or vice versa)

In a query, I’ve this scenario:
DependedOnBy = ‘1128’
OR id = 755
OR Status != ‘stalled’
So, if I try to change the second OR operator (in “OR Status != ‘stalled’”) to AND, this operation is applied also to the first OR operator (in “OR id = 755”) and both are changed to AND. I can bypass this bug (putting some parenthesis using advantage page), although it’s “too hard” for end users (you know that ! :))

Someone already had these errors?! Is there a way to fix?! Does the 3.4.3 version solve these problems?!

Thanks in advance!!

Regards,

Rodolfo de Moraes Reis
Diretoria de Soluções de
Inteligência de Negócios
CPqD Telecom & IT Solutions
Tel.: +55 19 3705-5986
Fax: +55 19 3705-6786
rmreis@cpqd.com.br
www.cpqd.com.br

1- Error “Can’t locate object method “removeChild” via package “root””

A bug that was at least similar to this was fixed in 3.4.3. See if
you can reproduce this in 3.4.3 (or a 3.4.4 preview)?

2- Change operator AND to OR (or vice versa)

It’s a known bug that our Ticket-SQL parser treats AND and OR as
having the same precedence, which ends up leading to the bug that you
cannot have an AND and and OR at the same level (without
parentheses). Fixing this would require a significant rewrite of the
Ticket-SQL parser, which is certainly something we plan to do
eventually.

–dave
Code Monkey, Best Practical Solutions
David Glasser | glasser@bestpractical.com

[Please do not post the same message to rt-bugs, rt-users and
rt-devel. Almost everyone on rt-devel is also on rt-users and by ccing
rt-bugs, every reply to your message generates a new ticket.]

Hello All,

I’ve been working with RT 3.4.2 since it was released, and in this period, I identified 2 critical bugs in Query Builder Page.

1- Error “Can’t locate object method “removeChild” via package “root””

This one, I know has been fixed in RT 3.4.3

2- Change operator AND to OR (or vice versa)

In a query, I’ve this scenario:
DependedOnBy = ‘1128’
OR id = 755
OR Status != ‘stalled’
So, if I try to change the second OR operator (in “OR Status != ‘stalled’”) to AND, this operation is applied also to the first OR operator (in “OR id = 755”) and both are changed to AND. I can bypass this bug (putting some parenthesis using advantage page), although it’s “too hard” for end users (you know that ! :))

You need to indent the second bit of the query. If you upgrade to RT
3.4.3, you’ll see the parenthesis in the regular view.