Opened 4 years ago

Closed 4 years ago

Unexplained sort order

Reported by: Owned by: panos@… richard normal TracTicketChainedFieldsPlugin major 0.11

Description

Hello,
We implemented this plugin and started testing it. This is the code we used:

{

"tcf_category": {

"Network": {

"tcf_type":{

"Data": {},
"Voice": {},
"IDS": {},
"Video": {}

}

},
"General": {

"tcf_type":{

"": {}

}

},
"Security": {

"tcf_type":{

"Virus": {},
"DOS": {},
"Phishing": {}

}

}

}

}

The sort order of field tcf_category exhibits strange behavior. It is not clear how you sort the values. We would expect that an alphabetic sorting would occur as is the case on subfield tcf_type.

Could you please take a look?

Regards,
Panos

comment:1 Changed 4 years ago by richard

• Resolution set to fixed
• Status changed from new to closed

Fixed in [6370], sort field option case insensitive.

comment:2 follow-up: ↓ 3 Changed 4 years ago by panos@…

• Resolution fixed deleted
• Status changed from closed to reopened

Hello,
Thank you for your quick response. Unfortunately it did not solve the issue...

To simplify we created the following chain rule:

{

"tcf_category": {

"1": {},
"2": {},
"3": {},
"4": {},
"5": {},
"6": {},
"7": {},
"8": {},
"9": {},
"10": {},
"11": {}

}

}

Then we press on new ticket and we get the following order on the drop down list for field "tcf_categories":

11
10
1
3
2
5
4
7
6
9
8

We looked at the source but were unable to find a solution. Could you please take another look?

Thank you,
Panos

comment:3 in reply to: ↑ 2 Changed 4 years ago by richard

• Status changed from reopened to new

Hello,
Thank you for your quick response. Unfortunately it did not solve the issue...

To simplify we created the following chain rule:

{

"tcf_category": {

"1": {},
"2": {},
"3": {},
"4": {},
"5": {},
"6": {},
"7": {},
"8": {},
"9": {},
"10": {},
"11": {}

}

}

Then we press on new ticket and we get the following order on the drop down list for field "tcf_categories":

11
10
1
3
2
5
4
7
6
9
8

We looked at the source but were unable to find a solution. Could you please take another look?

Maybe you need CCR(clear cache and refresh). And the result above will be expected as:

1
10
11
2
3
4
5
6
7
8
9


Since all options are treated as string.

Thank you,
Panos

comment:4 Changed 4 years ago by panos@…

• Resolution set to fixed
• Status changed from new to closed

Hello,
It appeared that Trac was using the .egg file in the python "dist-packages" folder instead of that in the Trac plugins folder:
/usr/local/lib/python2.6/dist-packages/TracTicketChainedFields-0.1-py2.6.egg

The .egg file in the "dist-packages" folder was not refreshed by the recompile for some reason and it contained the previous version of the code. It took a while for us to troubleshoot and understand this issue. Everything seems ok now.

Thank you for your help and prompt response!
Panos

Modify Ticket

Change Properties