General Catalog / Class: Sorting of Numbers

Moderator: crythias

Post Reply
Rasputin80
Znuny newbie
Posts: 16
Joined: 29 Feb 2016, 20:04
Znuny Version: 4.0.18
Real Name: Oliver

General Catalog / Class: Sorting of Numbers

Post by Rasputin80 »

Hello,

Anybody got an Idea how i get those number correct sorted, see screenshot. The order is exactly the same in the Dropdown in the Config Items.

Image


Many thanks
Oliver
DaSto
Znuny newbie
Posts: 28
Joined: 22 May 2015, 08:32
Znuny Version: 5.0.25
Real Name: David Stockinger

Re: General Catalog / Class: Sorting of Numbers

Post by DaSto »

Hy!

I guess it's not an answer for you because i don't use ITSM but i can see that this list is kind of "perfectly" sorted.
I guess in the Database these values are type of "strings/varchar/text". Text fields are sorted like that (1,10,2,3,4,...). If the value would be of a numeric/int/long/etc. datatype it would be sorted like you expect (1,2,3,4,10,...).

I don't know if this list is generated by OTRS or by yourself but i think the problem is (like i said) the datatype of the values.


Cheers
Rasputin80
Znuny newbie
Posts: 16
Joined: 29 Feb 2016, 20:04
Znuny Version: 4.0.18
Real Name: Oliver

Re: General Catalog / Class: Sorting of Numbers

Post by Rasputin80 »

If i understand you, its not that easy to get that soring right?
Im not sure if i go trying to change the fields in the DB direct :)
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: General Catalog / Class: Sorting of Numbers

Post by crythias »

or leading zeros in text field
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Rasputin80
Znuny newbie
Posts: 16
Joined: 29 Feb 2016, 20:04
Znuny Version: 4.0.18
Real Name: Oliver

Re: General Catalog / Class: Sorting of Numbers

Post by Rasputin80 »

crythias wrote:or leading zeros in text field
Of course, but that dosent look that nice....
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: General Catalog / Class: Sorting of Numbers

Post by crythias »

input fields assume text, so WYSIWYG
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Post Reply