OTRS ---> Mantis ... Clean email

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Contributor, Developer

OTRS ---> Mantis ... Clean email

Postby i200 » Nov 13, 2017 6:42 am

Hi,

Recently i installed MantisBT and configured EmailReporting plugin and works wonderfull ... Thanks to all the developers of the plugin, uve done a really nice job!

I use it to create tickets in Mantis that come via email from OTRS. When a ticket is created the part that i need is between two identical tags:

<snip>text describing error<snip>

Ive read the documentation and seems i cant get rid of the rest of the email parts from the plugin.

If someone could point me to where the emails are processed maybe i could change it to seacrh for "<snip>" and just register as a ticket the text from there to the next "<snip>". Any advice or tip would be appreciated.

Allso thought that maybe this could be easier achieved from the HTML parser ... Sorry if its sounds crazy, but i have no previous experience with Mantis.

Thanks in advance for any help.
i200
 
Posts: 2
Joined: Nov 13, 2017 5:48 am

Re: OTRS ---> Mantis ... Clean email

Postby SL-Gundam » Nov 13, 2017 12:28 pm

Somewhere in the far future there should be a rule system with which this might be possible... but for the moment you will have to modify EmailReporting yourself

Assuming you only want this for new issues, not notes. There are 2 options
  1. Create a plugin that hooks into the EVENT_ERP_REPORT_BUG_DATA event
  2. Add a new function after this line $t_description = $p_email[ 'X-Mantis-Body' ];. That function should then modify $t_description and return the new value

I would prefer the first solution since it will allow easy updating of EmailReporting without losing your own modifications. Option 2 might be easier to implement though
SL-Gundam
 
Posts: 464
Joined: Jul 06, 2011 9:17 am

Re: OTRS ---> Mantis ... Clean email

Postby i200 » Nov 14, 2017 6:38 am

Thanks for the quick reply!

... /mantisbt/plugins/EmailReporting/core/mail_api.php ...

Just had a quick look and 2nd option seems much easier to achieve, i dont know the specifics of a Mantis Plugin development.

Thanks again :-)
i200
 
Posts: 2
Joined: Nov 13, 2017 5:48 am

Re: OTRS ---> Mantis ... Clean email

Postby SL-Gundam » Nov 14, 2017 12:37 pm

Plugin development requires a little bit more work and option 2 is easier to implement but in the long run option 1 would pay back its investment in my opinion.

If you would consider it i would suggest the following course of action.
  1. Make a copy of the "Gravatar" plugin folder
  2. rename the new folder and Gravatar.php (make sure they have the same name except for the file extension)
  3. Modify the [new name].php file as needed. It already includes EVENT hooks so that you'll need to modify very little
SL-Gundam
 
Posts: 464
Joined: Jul 06, 2011 9:17 am


Return to EmailReporting

Who is online

Users browsing this forum: Google [Bot] and 4 guests