{"action":"created","issue":{"url":"https://api.github.com/repos/rundeck/rundeck/issues/1394","labels_url":"https://api.github.com/repos/rundeck/rundeck/issues/1394/labels{/name}","comments_url":"https://api.github.com/repos/rundeck/rundeck/issues/1394/comments","events_url":"https://api.github.com/repos/rundeck/rundeck/issues/1394/events","html_url":"https://github.com/rundeck/rundeck/issues/1394","id":100715972,"number":1394,"title":"Sort allowed values within a job execution option","user":{"login":"danifr","id":7135482,"avatar_url":"https://avatars.githubusercontent.com/u/7135482?v=3","gravatar_id":"","url":"https://api.github.com/users/danifr","html_url":"https://github.com/danifr","followers_url":"https://api.github.com/users/danifr/followers","following_url":"https://api.github.com/users/danifr/following{/other_user}","gists_url":"https://api.github.com/users/danifr/gists{/gist_id}","starred_url":"https://api.github.com/users/danifr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danifr/subscriptions","organizations_url":"https://api.github.com/users/danifr/orgs","repos_url":"https://api.github.com/users/danifr/repos","events_url":"https://api.github.com/users/danifr/events{/privacy}","received_events_url":"https://api.github.com/users/danifr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-13T08:45:47Z","updated_at":"2015-08-13T15:59:57Z","closed_at":null,"body":"Hi,\r\n\r\nis there a way to sort the list of allowed values for a job option?\r\nI tried adding `preserveOrder=\"true\"` but it doesn't seem to work within a specific option.\r\n```xml\r\n<option preserveOrder=\"true\" name='execution_mode' values='standard,force' enforcedvalues='true' required='true' />\r\n```\r\n\r\nI have some jobs that use different execution modes depending on a flag.\r\n\r\nFor example in this case, I'd like `standard` to be the option by default (first in the list) instead of `force`.\r\n\r\n![selection_004](https://cloud.githubusercontent.com/assets/7135482/9245786/37be1ac0-41a7-11e5-82f6-e04580227685.png)\r\n\r\nAm I missing something? Is there a way to do it??\r\nOtherwise I think it'd be nice to have this feature.\r\n\r\nThanks!\r\nDaniel."},"comment":{"url":"https://api.github.com/repos/rundeck/rundeck/issues/comments/130738792","html_url":"https://github.com/rundeck/rundeck/issues/1394#issuecomment-130738792","issue_url":"https://api.github.com/repos/rundeck/rundeck/issues/1394","id":130738792,"user":{"login":"gschueler","id":55603,"avatar_url":"https://avatars.githubusercontent.com/u/55603?v=3","gravatar_id":"","url":"https://api.github.com/users/gschueler","html_url":"https://github.com/gschueler","followers_url":"https://api.github.com/users/gschueler/followers","following_url":"https://api.github.com/users/gschueler/following{/other_user}","gists_url":"https://api.github.com/users/gschueler/gists{/gist_id}","starred_url":"https://api.github.com/users/gschueler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gschueler/subscriptions","organizations_url":"https://api.github.com/users/gschueler/orgs","repos_url":"https://api.github.com/users/gschueler/repos","events_url":"https://api.github.com/users/gschueler/events{/privacy}","received_events_url":"https://api.github.com/users/gschueler/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T15:59:57Z","updated_at":"2015-08-13T15:59:57Z","body":"I guess you mean preserve the original order of the allowed values? (They are sorted alphabetically automatically).\r\n\r\nCurrently you would have to set the defaultValue for the option to the one you want selected by default, but the list would appear it sorted order."}}