Hacking: Moving articles with time-units to another ticket

Infos:

  • Used Zammad version: 3.3.0-1585765448.37c15d59.bionic
  • Used Zammad installation source: (source, package, …): deb package
  • Operating system: Ubuntu Linux 18.04
  • Browser + version: Firefox latest

Expected behavior:

  • I know I shouldn’t but:
  • I would like to relocate articles with their time_units to another ticket. I tried it the old fashioned way by sql hacking the database and restarting the zammad service.

update ticket_articles set ticket_id=42 where ticket_articles.id = 241;
update ticket_time_accountings set ticket_id=42 where ticket_id = 36 and ticket_article_id=241

Restarting the zammad service

Actual behavior:

  • The article shows up in the new ticket screen, but the time units do not change on either ticket (source ticket or destination ticket)

Steps to reproduce the behavior:

  • You shouldn’t :slight_smile:

What am I missing here?

Warm regards and thanks for this awesome product.
Jeroen

Maybe this turns into a feature request. I tried to accomplish my goal (rearranging some tickets, some articles and their time units) using the split and merge functions. That was a bad idea. With a split the article is copied into a new ticket and a link is created from the old ticket to the new ticket.
Merging a ticket created by splitting with another ticket created with a split was illegal was a this object already exists error.

I looked at the rest API but could not find documentation for deleting a single article. Otherwise, I could create a new ticket and copy an article to the new ticket and delete the old article.

So, back to square one: can I hack this straight in the database?
Tomorrow I will try this path again.

Merging time units from ticket to ticket is not possible at this moment.
As Zammad accounts step by step time accountings to the ticket history and not the article itself, you can’t merge these information.

Please note that the meta information on a ticket are not merged.

For your split ticket, please use the automasation to remove the ticket or take a look into the console documentation on how to delete those information. For the safety of you and other users that might copy code out of context. I currently suspect that the split ticket consists of one article only, so that shouldn’t be an issue if I got it right.

Thanks so much for your reply and hints on solving this. I tried to edit my original starting post here to remove the queries to prevent Google users from doing stupid stuff (like me) but there was no more edit function. Sorry bout that. I understand the the current data model is a complex beast. I want to split one ticket into 3 separate tickets with several articles and time units per ticket. I will look at the console and see if I can get that to work. There’s always the daily database dump as a roll-back scenario :slight_smile: . I guess the only easy option left is to create 3 new tickets, copy paste the article history from the original where needed. Enter time units to every article (I have a sql query to get that original info for a sinle ticket) and move the original ticket to a dummy (trash bin) organization. I think that is currently my safest bet. I guess I thanked you before for an awesome application, but consider this a +1 on that :-). Kind regards, Jeroen