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:
2Shirt 2021-04-08 23:58:44 -06:00
parent 388c6302cb
commit 8689a68c2f
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -1696,14 +1696,10 @@ def get_working_dir(
working_dir = None
# Set ticket ID
while ticket_id is None:
ticket_id = std.input_text(
prompt='Please enter ticket ID:',
allow_empty_response=False,
)
if ticket_id is None:
now = datetime.datetime.now(tz=TIMEZONE)
ticket_id = now.strftime('%Y-%m-%dT%H%M_%Z')
ticket_id = ticket_id.replace(' ', '_')
if not re.match(r'^\d+', ticket_id):
ticket_id = None
# Use preferred path if possible
if mode == 'Image':