+ Add Question

How can labels be sorted alphapetically when listed in universally the Outlook addon, the browser, iOS app and the Androis App?


In the Android App, they are sorted alphabetically - this is perfect.

They are sorted alphabetically in the iOS app, however, with labels that have tasks associated listed first, and then labels which don't have tasks associated with them afterwards. This is workable, but not as good as in Android.

In Outlook, in IE on a windows PC and in the Windows Desktop app, they are sorted randomly. This is problematic.

There ought to be a way to select in Settings how the user wants them sorted, across all platforms.

Please advise. Thank you.

All responses

Andy Puest
Replied on May 31, 2013 - 14:47 UTC

Hi Howard, as far as I know the labels are not sorted randomly, but descending by the numbers of tasks associated with them. As far as I understand, this sort order cannot be changed at this point.

Howard Friedensohn
Replied on Aug 08, 2013 - 14:17 UTC

It would be very helpful to list labels alphabetically when selecting labels to add to a task in the Outlook, iPad and Android apps. I've set up my labels as follows:
@*responsibility/contact name
In this fashion, I can attribute a task to more than one project if it affects more than one project by using the ~project labels. I can also easily get at a list of all tasks that I might want to review with a colleague filtering by @*responsibility/contact name. Or I can filter by @#action as in @#calls, @#errands... When assigning task to the labels, it would be great if they appeared in the label list alphabetically so that all @#, @* and @~ are shown together respectively, in all UI's (Outlook, Browser, iPad, Android, etc.)

John Voloudakis  premium
Replied on Nov 20, 2013 - 18:06 UTC

+1 for Howard’s suggestion. I’m trying a similar configuration. Would like to be able to have ‘groups’ of labels such as expected duration (@D-minutes, @D-hours, @D-day), requestor (e.g. @R-Dave, @R-Jess), etc.

Anton Tokar  premium
Replied on Dec 28, 2013 - 10:29 UTC

I've created a small bookmarklet which works for me (current Chrome). To use it, go to the "Show all labels" screen and then click on the bookmarklet.

It uses jQuery and the sorting elements plugin (http://james.padolsey.com/javascript/sorting-elements-with-jquery/). Because of some wierd jQuery behavior on first load, the first sorting will take 1 second. Afterwards (if you don't reload the page, but just navigate it), it should happen immediately.

So here it goes. Use at your own risk.

javascript:(function(){function sortLabels(){var $j=jQuery.noConflict();if(!$j.isFunction("jQuery.fn.sortElements")){jQuery.fn.sortElements=(function(){var sort=[].sort;return function(comparator,getSortable){getSortable=getSortable||function(){return this;};var placements=this.map(function(){var sortElement=getSortable.call(this),parentNode=sortElement.parentNode,nextSibling=parentNode.insertBefore(document.createTextNode(''),sortElement.nextSibling);return function(){if(parentNode===this){throw new Error("You can't sort elements if any one is a descendant of another.");}parentNode.insertBefore(this,nextSibling);parentNode.removeChild(nextSibling);};});return sort.call(this,comparator).each(function(i){placements[i].call(getSortable.call(this));});};})();}$j("li.task_item").sortElements(function(a,b){return $j(".content.text",$j(a)).text()>$j(".content.text",$j(b)).text()?1:-1;});}if(!window.jQuery){var head=document.getElementsByTagName('head')[0];var script=document.createElement('script');script.type='text/javascript';script.src='https://code.jquery.com/jquery.js';head.appendChild(script);window.setTimeout(sortLabels,1000);}else{sortLabels();}})();