Migrating from 4.2 to 4.4 Update custom Fields

Hello All

I am migrating from 4.2 to 4.4. The .4. environment seems to be up and running fine I have creates ticets via Web and email. I have manually updated custom fields for different tickets.

I am moving custom action from the old system to the new system.

When I try to update custom fields I get the following warning below but all seems to work. What am I missing?

[16750] [Mon Oct 21 18:17:14 2019] [warning]: DBD::mysql::st execute failed: Unknown column ‘canonicalizeclass’ in ‘field list’ at /usr/local/share/perl/5.22.1/DBIx/SearchBuilder/Handle.pm line 586, line 755. (/usr/local/share/perl/5.22.1/DBIx/SearchBuilder/Handle.pm:586)
[16750] [Mon Oct 21 18:17:14 2019] [warning]: RT::Handle=HASH(0x243a4f0) couldn’t execute the query ‘SELECT canonicalizeclass FROM CustomFields WHERE id = ?’ at /usr/local/share/perl/5.22.1/DBIx/SearchBuilder/Handle.pm line 599, line 755.
DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x243a4f0), “SELECT canonicalizeclass FROM CustomFields WHERE id = ?”, 20) called at /usr/local/share/perl/5.22.1/DBIx/SearchBuilder/Record.pm line 714
DBIx::SearchBuilder::Record::__Value(RT::CustomField=HASH(0xa4d2f08), “CanonicalizeClass”) called at /opt/rt4/bin/…/lib/RT/Record.pm line 610
RT::Record::__Value(RT::CustomField=HASH(0xa4d2f08), “CanonicalizeClass”) called at /opt/rt4/bin/…/lib/RT/CustomField.pm line 1162
RT::CustomField::_Value(RT::CustomField=HASH(0xa4d2f08), “CanonicalizeClass”) called at /usr/local/share/perl/5.22.1/DBIx/SearchBuilder/Record.pm line 423
DBIx::SearchBuilder::Record::ANON(RT::CustomField=HASH(0xa4d2f08)) called at /opt/rt4/bin/…/lib/RT/CustomField.pm line 1834
RT::CustomField::_CanonicalizeValueWithCanonicalizer(RT::CustomField=HASH(0xa4d2f08), HASH(0xa4d2cb0)) called at /opt/rt4/bin/…/lib/RT/CustomField.pm line 1823
RT::CustomField::_CanonicalizeValue(RT::CustomField=HASH(0xa4d2f08), HASH(0xa4d2cb0)) called at /opt/rt4/bin/…/lib/RT/ObjectCustomFieldValues.pm line 173
RT::ObjectCustomFieldValues::HasEntry(RT::ObjectCustomFieldValues=HASH(0xa4d48b8), “starbucks”, undef) called at /opt/rt4/bin/…/lib/RT/Record.pm line 2004
RT::Record::_AddCustomFieldValue(RT::Ticket=HASH(0xa3bccf0), “Field”, RT::CustomField=HASH(0xa3c7578), “Value”, “starbucks”, “RecordTransaction”, 0) called at /opt/rt4/bin/…/lib/RT/Record.pm line 1925
RT::Record::AddCustomFieldValue(RT::Ticket=HASH(0xa3bccf0), “Field”, RT::CustomField=HASH(0xa3c7578), “Value”, “starbucks”, “RecordTransaction”, 0) called at /opt/rt4/bin/…/lib/RT/Action/CopesanUpdateCustomFields/StarBucks.pm line 390
RT::Action::CopesanUpdateCustomFields::StarBucks::Prepare(RT::Action::CopesanUpdateCustomFields::StarBucks=HASH(0xa3ca8d8)) called at /opt/rt4/bin/rt-crontool line 228
main::process(RT::Ticket=HASH(0xa3bccf0), RT::Transaction=HASH(0xa3ccd18), undef) called at /opt/rt4/bin/rt-crontool line 167 (/usr/local/share/perl/5.22.1/Carp.pm:170)

If you log into the database directly, what does the definition of the CustomFIelds table look like? Ie if you’re using MySQL or MariaDB, do a desc CustomFields and see what the result is.

Here are the results. I don’t know what I am looking to be the issue.

    Field       Type            Null    Key Default Extra
id				int(11)	        NO		PRI	NULL	auto_increment
Name			varchar(200)    YES			NULL
Type			varchar(200)    YES			NULL
RenderType		varchar(64)		YES			NULL
MaxValues		int(11)			YES			NULL
Pattern			text			YES			NULL
BasedOn			int(11)			YES			NULL
ValuesClass		varchar(64)		YES			NULL
Description		varchar(255)    YES			NULL
SortOrder		int(11)			NO			0	
LookupType		varchar(255)    NO			NULL
EntryHint	    varchar(255)    YES			NULL
Creator			int(11)			NO			0	
Created			datetime	    YES			NULL
LastUpdatedBy	int(11)			NO			0	
LastUpdated		datetime	    YES			NULL
Disabled		smallint(6)		NO			0

OK, comparing that table to the table I have in a 4.4.4 installation, its missing two columns - CanonicalizeClass and UniqueValues. This must have been missed out some how in the migration from 4.2 to 4.4. You could try using these two commands on the MySQL/MariaDB command line to add them:

alter table CustomFields add column UniqueValues smallint(6) not null default 0 after EntryHint;


alter table CustomFields add column CanonicalizeClass varchar(64) after UniqueValues;

That should put them back into the table in the same place they are in mine.

Absolutely outstanding that fixed the issue.

And thanks for all the help.