@@ -24,7 +24,7 @@ def main():
24
24
#
25
25
parser = argparse .ArgumentParser (description = 'Customfield Editor Plugin REST API CLI Client.' )
26
26
27
- parser .add_argument ("-a" , "--action" , help = 'Which action to execute.' , choices = ['adminListFields' , 'adminGrantPermission' , 'userListFields' , 'userListOptions' , 'userInsertOptions' ])
27
+ parser .add_argument ("-a" , "--action" , help = 'Which action to execute.' , choices = ['adminListFields' , 'adminGrantPermission' , 'userListFields' , 'userListOptions' , 'userInsertOptions' , 'userSortOptions' ])
28
28
parser .add_argument ("-url" , "--baseUrl" , help = 'baseUrl to JIRA instance e.g. http://server:port/jira/' )
29
29
parser .add_argument ("-user" , "--authUsername" , help = 'username for basic auth.' )
30
30
parser .add_argument ("-pass" , "--authPassword" , help = 'password for basic auth.' )
@@ -37,6 +37,7 @@ def main():
37
37
parser .add_argument ("-ulist" , "--userList" , nargs = '+' , help = 'space separated user names to grant permission' )
38
38
parser .add_argument ("-glist" , "--groupList" , nargs = '+' , help = 'space separated group names to grant permission' )
39
39
parser .add_argument ("-f" , "--payloadFile" , help = 'Payload JSON file.' )
40
+ parser .add_argument ("-o" , "--order" , help = 'The sort order.' , choices = ['ASCENDING' , 'DESCENDING' ])
40
41
41
42
args = parser .parse_args ()
42
43
if not args .action :
@@ -122,6 +123,9 @@ def main():
122
123
except FileNotFoundError as ex :
123
124
printHelper .error ('payloadFile not found' )
124
125
raise ApiHelperException ('payloadFile not found' )
126
+ if args .action == 'userSortOptions' :
127
+ userOperations .sort_options (args .customFieldId , args .contextId , args .order )
128
+
125
129
126
130
127
131
except requests .ConnectionError as ex :
0 commit comments