Menu

Can we add current date time to assignment_date on ticket creation?

2024-05-03
2024-05-03
  • Sylvain Belanger

    Hello,
    We are trying to add the current date and time on new tickets created from an email (with the Ticket from email plugin). Our purpose is to Assign the ticket upon creation but the Stimulus to assign is not working so we'd like to add the current date/time to the assignment_date variable upon creation.
    We tried assignment_date:now() as the default value but it failed with the following error.
    Failed to process email 0 (98) - Email Synchro: Failed to create a ticket for the incoming email 0 (98), reason: exception: Wrong format for date attribute assignmentdate, expecting "Y-m-d H:i:s" and got "now()"

    Any ideas anyone may have?
    Thanks for your help!
    Sylvain

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2024-05-03

    In the "default values" setting of the mail inbox, you really do need to specify values. There are no place holders for date, as far as I'm aware.

    There are a few options to tackle it.
    1. Adjust Combodo's Mail to Ticket extension - con: you'll need to do it for each update.
    2. Switch to my Mail to Ticket extension, create a step which does what you want.
    3. Edit the datamodel -- use the OnInsert() hook to add your logic.
    4. ...

     
  • Sylvain Belanger

    Hi Jeffrey,
    Thanks for your feedback.
    We are already using the Ticket Creation from eMails from Combodo.
    When you say option 2, you mean you have developed your own version of Mail to Ticket extension? Would you have the link to it?
    Regards,
    Sylvain

     
    • Jeffrey Bostoen

      Jeffrey Bostoen - 2024-05-03

      Sure, it's available on GitHub. I tend to keep up with Combodo, and some of my fixes also ended up in Combodo's version.

      https://github.com/jbostoen/itop-jb-mail-to-ticket-automation-v2/

      It's much easier to extend or add some extra logic :)

       
  • Sylvain Belanger

    Thanks! I'll have to wait and check if we wish to update/upgrade. Your version is good for 2.7+ and we are still at 2.6. Plus we need to check if we are going to keep iTop as we now only have 2-3 clients using it :-(
    Take care!
    Sylvain

     
    • Jeffrey Bostoen

      Jeffrey Bostoen - 2024-05-03

      Well, I can definitely recommend iTop :)
      It's been in use at my former employer now for almost 9 years, also have a lot of satisfied customers :)

      But I would highly recommend upgrading if you're that far behind, both in terms of features and security.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.