Skip to content

Commit ac2d7cf

Browse files
caberoscaberos
authored andcommitted
add a limit and sortby on data time on ticket list command on result delay
1 parent 0656879 commit ac2d7cf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

SoftLayer/CLI/ticket/list.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# :license: MIT, see LICENSE for more details.
33

44
import click
5+
from SoftLayer import utils
56

67
import SoftLayer
78
from SoftLayer.CLI import environment
@@ -30,7 +31,7 @@ def cli(env, is_open):
3031
ticket['serviceProviderResourceId'],
3132
user,
3233
click.wrap_text(ticket['title']),
33-
ticket['lastEditDate'],
34+
utils.clean_time(ticket.get('lastEditDate'), out_format="%Y-%m-%d"),
3435
ticket['status']['name'],
3536
ticket.get('updateCount', 0),
3637
ticket.get('priority', 0)

SoftLayer/managers/ticket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def list_tickets(self, open_status=True, closed_status=True):
3939
call = 'getClosedTickets'
4040
else:
4141
raise ValueError("open_status and closed_status cannot both be False")
42-
return self.client.call('Account', call, mask=mask, iter=True)
42+
return self.client.call('Account', call, mask=mask, limit=100)
4343

4444
def list_subjects(self):
4545
"""List all ticket subjects."""

0 commit comments

Comments
 (0)