At Thursday 5/11/2006 07:09 PM, Mike Patterson wrote:
I just came across another snag in my migration (3.4.2 -> 3.4.5) migration

slap my wrist for not using RT's API...
however we already have a bunch of reports calling on the mysql database table TicketCustomFieldValues and I don't want overhaul all those pages just yet.

Can I simply substitute the table name ObjectCustomFieldValues for TicketCustomFieldValues in our non-api aware code or is there something more complicated that I need to be aware of?

Browsing around the database it looks fairly similar..

Thanks,
Mike

some code snippets below:
---------------------------
$sql = "SELECT TicketCustomFieldValues.CustomField, TicketCustomFieldValues.Content FROM TicketCustomFieldValues"; $conditions = " WHERE (TicketCustomFieldValues.CustomField = 9) AND (TicketCustomFieldValues.Content IS NOT NULL)";
$group_by = ' GROUP BY TicketCustomFieldValues.Content ';
$order_by = ' ORDER BY TicketCustomFieldValues.Content ';

You'll need to add

AND ObjectCustomFieldValues.ObjectType = 'RT::Ticket'

to your queries to make sure you only get ticket CF values.

Steve
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com


We're hiring! Come hack Perl for Best Practical: 
http://bestpractical.com/about/jobs.html

Reply via email to