As in topic i created IMAP connection to one of ours mailboxes. Then I mapped the folder from the mailbox so that itop read emails only from a given folder to create incidents. As it is for incident we did not make some typical id numeration like sugestes in documentation (R-00001 likely). We sugested to use mail subjects itself as they came to us. Following that i created REGEX that would skip typical Gmail prefixes Re: and Fwd:
(?!.*\:)(?! )(.*)
I tested this regex and it's sucesfully worked in typical behaviors on https://regex101.com/
After testing, I put the regex into itop and sent test messages. First, the original message on the basis of which the ticket was to be created, and then the reply to the message that was to update the ticket. My tests show that the regex works as expected, unfortunately iTop itself does not update the ticket, but creates a new one.
Bellow i attach screens from configuration of extension, and debug it sefl where you can see that the regex works completly fine.
To be honest i don't have idea what could be wrong right now. I read documentation several times and nothing helped.
iTop version 3.1.1-1-12561
Extension Version: 3.7.2
Ps. The version in the documentation is 3.7.4 and in the add-ons store it is 3.7.2
The "title pattern" is used to match an e-mail to a ticket. The title pattern is meant to configure the pattern of a ticket reference, e.g. R-123456. If such pattern is found; iTop checks if there is a ticket with this reference (= "ref" field in the user request or other ticket type in iTop).
Combodo's implementation doesn't include a feature to do so on the rest of the mail subject.
You could use my fork of Mail to Ticket Automation and create your own logic. I've written such customizations for some of my customers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So following your description it's possible to do but it requires additional customization in PHP code right ?
Also in documentation "Determines whether a Ticket must be created or updated based either on the custom headers added by iTop in the eMail (in case of replies) or based on a configurable pattern in the title" i kinda misunderstanding following that tittle pattern "...the application can parse the “subject” field to look for a given match. " So the application should find the email by subject pattern. Isn't that a bug ? The app correctly exclude prefixes, it's searching for title pattern as it is, but not finding anything ?
By the "ref" u mean field that is added to eml following by creating ticket by user trough portal ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's not a bug, it's designed to find a pattern in an e-mail subject; and use that match (e.g. "R-123456" to look up a corresponding ticket). By "ref" I mean the ticket reference stored in iTop / in the database; which you can indeed include in email notifications.
And yes, it's possible; some of my customers are using such logic.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you Jerrfey for you share of knowledge. I made it possible by creating script that create new message with REF field in subject of the email. By this i can say that it works like it should now. Thanks a lot again :)
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
As in topic i created IMAP connection to one of ours mailboxes. Then I mapped the folder from the mailbox so that itop read emails only from a given folder to create incidents. As it is for incident we did not make some typical id numeration like sugestes in documentation (R-00001 likely). We sugested to use mail subjects itself as they came to us. Following that i created REGEX that would skip typical Gmail prefixes Re: and Fwd:
I tested this regex and it's sucesfully worked in typical behaviors on https://regex101.com/


After testing, I put the regex into itop and sent test messages. First, the original message on the basis of which the ticket was to be created, and then the reply to the message that was to update the ticket. My tests show that the regex works as expected, unfortunately iTop itself does not update the ticket, but creates a new one.
Bellow i attach screens from configuration of extension, and debug it sefl where you can see that the regex works completly fine.
To be honest i don't have idea what could be wrong right now. I read documentation several times and nothing helped.
iTop version 3.1.1-1-12561
Extension Version: 3.7.2
Ps. The version in the documentation is 3.7.4 and in the add-ons store it is 3.7.2
Last edit: Jendra 2024-07-18
The "title pattern" is used to match an e-mail to a ticket. The title pattern is meant to configure the pattern of a ticket reference, e.g. R-123456. If such pattern is found; iTop checks if there is a ticket with this reference (= "ref" field in the user request or other ticket type in iTop).
Combodo's implementation doesn't include a feature to do so on the rest of the mail subject.
You could use my fork of Mail to Ticket Automation and create your own logic. I've written such customizations for some of my customers.
So following your description it's possible to do but it requires additional customization in PHP code right ?
Also in documentation "Determines whether a Ticket must be created or updated based either on the custom headers added by iTop in the eMail (in case of replies) or based on a configurable pattern in the title" i kinda misunderstanding following that tittle pattern "...the application can parse the “subject” field to look for a given match. " So the application should find the email by subject pattern. Isn't that a bug ? The app correctly exclude prefixes, it's searching for title pattern as it is, but not finding anything ?
By the "ref" u mean field that is added to eml following by creating ticket by user trough portal ?
It's not a bug, it's designed to find a pattern in an e-mail subject; and use that match (e.g. "R-123456" to look up a corresponding ticket). By "ref" I mean the ticket reference stored in iTop / in the database; which you can indeed include in email notifications.
And yes, it's possible; some of my customers are using such logic.
Thank you Jerrfey for you share of knowledge. I made it possible by creating script that create new message with REF field in subject of the email. By this i can say that it works like it should now. Thanks a lot again :)
Our tickets numbering looks : R-240806-026362
Our pattern is /R-([0-9]{6})-([0-9]{6})/