Allow diabling osTicket integration per run
This commit is contained in:
parent
dd13f7bd24
commit
aae7c1d543
1 changed files with 8 additions and 3 deletions
|
|
@ -142,11 +142,16 @@ def get_osticket_number():
|
||||||
"""Get ticket number and confirm with name from osTicket DB."""
|
"""Get ticket number and confirm with name from osTicket DB."""
|
||||||
ticket_number = None
|
ticket_number = None
|
||||||
if not ost_db['Cursor']:
|
if not ost_db['Cursor']:
|
||||||
# No DB access, just set it to 0
|
# No DB access, return None to disable integration
|
||||||
return 0
|
return None
|
||||||
while ticket_number is None:
|
while ticket_number is None:
|
||||||
print_standard(' ')
|
print_standard(' ')
|
||||||
_input = input('Enter ticket number: ')
|
_input = input('Enter ticket number (or leave blank to disable): ')
|
||||||
|
if re.match(r'^\s*$', _input):
|
||||||
|
if ask('Disable osTicket integration for this run?'):
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
continue
|
||||||
if not re.match(r'^([0-9]+)$', _input):
|
if not re.match(r'^([0-9]+)$', _input):
|
||||||
continue
|
continue
|
||||||
_name = osticket_get_ticket_name(_input)
|
_name = osticket_get_ticket_name(_input)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue