Modify

Opened 5 years ago

Closed 5 years ago

#5656 closed defect (fixed)

Unexplained sort order

Reported by: panos@… Owned by: richard
Priority: normal Component: TracTicketChainedFieldsPlugin
Severity: major Keywords:
Cc: Trac Release: 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

Attachments (0)

Change History (4)

comment:1 Changed 5 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: Changed 5 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 5 years ago by richard

  • Status changed from reopened to new

Replying to panos@grekos.com:

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 5 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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from richard. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.