-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merging tickets causes duplicate records and fatal error. #5379
Comments
I can replicate the same issues with latest Cheers. |
This commit fixes an issue we had with creating duplicate records in the thread_entry_merge table. This would happen if you were to merge tickets, deleting the child tickets, and then try to merge that ticket into another ticket. This fixes Issue osTicket#5379.
This is addressed with: Cheers. |
I can confirm #5425 this fixes this bug, greatly appreciated! |
Hi, I have a merged tickets with this problem and content disappear , how i can resolve the Duplicate?? .. I have patched for avoid future problems. Thanks! |
You need to find the duplicate record in the Cheers. |
Yes, located...THANKS!
[image: image.png]
El lun., 6 abr. 2020 a las 17:14, JediKev (<[email protected]>)
escribió:
… @inphower <https://github.com/inphower>
You need to find the duplicate record in the ost_thread_entry_merge table
and either modify it or delete it altogether.
Cheers.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5379 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGMGLVT2TMUU4NNIFIYYTA3RLHWVTANCNFSM4KWHJOMA>
.
--
Gabriel Font
Perfil públicohttps://es.linkedin.com/in/gabrielfont
|
This commit fixes an issue we had with creating duplicate records in the thread_entry_merge table. This would happen if you were to merge tickets, deleting the child tickets, and then try to merge that ticket into another ticket. This fixes Issue osTicket#5379.
Prerequisites
Description
When merging tickets in a certain situation/order, the following error message can occur when viewing the merged ticket, making it impossible to ever view again without manual intervention in the database.
Fatal error: Uncaught ObjectNotUnique: One object was expected; however multiple objects in the database matched the query. In fact, there are 2 matching objects. in /var/www/osticket/include/class.orm.php:1363
Stack trace: #0 /var/www/osticket/include/class.orm.php(606): QuerySet->one()
#1 /var/www/osticket/include/class.orm.php(381): VerySimpleModel::lookup(Array)
#2 /var/www/osticket/include/class.orm.php(801): VerySimpleModel->get('merge_info')
#3 /var/www/osticket/include/class.orm.php(417): AnnotatedModel___ThreadEntry->get('merge_info', NULL)
#4 /var/www/osticket/include/class.thread.php(1576): VerySimpleModel->__get('merge_info')
#5 /var/www/osticket/include/class.thread.php(1584): ThreadEntry->getMergeData()
#6 /var/www/osticket/include/staff/templates/thread-entries.tmpl.php(33): ThreadEntry::sortEntries(Object(QuerySet), Object(Ticket))
#7 /var/www/osticket/include/class.thread.php(408): in /var/www/osticket/include/class.orm.php on line 1363
I believe this is also related to the merge issue described here: https://forum.osticket.com/d/96658-can-t-view-new-tickets-after-upgrade-to-v1-14-1/7
Steps to Reproduce
This is fairly long, but essentially it involves sending four emails to osTicket, merging two into group 1, and two into group 2, then merging group 1 into group 2.
Here are the steps in detail:
Create Group 1 tickets:
Send email to osTicket with subject/body of: "Parent 1"
Send email to osTicket with subject/body of: "Parent 1 (child1)"
Open this ticket, copy its Ticket number.
Go to Parent 1 ticket:
Click More > Merge Tickets
Click Select Ticket field
Paste Ticket Number from above "Parent 1 (child1)" ticket.
Click the child's number that appears (not the name, apparently clicking the name causes other problems)
Click Add ticket
Check Delete Child Ticket
Click Save changes
Create Group 2 tickets:
Send email to osTicket with subject/body of: "Parent 2"
Send email to osTicket with subject/body of: "Parent 2 (child1)"
Open this ticket, copy its Ticket number.
Open Parent 2
Click More > Merge Tickets
Click Select Ticket field
Paste Ticket Number from above "Parent 2 (child1)" ticket.
Click the child's number that appears (not the name)
Click Add ticket
Check Delete Child Ticket
Click Save changes
Now merge both groups of tickets into one:
Click More > Merge Tickets
Click Select Ticket field
Paste Ticket Number from above "Parent 1" ticket.
Click the child's number that appears (not the name)
Click Add ticket
Check Delete Child Ticket
Click Save changes
The above error message should appear as soon as you save the changes and it refreshes Parent 2 ticket on the screen.
Versions
v1.14-git on Ubuntu 18.04
The text was updated successfully, but these errors were encountered: