Skip to content

Commit

Permalink
resolution sla
Browse files Browse the repository at this point in the history
  • Loading branch information
Parv17k committed Dec 7, 2020
1 parent af50f5a commit 5051d00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,13 @@ def updatestatus(user):
selS=st.selectbox(ent,statuss)
if st.button('update status'):
selS=selS.split(":")[0]
temp = int(selS)
selT=selT.split(":")[0]
sq=f"update tickets set status_id ={selS} where ticket_id ={selT};"
if temp == 6:
sq=f"""update tickets set end_time ='{datetime.datetime.now()}',resolution_sla='{datetime.datetime.now()}',status_id ={selS} where ticket_id ={selT};"""
result= query_db(sq,True)
print(sq)
if result=='done':
st.success('Ticket is updated')
else: st.error('error occured in SQL')
Expand Down

0 comments on commit 5051d00

Please sign in to comment.