Custom Field is missing after update from 2.3.3 to 2.5.0
Added by Daniel Krusenbaum about 9 years ago
In our Redmine System we added an custom field. After testing a update to the new Version 2.5.0 this field is missing. The migration Script did not show errors. The System i use is a Windows 2003 Server and the Bitnami Redmine Stack, both installed in English. Any ideas what went wrong or an hint how it could be corrected?
About your application's environment Ruby version 1.9.3 (i386-mingw32) RubyGems version 1.8.24 Rack version 1.4 Rails version 3.2.17 Active Record version 3.2.17 Action Pack version 3.2.17 Active Resource version 3.2.17 Action Mailer version 3.2.17 Active Support version 3.2.17 Middleware Rack::Cache, ActionDispatch::Static, Rack::Lock, #<Act iveSupport::Cache::Strategy::LocalCache::Middleware:0x21ac590>, Rack::Runtime, R ack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispa tch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagemen t, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::C ookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch: :Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport, O penIdAuthentication Application root D:/BitNamiRedmineStack/apps/redmine/htdocs Environment production Database adapter mysql2 Database schema version 20140228130325
RE: Custom Field is missing after update from 2.3.3 to 2.5.0 - Added by Daniel Krusenbaum about 9 years ago
My solution so far is to create the custom field again on the update testing machine. Create an Backup of the MySQL DB and look in the custom fields section (custom_fields, custom_fields_projects and custom_fields_trackers). Then i copy the INSERT's statements in a new textfile. From the old Backup i took the INSERT section from the table custom_values. We only had one custom field so no remapping of a SYSID was necessary.
On a new test of the update i run the INSERT scripts after the migration scripts.
RE: Custom Field is missing after update from 2.3.3 to 2.5.0 - Added by Alex Stout about 9 years ago
I'm currently working on an update from 2.3.3 to 2.5.0 as well. There were some fairly significant changes to the custom fields. I copied the old database schema into my new database in a temporary schema `temp` This is the sql command I used to ensure compatibility between these tables.
insert into redmine.custom_fields ( id, type, name, field_format, possible_values, `regexp`, min_length, max_length, is_required, is_for_all, is_filter, position, searchable, default_value, editable, visible, multiple ) select id, type, name, field_format, possible_values, `regexp`, min_length, max_length, is_required, is_for_all, is_filter, position, searchable, default_value, editable, visible, multiple from temp.custom_fields;
I simply had to specify each common column. So far this seems to have worked getting each custom field from the old instance to the new one, but I only executed this about 30 minutes ago.
RE: Custom Field is missing after update from 2.3.3 to 2.5.0 - Added by Jean-Baptiste Barth about 9 years ago
There's nothing in migration scripts that seems to delete custom fields, is the field missing from the database completely or just not showing up in the web interface ? Could you give more informations about that custom field : especially which type (issue custom field I presume ?), does it have any length constraint, are you admin on the instance ?
The major thing that happened in redmine 2.5 is that custom fields now have a concept of "visibility". If it is broken I may be able to help you on that, and depending on your answers we may open an issue directly (core developers don't follow the forum a lot I think).
Thanks for your patience