Author Topic: Request - Allow alpha sort on custom dropdowns  (Read 2228 times)

Offline cwestp

  • Beta Tester
  • *
  • Posts: 11
    • View Profile
Request - Allow alpha sort on custom dropdowns
« on: June 27, 2011, 02:33:44 pm »
Just started looking at the release candidate today, the custom fields are great!

I'm not sure how difficult or possible this would be to code, but I have a request/suggestion. When creating a custom dropdown field, the options will appear in the order they are entered. That works for a list with a few things, but one of the dropdowns I am creating will eventually have tens and maybe even hundreds of options. If there were an option to sort that dropdown alphabetically, that would be extremely helpful for my support staff.

Offline tfs

  • Quality Assurance
  • *
  • Posts: 974
    • View Profile
Re: Request - Allow alpha sort on custom dropdowns
« Reply #1 on: June 27, 2011, 03:13:23 pm »
This is something that has come up before, and is an important addition I believe.

http://www.simpledesk.net/community/issue.725.0/

I believe it will be something that is looked at in the very next production cycle.  When that is, I have no idea.  :)
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Gruffen

  • Guest
Re: Request - Allow alpha sort on custom dropdowns
« Reply #2 on: June 27, 2011, 05:27:51 pm »
Following on in reference to that issue, if you're already allowing custom sort, alpha sort isn't far away at all, and honestly it probably wouldn't be that hard to hack in alphasorting right now in such fields but it would be a bit hacky and off the top of my head I can't be sure it wouldn't have other consequences too...

Offline tfs

  • Quality Assurance
  • *
  • Posts: 974
    • View Profile
Re: Request - Allow alpha sort on custom dropdowns
« Reply #3 on: June 27, 2011, 05:35:26 pm »
Following on in reference to that issue, if you're already allowing custom sort, alpha sort isn't far away at all, and honestly it probably wouldn't be that hard to hack in alphasorting right now in such fields but it would be a bit hacky and off the top of my head I can't be sure it wouldn't have other consequences too...

Just to clarify for myself, in case there's an ability that I didn't realize is there already, right now you can't change the order of items in a drop down list, radio buttons, or multiple items... correct? 
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Gruffen

  • Guest
Re: Request - Allow alpha sort on custom dropdowns
« Reply #4 on: June 27, 2011, 05:45:21 pm »
You can't change the order of items currently. But you could hack in alpha sort, and when custom sort is implemented as per ticket 725, alpha sort is trivial to add on.

Offline tfs

  • Quality Assurance
  • *
  • Posts: 974
    • View Profile
Re: Request - Allow alpha sort on custom dropdowns
« Reply #5 on: June 27, 2011, 06:29:42 pm »
OK, thanks.  I recall you and Spoogs discussing that, and I was fairly involved in something else at the time.  I do look forward to being able to reorder the list.

By "hack in alpha sort" are you referring to changing something in PhpMyAdmin?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Gruffen

  • Guest
Re: Request - Allow alpha sort on custom dropdowns
« Reply #6 on: June 27, 2011, 06:41:32 pm »
No, but you could theoretically hack in an asort at the right juncture in SD's code to fudge displaying things in the right order (for alphabetic ordering)

Offline tfs

  • Quality Assurance
  • *
  • Posts: 974
    • View Profile
Re: Request - Allow alpha sort on custom dropdowns
« Reply #7 on: June 27, 2011, 06:47:06 pm »
I'll keep that in mind.  I've already got some fields using 01-ABC, 02-XYZ, 03-ETC... not to sort them really, but to use the values that were there in a previous system I was using.  They just so happen to be sorted properly now, but that's because I entered them that way.

It seems like a potentially useful add-on for SimpleDesk to make that simple hack.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Gruffen

  • Guest
Re: Request - Allow alpha sort on custom dropdowns
« Reply #8 on: June 27, 2011, 06:48:50 pm »
It may have other consequences, too, so it's a little more complex. But I can't justify putting it in final, with all the retesting that would be required. If I get time, which seems unlikely, I'll see if I can figure out the hack and document it.

Offline tfs

  • Quality Assurance
  • *
  • Posts: 974
    • View Profile
Re: Request - Allow alpha sort on custom dropdowns
« Reply #9 on: June 27, 2011, 07:08:15 pm »
Yeah, I wouldn't dare ask you to put it in final now, as there hasn't been any bad issues reported for quite a while.  And I already screwed the timeline by getting you to add Silent Reply after we had officially closed development and gone into beta.  I'm starting to think we're not going to see any bugs during the RC1 phase anyway.  Spoogs and I dug pretty deep, and I don't think there's much left in there to find.  :)

The only issue I recall that we didn't find and fix was the very rare log entry of none selected to none selected.  I only produced it two times that I can recall.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Gruffen

  • Guest
Re: Request - Allow alpha sort on custom dropdowns
« Reply #10 on: June 27, 2011, 07:09:38 pm »
Yeah, that's what I'm expecting to be the case - and I will see if I can nail down what causes that bug. It's not really a huge problem; it's not like data's being corrupted, all it is really is a superfluous log entry.

 

anything