I am attaching a Merge modification for OSTicket  v1.10 (901e5ea). - The replacement PHP files.- The SQL needed (if you changed your ost prefix from ost_ to something else then you will need to modify the sql file)The Merge Ticket functionality basically sets up a master/child ticket relationship.  - You can merge two tickets by opening the child ticket, entering the maser ticket number and clicking MERGE.- You can merge multiple children into a master by simply selecting multiple tickets, entering the master ticket number and clicking MERGE.- You can not merge a "master ticket" into another "master ticket" or a "child ticket" into multiple "master tickets".   It is just a "master" / "children" relationship.- Viewing either the master or child tickets includes a "Relations" tab where you can see all the related tickets.- You can delete the links between master and child tickets from the master ticket.Couple of notes..- This is NOT the final version.   I will post the rest of the code when it becomes available.- If you select multiple child tickets and click MERGE it will fail if one of the children are already assigned to a master ticket.  The dev is working to resolve this by putting up a warning but merging the remaining tickets.- The developer is also working to add a "duplicate ticket" button for the ticket view.   This will allow us to take an existing ticket and split it into 2 then delegate out the appropriate workload between staff members or departments.   Attached are some screenshots in case you were curious what it looks like.If any of the links/files are missing and you need a copy then please PM me.  I will share them with you. The coding work was done to our specification by Martynas Miniots.  Please contact him if you need any customization for your project.   https://www.upwork.com/fl/move

[osTicket.zip](https://forum.osticket.com/assets/files/migrated/FileUpload/bc/5ce97b4ce0dee803c893b276ed5985.zip)

[ost_ticket_relation.sql.tar.gz](https://forum.osticket.com/assets/files/migrated/FileUpload/66/d0dd532012c2a4c0b132fe78a31e9f.gz)

child-footer.jpg

master-ticket-view.jpg

merge-multiple-tickets.jpg

child-ticket-view.jpg

Any reason why you wouldn't' submit this via github as a Pull Request?https://github.com/osTicket/osTicketThen it would have a much better chance of making it into core.

I would be happy too. My concerns are 1) This feature has been requested hundreds of times dating back several versions. If Martynas can get this feature back to us in 3 days then I would assume there is a reason this feature has been excluded by the OST team. I was merely "taking a hint" they did not want this feature in their code base for some reason. 2) I am not a dev. I will be happy to contribute the work but I have no way of knowing if it would meet their standards or fixing any deficiencies. I am not implying Martynas would write "bad code" but I purposely told him not to spend a lot of time refactoring the code into a modular form. This probably reflects in the work.

I hate to be the kind of guy who just dumps "bad code" into Github then runs for the hills. Drive-by-coding never makes anyone happy. ;-)

When I have a final product from Martynas I will be happy to submit it as long as it is welcomed by the OST team.

Does the code have a way to split tickets back into two?   etc?How is he handling the ticket thats being merged?  Does he just delete it?  Is it being marked as closed with a reference to the new merged ticket? 

Yes. Just open the master ticket and remove the link to the child ticket.

The child tickets are closed. It does not remove them from the system. The master just contains a nice, detailed table of child tickets so you can find them easily. It does not move the contents of the child tickets into the master ticket.

8 days later

Hi All.   I am posting the final contents of the changes for v1.10.  This includes the ability to link / merge multiple tickets into a master/child ticket relationship.This also includes the ability to duplicate a ticket including the entire thread and all the ticket properties (except attachments).  I am 100% positive this code works and seems to work well.   We've used it dozens of time in both dev and prod.   If you run into a problem please let me know.  I probably just missed a file.  If I did then I am sorry in advance.  

[osTicket.tar.gz](https://forum.osticket.com/assets/files/migrated/FileUpload/14/93dd855b7c283d798f9d9befa729d2.gz)

This is amazing, do you mind providing some instructions for folks who come accross this post?

It's pretty simple.- From the ticket list or search results check all the child tickets you need to merge, enter the master ticket number into the MASTER ID field then click the MERGE button (it's to the right of the MASTER ID field).  All of your child tickets will automatically close and leave you with the master ticket.   - If you view the master ticket there is a RELATED tab that shows you all the child tickets.- If you view the child ticket it wills how you the master ticket number-While viewing any ticket you can enter the master ticket number into the MASTER ID field and click the MERGE button to merge the tickets.- While viewing any ticket you can click the DUPLICATE TICKET button and it will create a duplicate ticket with a message telling you the new ticket number. There are some screenshots above with red lines around the important parts to note.   Keep in mind this was done for our own needs but you are welcome to contact the developer and ask him to customize it for you:https://www.upwork.com/fl/moveHe was reasonably priced and great to work with.  All of this code is licensed under the MIT license so he's welcome to modify / adjust it for you then sell it back to you.   The OSTicket team is also welcome to incorporate the code into future versions.  

If I wanted to use this code, where would I insert it? 

7 days later

I'm sorry Synt..  I hired a dev to handle the integration.  Here is his info:https://www.upwork.com/fl/moveI would assume if you are self hosting then you're comfortable with these things or have someone who is. 

Hi there,That development is really god :)I tried to download the latest file, but I'm unable, can you post it again?Thanks,

Hi again,Don't know why but was able to download only with Safari.Thanks

a month later

Hello,could anyone please tell me what I have to do with the files to get this working? The .php files are probably just to overwrite the default ones, but what have I to do with the 93dd855b7c283d798f9d9befa729d2 file?We are using osTicket in our small business since a few weeks and this feature would be really neat to get working.Thanks

Can this be merged into the main codebase to be published with the next release please? This feature is default in ticket systems and several customers don't want to use osTickets because it lacks this feature.As others said, why wasn't this included in earlier version?Thanks

Q: Can this be merged into the main codebase to be published with the next release please? A: Things that have not been made as a PR (pull request) at github have 0% chance of being included in the next or any version.  Q: As others said, why wasn't this included in earlier version?A: exact same answer with the point that this was posted after that last release was made.I did however give the link to this thread to the devs back when this thread was started.

Looks really good!! Thanks for the work. Woul love to see it in the official release!

Looks really good indeed, I've added the files posted to a  github https://github.com/Micke1101/osTicket/tree/Merge-TicketsAlso added so that there is a event entry when a ticket is merged or split(?) and when you merge the tickets the master ticket gets the other tickets users and collaborators as collaborators.2 other things that i'm probably gonna look at is it would be nice to have a search function rather than having to enter the number of the ticket and also a mass option for splitting the tickets.