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

What connects Ticket Details Form to ticket?

Yesterday I was mirroring our ticket site testing the new release, themes, etc. and when I fired up the new instance (for the nth time) I forgot to change my default site path and ended up on the live system.  I deleted some tickets from that system.  oops.  I have a backup of the database just before the incident and I have manually pulled out the records for the six tickets in the following tables;


The tickets were back in the system but had no "Ticket Details" form attached (data is in the DB) but the "Subject" would show in the scp tickets page...

....but the next morning they are blank (and priority gone)??

I am pretty sure the only thing I am missing is what links the "Ticket Detail" form to the actual ticket (which I thought object_id was ticket_id in form_entry but I guess there is something else?)

Any help would be greatly appreciated but if you don't want to make my headache yours, I understand. :)

**version 1.9.14


  • edited December 2016
    I did read that ticket__cdata was temporary so that may have something to do with it.

    I noticed that my data in form_entry_values for these tickets were blank (I don't know why after importing yesterday) but I have REPLACEd them for now.  I'm thinking that maybe I copied the __cdata and that made them show up yesterday but the values in the form_entry_values were blank and when the cache went to update (I'm guessing on a cron??) it made them blank again.

    I will see if the problem shows back up tomorrow.

    I still do not have any forms attached to the tickets though :(

  • See Picture
  • edited December 2016
    Finally fixed it.

    I thought I had already done this but I guess not

    Ran this on both for each ticket. (object_id being ticket_id)

    mysql> SELECT * FROM ost_form_entry WHERE object_id = 311;
    | id  | form_id | object_id | object_type | sort | created             | updated             |
    | 358 |       1 |       311 | U           |    1 | 2016-09-23 13:05:07 | 2016-09-23 13:05:07 |
    | 988 |       2 |       311 | T           |    0 | 2016-11-08 14:17:59 | 2016-11-08 17:12:40 |
    | 989 |       7 |       311 | T           |    1 | 2016-11-08 14:17:59 | 2016-11-08 14:17:59 |
    3 rows in set (0.00 sec)

    got the ids for the missing ones then ran this on the backup database:
    mysqldump --user root --password CENSORED* ost_form_entry WHERE id=988 OR id =989 OR id =1006 OR id =1047 OR id =1216 OR id =1217 OR id =1206
    and that gave me the code to remap the forms to the appropriate tickets

    Here is that code:  (excerpt)
    INSERT INTO `ost_form_entry` VALUES (988,2,311,'T',0,'2016-11-08 14:17:59','2016-11-08 17:12:40'),(989,7,311,'T',1,'2016-11-08 14:17:59','2016-11-08 14:17:59'),(1006,2,321,'T',0,'2016-11-09 16:12:26','2016-11-11 08:23:15'),(1047,2,346,'T',1,'2016-11-15 07:52:15','2016-11-15 07:52:15'),(1206,2,434,'T',1,'2016-12-01 06:40:53','2016-12-01 06:40:53'),(1216,2,440,'T',1,'2016-12-01 16:22:46','2016-12-01 16:22:46'),(1217,2,441,'T',0,'2016-12-01 16:30:49','2016-12-02 10:11:18');

    * note: This post has been edited!  The password was removed by forum moderator (ntozier).
  • In your place I would edit out the password :)
  • edited December 2016
    I did.  I removed it.  That is the name of the database.  Thanks for looking out though! :)
Sign In or Register to comment.