def updateTicket_2(ticket_id, status, solution):
    config.logger.exception('In update ticket part')
    #     df = create_db.get_data()
    query = "select * from Tickets where `Incident ID` ='" + ticket_id + "';"
    df = create_db.fetchquery(query)
    #     print(df)
    df.loc[df["Incident ID"] == ticket_id, 'Status'] = status
    df.loc[df["Incident ID"] == ticket_id, 'Solution'] = solution

    ret = create_db.update(df)
    config.logger.exception('data updated in db')

    updateTicket(df.loc[df.Status == "Resolved"])
    config.logger.exception('ticket updated in itsm')
예제 #2
0
def Ticketassign_2(ticket_id):
    config.logger.exception('In update ticket part')

    query = "select * from tickets where `Incident ID` ='" + ticket_id + "';"
    df = create_db.fetchquery(query)
    #     df = pd.read_csv("test.csv")
    print(df)
    df.loc[df["Incident ID"] == ticket_id, 'Status'] = "Fail"
    df.loc[df["Incident ID"] == ticket_id, 'Solution'] = "Assigned to expert."

    ret = create_db.update(df)
    config.logger.exception('data updated in db')

    Ticketassign(df.loc[df.Status == "Fail"])
    config.logger.exception('ticket updated in itsm')
예제 #3
0
def updatetickets(ticket_id, status, solution):
    # config.logger.exception("In update ticket part")
    query = "select * from tickets where `Incident ID` = '" + ticket_id + "';"
    df = create_db.fetchquery(query)
    df.loc[df["Incident ID"] == ticket_id, 'Status'] = status
    df.loc[df["Incident ID"] == ticket_id, 'Solution'] = solution
    print(df)
    ret = create_db.update(df)
    # config.logger.exception('data updated in db')

    ticket_updation(df.loc[df.Status == "Resolved"])
    # config.logger.exception('ticket updated in itsm')


# s = ticket_updation(df)
예제 #4
0
def assigntickets(ticket_id):
    # config.logger.exception("In update ticket part")
    query = "select * from tickets where `Incident ID` = '" + str(
        ticket_id) + "';"
    df = create_db.fetchquery(query)
    df.loc[df["Incident ID"] == str(ticket_id), 'Status'] = "Fail"
    df.loc[df["Incident ID"] == str(ticket_id),
           'Solution'] = "assigned to different technician"
    print(df)
    ret = create_db.update(df)
    # config.logger.exception('data updated in db')

    assignto(df.loc[df.Status == "Fail"])
    # config.logger.exception('ticket updated in itsm')


# assigntickets(10)