Edgewall Software

Ticket #3080 (new enhancement)

Opened 3 years ago

Last modified 22 months ago

Custom field sorts only as text

Reported by: aroach@… Owned by: jonas
Priority: normal Milestone: 1.0
Component: general Version: 0.9.5
Severity: normal Keywords: tracobject
Cc:

Description

I've created a custom field to enable me to manually order tickets. I've used integers as the value, but it seems to be sorting as text.

For instance, the order shows up like 1, 10, 11, 2, 3, 4, 5, 6, 7, 8, 9

Would like to be able to sort numerical values through custom fields.

Attachments

Change History

Changed 2 years ago by sid

What is the type you have defined for the field in trac.ini? Looking at TracTicketsCustomFields, there is no integer type for a custom field, so the sorting you are seeing is probably the expected behavior.

A hack to get around this is to pad the field with zeros. So 01, 02, 03, ..., 10, 11.

Changed 22 months ago by cboos

  • keywords tracobject added
  • milestone set to 1.0

More custom field types are needed.

Add/Change #3080 (Custom field sorts only as text)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from jonas. Next status will be 'new'
The owner will change from jonas to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.