I dont know if it is able but what i want is an automatically ticket from monday to friday at 15:30 in one of my queues.
I know that i have to select the email address of my servicedesk and send there the notification, in this way it will open a ticket, but what i dont figure out is the rest of the field and tables that i have to select, if i have to select any.
my code doest give me errors, but it doesnt send any email at all.

->Select SQL

select  1, 'servicedesk@mycompany.br' as email_servicedesk

from HD_TICKET

where curtime() = '15:30:00'
and DAYNAME(NOW()) NOT IN ('Saturday','Sunday')  /* not the weekend */

->checkbox sending email
Assunto:
Coluna contendo endereços de e-mail: email_servicedesk
Mensagem:
3 Comments   [ + ] Show Comments

Comments

  • if i change the code the way im gonna show and i put my email, it sends me the email perfectly. if i put the email for my servicedesk, 'the last register of execution' says that the email has been sent, but it is nowhere.

    select 1, 'servicedesk@mycompany.br' as email_servicedesk

    from HD_QUEUE

    where DATE(NOW())= '2014-12-17'
    AND HD_QUEUE.ID = 7
    and DAYNAME(NOW()) NOT IN ('Saturday','Sunday') /* not the weekend */

    any ideas????
    Thank you!!
    • Why don't you use the SQL update area to create a ticket?

      You can use the INSERT INTO command. Be careful though since doing this wrong can damage your database.
  • thank you for the answer but insert into in which way???i dont see the point, i dont see how im gonna create a ticket.
    • you can create a new ticket by inserting a new row in the HD_TICKET table with the proper parameters. That's how all tickets get created, you're just skipping the application layer and going straight to the database.

      for example:
      insert into HD_TICKET (TITLE, HD_QUEUE_ID)
      values('New Ticket', 1)

      would make a ticket in queue 1 with just a title of New Ticket. It would not have a create date or anything. You can add that in to your insert statement and create a ticket this way.
  • woww thank you very much!!! i see what you say already!! thats perfect! im gonna test it now
Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity