bug Id.

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
whoovian11
Posts: 19
Joined: 10 Jul 2015, 19:25

bug Id.

Post by whoovian11 »

So the bug ids and all the number fields start with 001,022... and so on. Because Mantis compare 12 & 2 and thinks 2 is larger since it takes the first digits and compare them so 2 is larger then 1. Is there any way to change that. Like, I can put 1,2,3.. 12,13,14.. and sort where 2 is less than 12.
atrol
Site Admin
Posts: 8374
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: bug Id.

Post by atrol »

whoovian11 wrote:Because Mantis compare 12 & 2
On which page do you observe this? I cant't reproduce at least on "View Issues" page.
Please use Search before posting and read the Manual
whoovian11
Posts: 19
Joined: 10 Jul 2015, 19:25

Re: bug Id.

Post by whoovian11 »

In the View Issues page..
Create a custom field called No. (1,2,3.....15)
Once you have all 15 bugs.
Try to filter it by no. Descending or ascending.
You will it is not sorting in the numerical order. (at least not for me)
9 comes first for me when filter by descending.
Unless I change it to 01,02,03...09
atrol
Site Admin
Posts: 8374
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: bug Id.

Post by atrol »

Now I got it.
You didn't write that you are trying to sort a custom field.

This is a known feature request
https://www.mantisbt.org/bugs/view.php?id=9120
Use the attached patch at your own risk (I didn't try the patch, it might cause performance issues, it might not run with all supported data bases, ...)
Please use Search before posting and read the Manual
whoovian11
Posts: 19
Joined: 10 Jul 2015, 19:25

Re: bug Id.

Post by whoovian11 »

Did anyone else try this patch? I don't want to use it if it creates more issues...
Post Reply