Support

Akeeba Ticket System

#27171 Import tickets from another installation

Posted in ‘Akeeba Ticket System for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Ticket System version
n/a

Latest post by nicholas on Wednesday, 22 February 2017 07:04 CST

marco.marranchelli
 I would like to import tickets from my old website, based on Joomla 2.54, and akeeba ticketsystem 1.55 to the updated joomla 3.6 one, actual Akt 2.2.2.

How shall I do that?

Thank you for your fantastic support always.

Kind regards,Marco

nicholas
Akeeba Staff
Manager
This is not that simple. While you can import all the tickets and posts across sites by copying the database tables with _ats_ in their name you will not be able to import categories.

Categories are managed by Joomla. Due to the way they are managed by Joomla you cannot copy a category: its data is found in several tables, one of which is a hierarchy (nested table) handling access permissions across categories, articles, tags, components and every other core or third party content type which is a target for access control. You cannot copy records to that table from another installation, it would break your site. Moreover, trying to create categories afresh would give them a different ID (managed automatically by Joomla) which will break the associations of tickets to categories, leading to an unusable ticket system.

The only recommended approach is directly migrating your Joomla! 2.5 site to 3.6 in order to keep the category IDs.

If that's not possible you're in for a world of hurt and database editing :(

  • On your old site look in the #__categories table.
  • Find all records where extension = com_ats. You need to write down the id and title of each one of these. This is your ORIGINAL LIST.
  • Install ATS.
  • Create all your ATS categories.
  • Transfer all the tables with _ats_ in their names from the old site to the new, overwriting existing tables. Remember to change the table name prefix to match your new site.
  • Visit the backend of ATS a couple of times to let it update the structure of the tables.
  • On the new site look in the #__categories table.
  • Find all records where extension = com_ats. You need to write down the id and title of each one of these. This is your NEW LIST.
  • Now you have to comb through the ORIGINAL LIST and OLD LIST. For each row in the ORIGINAL LIST find the corresponding title in the NEW LIST. Now you can associate the OLD ID with the NEW ID.
  • Next up, you need to edit all entries in the #__ats_tickets table and change the catid. The one listed there is the OLD ID. You have to replace it with the corresponding NEW_ID, per the associations you figured out above.
  • Finally, if you absolutely need the attachments, copy the directory media/com_ats/attachments from the old site to the new.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

marco.marranchelli
Wow, thank you Nicholas for the detailled description!
Kind regards

Marco

marco.marranchelli
If I haven't created any new categories in the new site it should work by just copying the ticket table, shouldn't it.

nicholas
Akeeba Staff
Manager
If I haven't created any new categories in the new site it should work by just copying the ticket table, shouldn't it.


Your statement is ambiguous so I cannot reply to it.

IF your site is a direct migration from the old Joomla! 2.5 site THEN the categories of the old site have been maintained with their old numeric IDs. In this case, and this case ONLY, would copying the tickets AND posts AND attachments AND every other ATS table suffice. I already told you so:

The only recommended approach is directly migrating your Joomla! 2.5 site to 3.6 in order to keep the category IDs.


In any other case, including using a third party extension or service to migrate the content from the Joomla! 2.5 site to a NEW Joomla! 3.6 site (one which was set up from scratch, without applying updates directly on a copy of the Joomla! 2.5 site), the numeric category IDs may have changed. If the numeric IDs have changed your transfer will fail.

The association between tickets and categories is always performed on the numeric category ID. The #__ats_tickets table's catid column is linked to the #__categories table's id column. This lets you reorder, rename, add and remove categories on a site after setting up ATS without risking to break the existing tickets. That's also why Joomla articles do the same thing ;)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!