Merge ticket based on TicketNumber

Moderator: crythias

Post Reply
lennart21k
Znuny newbie
Posts: 4
Joined: 19 Oct 2023, 07:23
Znuny Version: 6.0.40
Real Name: Lennart Kits

Merge ticket based on TicketNumber

Post by lennart21k »

Hello!

I would like to merge a ticket with another ticket based on TicketNumber, doesn't matter who the sender is.

So, for example, if I have a ticket [Ticket#12345] and someone sends an email and has that [Ticket#12345] in email subject OR body and that ticket is OPEN (or other open statuses, pending etc), then it merges sent email with that ticket.

Currently sender needs to be the same who sent initial ticket, but I want to accept ANY sender.

I do understand this is not how OTRS is built, but I'd like to change that for my usage purposes.

I would prefer not to change OTRS files and do this through configuration.

PS: I think I cannot use Postmaster Filter because it is unable to change TicketNumber through that.
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Merge ticket based on TicketNumber

Post by root »

Hi,

What you describe is possible by default. And it's called a FollowUp, not a merge. Merge is only possible when there is a second ticket, a FollowUp is directly added to an existing ticket.

You should check the system configuration for everything that is related to a FollowUp that is not default and find out why. That might solve your issue.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
lennart21k
Znuny newbie
Posts: 4
Joined: 19 Oct 2023, 07:23
Znuny Version: 6.0.40
Real Name: Lennart Kits

Re: Merge ticket based on TicketNumber

Post by lennart21k »

Hey!

I've checked FollowUp settings and if I'm not mistaken, then FollowUp assumes that people reply to the initial message that was sent by OTRS.

However, what happens when user sends new e-mail, just containing OTRS TicketNumber and no additional email headers?
And when that user is not the user who initially opened the ticket or is customer in the ticket?


root wrote: 20 Oct 2023, 08:52 Hi,

What you describe is possible by default. And it's called a FollowUp, not a merge. Merge is only possible when there is a second ticket, a FollowUp is directly added to an existing ticket.

You should check the system configuration for everything that is related to a FollowUp that is not default and find out why. That might solve your issue.

- Roy
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Merge ticket based on TicketNumber

Post by root »

lennart21k wrote: 20 Oct 2023, 08:59 However, what happens when user sends new e-mail, just containing OTRS TicketNumber and no additional email headers?
And when that user is not the user who initially opened the ticket or is customer in the ticket?
Both are added to the ticket with that ticket number

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
lennart21k
Znuny newbie
Posts: 4
Joined: 19 Oct 2023, 07:23
Znuny Version: 6.0.40
Real Name: Lennart Kits

Re: Merge ticket based on TicketNumber

Post by lennart21k »

I don't understand.

When I have ticket open with ID [Ticket#12345], then when someone random writes to my OTRS and includes "[Ticket#12345]" in subject or body, then OTRS still creates new ticket.

How can I make it so that doesn't matter who writes to OTRS email, when that person includes ticket number in subject or body, then their mail is merged/followup to existing ticket instead of opening new one?

I've enabled all FollowUp settings, including body, attachment.
root wrote: 20 Oct 2023, 09:43
lennart21k wrote: 20 Oct 2023, 08:59 However, what happens when user sends new e-mail, just containing OTRS TicketNumber and no additional email headers?
And when that user is not the user who initially opened the ticket or is customer in the ticket?
Both are added to the ticket with that ticket number

- Roy
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Merge ticket based on TicketNumber

Post by root »

lennart21k wrote: 20 Oct 2023, 10:57 When I have ticket open with ID [Ticket#12345], then when someone random writes to my OTRS and includes "[Ticket#12345]" in subject or body, then OTRS still creates new ticket.
As I said, this is NOT the default behavior. Unless you changed any of these settings/modules:

-PostMaster::CheckFollowUpModule###0000-BounceEmail
- PostMaster::CheckFollowUpModule###0100-Subject
- PostMaster::CheckFollowUpModule###0200-References
- PostMaster::CheckFollowUpModule###0300-Body
- PostMaster::CheckFollowUpModule###0400-Attachments
- PostMaster::CheckFollowUpModule###0500-RawEmail

Have you checked them for changes?

Or do you have any other kind of customization active?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
lennart21k
Znuny newbie
Posts: 4
Joined: 19 Oct 2023, 07:23
Znuny Version: 6.0.40
Real Name: Lennart Kits

Re: Merge ticket based on TicketNumber

Post by lennart21k »

That's very interesting, I don't seem to have any custom packages that should interfere with Ticket followups...
https://i.imgur.com/ms1ZHQ6.png

As for CheckFollowUpModule everything seems like it should be.
https://i.imgur.com/BIDr1Yj.png

I really haven't modified much, no files in "Custom/Kernel/System/PostMaster".

EDIT:
Message log doesn't seem to find ticket number from anywhere...
https://i.imgur.com/3D7nRb7.png
root wrote: 20 Oct 2023, 13:14
lennart21k wrote: 20 Oct 2023, 10:57 When I have ticket open with ID [Ticket#12345], then when someone random writes to my OTRS and includes "[Ticket#12345]" in subject or body, then OTRS still creates new ticket.
As I said, this is NOT the default behavior. Unless you changed any of these settings/modules:

-PostMaster::CheckFollowUpModule###0000-BounceEmail
- PostMaster::CheckFollowUpModule###0100-Subject
- PostMaster::CheckFollowUpModule###0200-References
- PostMaster::CheckFollowUpModule###0300-Body
- PostMaster::CheckFollowUpModule###0400-Attachments
- PostMaster::CheckFollowUpModule###0500-RawEmail

Have you checked them for changes?

Or do you have any other kind of customization active?

- Roy
Post Reply