Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Plugin merging

Original thread: http://osticket.com/forum/discussion/89699/osticket-v1-10-merge-duplicate-ticket-mods-attached/p1

Since this mod was released we've been using it as a core modification but in order to make the changes maybe stay in future releases i decided to try and port it to a plugin and here's a start of it.


You can merge and split tickets, both single and mass.
Bring the recipients from the child tickets.

I've not ported the thread merging or redirection yet.

Note: This plugin adds a table %prefix%_ticket_relation and it also alters the conditions thread event table, this in order to add the events to tickets.
When uninstalling the changes will be removed, so any relations between tickets will be removed but tickets will remain in their current state.
Any events that were merged/split will lose their text even after reinstalling the plugin.

Comments

  • I look forward to testing this!

  • Sounds great, I'll check it out also.
  • Hi,
    I have installed the plugin on my system, however when I try to join two tickets between them nothing happens.
  • @mnavarro, do you get any errors in your javascript console? you need to enable xmlhttprequests here.
    Can you see if anything has happend in the database?
  • this is the error on console. 
    console.jpg
    553 x 194 - 36K
  • Sorry I just saw that the folder inside include \ plugins did not have the same name as in js search.

    changed the name of the folder, now I get the following error:
    jquery-1.11.2.min.js?9ae093d:4 POST https://scf/include/plugins/Merging/ajax.php 500 (Internal Server Error)
    send @ jquery-1.11.2.min.js?9ae093d:4
    ajax @ jquery-1.11.2.min.js?9ae093d:4
    (anonymous) @ VM6290:12
    dispatch @ jquery-1.11.2.min.js?9ae093d:3
    r.handle @ jquery-1.11.2.min.js?9ae093d:3

    console2.jpg
    553 x 196 - 44K
  • Yes the first error is indeed incorrect path, but that should be accounted for so, I shall have a look at that aswell.
    I'll see if i can find what it's later on, could you send what webserver you're using, php version, database and browser?
  • the server is an ubuntu desktop. the attach file is the web server info and the browser is chrome.


    server info.jpg
    957 x 523 - 130K
  • Hmm it seems like the problem resides in the way the plugins config is fetched when using php 7.x
  • @mnavarro can you try updating with the latest commit and see if that works for you?
  • I initially had the same trouble with the naming of the directory containing the plugin, however, after that I'm able to click on stuff and entries are appearing ost_ticket_relation. I haven't really checked much further than that.
  • Yes that was my main concern and i'll take the installation directory into consideration soon.
  • @Micke1101 thanks, now it works correctly.
    the only "error" I see at the moment is that the folder has to be called "Merging".

    I'll make more checks throughout the week, in case I find any bug I'll let you know.

    Once again, thank you very much for your work.
  • edited October 16
    @Micke1101 I have started testing this as well, and like mnavarro when i try to merge tickets, nothing happens. Like nothing at all. Don't see any errors in any logs, and i have the latest commit downloaded.

    Server Information
    osTicket Version v1.10.1 (9ae093d) —  Up to date
    Web Server Software Microsoft-IIS/7.5
    MySQL Version 5.7.17
    PHP Version 5.6.24

    Update:

    Scratch my no errors comment, this is what I am getting when I click the merge button:

    jquery-1.11.2.min.js?9ae093d:4 POST https://[sitename]/support/include/{MERGING_INSTALL_PATH}/ajax.php 404 (Not Found)
  • Yea I just tested that commit and found that i had forgot to rename a variable, it should work now @blueyeguy @mnavarro
  • @micke1101 The path works fine, no rename neded.
    Another issue, in the default configuration I have established that 
    the child ticket changes state to closed, however it remains open.

    I understand that it is not implemented yet.
  • Hmm ok after testing a bit it seems that the problem is that the configuration changes are not being read the way the config call is made, instead it uses the defaults, so if you want to do a quick fix then just edit the config file default values to the value you want, i'll see if i can solve it tomorrow.
  • @Micke1101 I've had that issue before with changes to a plugin's config in code, usually the fix is just deleting the plugin and reinstalling. (Deleting from the admin screen just deletes the config in the database).
Sign In or Register to comment.