Menu

Mail to ticket automation

2018-08-07
2018-08-10
  • Diego Silva

    Diego Silva - 2018-08-07

    I want to customize the /combodo-mail-to-ticket-automation/itop-standard-email-synchro/datamodel.itop-standard-email-synchro.xml file so that the location_id field is written to the ticket.

    I inserted the line, but it does not work.

    if (MetaModel :: IsValidAttCode (get_class ($ oTicket), 'caller_id'))
    {
    $ oTicket-> Set ('caller_id', $ oCaller-> GetKey ());
    $ oTicket-> Set ('location_id', 'SELECT Location AS l JOIN Person AS p ON p.location_id = l.id WHERE p.email =: email');
    }

    Please help me!

     
  • Vincent @ Combodo

    Is that location supposed to be modified later?
    If the location is always the one from the caller id, then an AttributeExternalField would do the job.
    Othewise, your code cannot work at least because SELECT returns an object and Set expect a field
    Check the iTop code for better examples

     

    Last edit: Vincent @ Combodo 2018-08-08
    • Diego Silva

      Diego Silva - 2018-08-10

      What would the code look like to return the caller's location?

       

Log in to post a comment.

MongoDB Logo MongoDB