Skip asking for a ticket ID twice
For this to happen the tech has to disable osTicket integration first so in that case just set ticket to the date. No need asking again. Addresses issue #132 (I think, couldn't reproduce)
This commit is contained in:
parent
388c6302cb
commit
8689a68c2f
1 changed files with 4 additions and 8 deletions
|
|
@ -1696,14 +1696,10 @@ def get_working_dir(
|
||||||
working_dir = None
|
working_dir = None
|
||||||
|
|
||||||
# Set ticket ID
|
# Set ticket ID
|
||||||
while ticket_id is None:
|
if ticket_id is None:
|
||||||
ticket_id = std.input_text(
|
now = datetime.datetime.now(tz=TIMEZONE)
|
||||||
prompt='Please enter ticket ID:',
|
ticket_id = now.strftime('%Y-%m-%dT%H%M_%Z')
|
||||||
allow_empty_response=False,
|
ticket_id = ticket_id.replace(' ', '_')
|
||||||
)
|
|
||||||
ticket_id = ticket_id.replace(' ', '_')
|
|
||||||
if not re.match(r'^\d+', ticket_id):
|
|
||||||
ticket_id = None
|
|
||||||
|
|
||||||
# Use preferred path if possible
|
# Use preferred path if possible
|
||||||
if mode == 'Image':
|
if mode == 'Image':
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue