Jump to content

Whmcs Migrator (Beta) - Updated 2013-11-12


Cody

Recommended Posts

For those having issues with ticket status values matching up, what are the results of the following query on your WHMCS db?

 

 

SELECT status, COUNT(*) AS total FROM tbltickets GROUP BY status

 

Note, the 'total' values don't really matter, but would be good to see in contrast to what's you're seeing in Blesta.

 

 

+----------------+-------+

| status         | total |

+----------------+-------+

| Answered       |    10 |

| Closed         |  1295 |

| Customer-Reply |     2 |

| Open           |     1 |

+----------------+-------+

 

Blesta --> Open (1308)Awaiting Reply (0)In Progress (0)

Link to comment
Share on other sites

Ticket status is fixed for the next rev. We're working on adding diagnostics, and looking at ways to improve runtime.

 

Really appreciate the progress on this.  I know some people think an importer is their entitlement; however, having used competing billing systems importers or got into dialogue with the devs regarding one Blesta has been the best experience so far.

Link to comment
Share on other sites

We have no tickets whatsoever importing.  I'm not really concerned here, I can live with this.  Thought I'd throw this out there because it apparently differs from everyone else's experience.  The only thing I see is that since we did a fresh install, we did not enable the Support module before the migration.

 

I think I submitted a feature request about this a while back (enable by default), but I'm betting that's the cause here.

Link to comment
Share on other sites

We have no tickets whatsoever importing.  I'm not really concerned here, I can live with this.  Thought I'd throw this out there because it apparently differs from everyone else's experience.  The only thing I see is that since we did a fresh install, we did not enable the Support module before the migration.

 

I think I submitted a feature request about this a while back (enable by default), but I'm betting that's the cause here.

 

The importer should install the support plugin automatically.

Link to comment
Share on other sites

The importer should install the support plugin automatically.

 

Pretty sure it did not in my case, but I haven't had my afternoon coffee.  It's possible that it was enabled and I just had to add myself to the ACL.  I'll be doing another import run before going live, but in any event, no tickets made it over.

Link to comment
Share on other sites

Pretty sure it did not in my case, but I haven't had my afternoon coffee.  It's possible that it was enabled and I just had to add myself to the ACL.  I'll be doing another import run before going live, but in any event, no tickets made it over.

 

Have you checked the database (support_tickets) table? Only staff members imported from WHMCS are assigned to staff departments, and thus have access to tickets. The user you use to import will not be given access to those departments.

Link to comment
Share on other sites

I think if you have people set as Administrators in WHMCS they do not form part of departments.  It appears to only non-administrators to departments.  I had to add departments to Administrators manually in Blesta for Support to show up.

 

Interesting. I'll look into adding "Administrators" to all departments when imported.

Link to comment
Share on other sites

Have you checked the database (support_tickets) table? Only staff members imported from WHMCS are assigned to staff departments, and thus have access to tickets. The user you use to import will not be given access to those departments.

 

Just logged in using my WHMCS credentials, and yikes -- looks like every ticket since day one is open including tickets which have been long since closed.

Link to comment
Share on other sites

This is new.  I just checked into an old ticket, and the client name / profile was wrong.  In Client A's ticket, the client shows as Client A in WHMCS but Client B in Blesta.  Client B and Client A have no relationship (authorized contacts, etc).  Not all clients are impacted and I am unable to see any correlation between these two clients at all.

 

If I log in as Client B, I can see the ticket.  This has obvious security implications.  What info do you need from me?

 

EDIT:  The only "relationship" (and it's not) is that the clients are adjacent.  Client A is client #43, Client B is client #42.  Maybe Douglas Adams is hacking my server.

Link to comment
Share on other sites

This is new.  I just checked into an old ticket, and the client name / profile was wrong.  In Client A's ticket, the client shows as Client A in WHMCS but Client B in Blesta.  Client B and Client A have no relationship (authorized contacts, etc).  Not all clients are impacted and I am unable to see any correlation between these two clients at all.

 

If I log in as Client B, I can see the ticket.  This has obvious security implications.  What info do you need from me?

 

EDIT:  The only "relationship" (and it's not) is that the clients are adjacent.  Client A is client #43, Client B is client #42.  Maybe Douglas Adams is hacking my server.

 

Does this affect all clients, or just these two you mentioned? The migrator grabs the tbltickets.userid and maps that to the imported client ID. If it was wrong for one client I'd expect it to be wrong for all.

Link to comment
Share on other sites

Does this affect all clients, or just these two you mentioned? The migrator grabs the tbltickets.userid and maps that to the imported client ID. If it was wrong for one client I'd expect it to be wrong for all.

 

Definitely not all clients.  Some tickets have correct information.  So far this is the only one I've seen, but with thousands of tickets, I haven't checked them all.

Link to comment
Share on other sites

So... I've got some initial stats on the migrator.

 

On my machine each DB write takes .03 seconds on average, so 1000 records = 30 seconds. Hopefully your machine is faster, but likely your dataset is much larger. Just something to keep in mind.


The biggest slowdown is WHMCS' custom cipher algorithm. In case you weren't aware, WHMCS encrypts credit card numbers using AES (good for them), but they encrypt everything else using their stupid custom encryption algorithm which is nothing more than a glorified caesar cipher. Well, we cracked the algorithm a while ago and implemented it as part of the importer and it turns out it's slow as molasses.

 

 

decrypted 26 values using WHMCS' proprietary algorithm

decrypt took: 9.9616 seconds

 

 

That's 0.383 seconds per string! In contrast, our AES encryption takes 0.0007 seconds per string.

 

WHMCS' insecure custom algorithm takes 550 times longer to run than 256-bit AES.

 

 

EDIT: Factoid, the full import took 39.2339 seconds. Over 25% of the time spent was attempting to decrypt WHMCS encrypted data.

Link to comment
Share on other sites

Definitely not all clients.  Some tickets have correct information.  So far this is the only one I've seen, but with thousands of tickets, I haven't checked them all.

 

Hm. Are you sure it's the same ticket and doesn't happen to be a ticket with the a similar ticket number?

Link to comment
Share on other sites

Hm. Are you sure it's the same ticket and doesn't happen to be a ticket with the a similar ticket number?

 

Great question, but no.  I just confirmed to be safe.

 

The only other thing I can point out is that this ticket was largely email replies.  I'm checking other tickets now to see if that's a factor.

Link to comment
Share on other sites

Great question, but no.  I just confirmed to be safe.

 

The only other thing I can point out is that this ticket was largely email replies.  I'm checking other tickets now to see if that's a factor.

 

I suggest looking at tickets specifically immediately before and after this one. If something shifted, it's likely that one and everything after it would be wrong.

Link to comment
Share on other sites

Found another crossed ticket.  Same as before:  The user showing in the ticket is correct user's usernumber + 1.  This was also originated as an email.  However, I found other tickets opened by email that did not have this issue.

 

I suggest looking at tickets specifically immediately before and after this one. If something shifted, it's likely that one and everything after it would be wrong.

 

Just checked, and they are fine.

Link to comment
Share on other sites

Another weird thing:  I have multiple support departments in Blesta with the same name.  I started from a blank database, but now I have three copies of each support department, all with the same name.  Except for "Sales & Billing", which has one "Sales & Billing" and two "Sales & Billing".

 

EDIT:  Most tickets are being duplicated.  Sales & Billing tickets seem to all have three copies, some with incorrect usernames (same substitution as before).  Surprisingly, my first (newest) four tickets do not appear to be duplicated.

 

EDIT 2:  When a ticket is duplicated, the first ticket is usernumber+1, the second ticket is the correct usernumber, and the third ticket is usernumber+1.

Link to comment
Share on other sites

Another weird thing:  I have multiple support departments in Blesta with the same name.  I started from a blank database, but now I have three copies of each support department, all with the same name.  Except for "Sales & Billing", which has one "Sales & Billing" and two "Sales & Billing".

 

That makes it look like you didn't start off with a fresh database. As of b5, the migrator decodes department names, so that department predates your latest import. I actually ran into a similar issue with my test environment because I made a back up of the database after I ran only select migration routines.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...