Cannot access journal events -redmine docker + SQL Server

Added by Yoann Thery about 1 month ago


I am trying to use redmine + SQL Server to migrate the actual redmine app used in my compagny to docker.
I have to specify I am new to redmine docker and ruby.

The problem is the following : I have no journal in any of my issues.

And when I try to update an issue (like reassigning it) I have the following error :

I, [2019-07-04T08:48:51.959086 #1]  INFO -- : Started PATCH "/issues/1659" for at 2019-07-04 08:48:51 +0000
I, [2019-07-04T08:48:51.959769 #1]  INFO -- : Processing by IssuesController#update as HTML
I, [2019-07-04T08:48:51.959827 #1]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"CnaFnf2BeC/F/GnvQ5XT0h22fsIlsi6SSd16Blaf4Ck4EPInTezfWrNDcOKRUg0TcqvWIT9ZkyeFgGIqUo/XMA==", "form_update_triggered_by"=>"", "issue"=>{"is_private"=>"0", "project_id"=>"35", "subject"=>"Genio", "description"=>"", "status_id"=>"14", "priority_id"=>"4", "assigned_to_id"=>"61", "fixed_version_id"=>"29", "parent_issue_id"=>"", "start_date"=>"2012-10-30", "due_date"=>"", "estimated_hours"=>"", "custom_field_values"=>{"1"=>"Simple", "3"=>"GENIO", "5"=>"", "6"=>"1.0"}, "notes"=>"", "private_notes"=>"0", "lock_version"=>"12"}, "last_journal_id"=>"", "commit"=>"Soumettre", "prev_issue_id"=>"1722", "issue_position"=>"26", "issue_count"=>"26", "id"=>"1659"}
I, [2019-07-04T08:48:52.055388 #1]  INFO -- :   Current user: admin (id=1)
I, [2019-07-04T08:48:52.072134 #1]  INFO -- : Completed 500 Internal Server Error in 112ms (ActiveRecord: 44.2ms)
F, [2019-07-04T08:48:52.072527 #1] FATAL -- :
F, [2019-07-04T08:48:52.072544 #1] FATAL -- : ActiveRecord::DangerousAttributeError (changes is defined by Active Record. Check to make sure that you don't have an attribute or method with the same name.):
F, [2019-07-04T08:48:52.072553 #1] FATAL -- :
F, [2019-07-04T08:48:52.072562 #1] FATAL -- : app/models/journal.rb:68:in `initialize'
app/models/issue.rb:814:in `init_journal'
app/controllers/issues_controller.rb:464:in `update_issue_from_params'
app/controllers/issues_controller.rb:165:in `update'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

I guess both symptoms are related since they both concern the journals table

I tried to pass the command to give you détails about my infrastructure but I got this :

root@fc7e805d5089:/usr/src/redmine# RAILS_ENV=production script/about
bash: script/about: No such file or directory

Here is my docker ps :

PS C:\Users\thery> docker ps -a

CONTAINER ID        IMAGE                                               COMMAND                  CREATED             STATUS                     PORTS                    NAMES
64e3d615f263        redmine                                             "/docker-entrypoint.…"   7 days ago          Up 3 minutes     >3000/tcp   redmine1
8e8ea027c281   "/opt/mssql/bin/sqls…"   7 days ago          Up 2 hours       >1433/tcp   sql

I had through nmigration to do a few manual action, especially at the database level (renaming columns) to make the server start:
EXEC sp_rename 'journals.activity_type', 'journalized_type', 'COLUMN';
EXEC sp_rename 'journals.journaled_id', 'journalized_id', 'COLUMN';

(no idea if this can be related)

Replies (1)

RE: Cannot access journal events -redmine docker + SQL Server - Added by Yoann Thery about 1 month ago

As far as I undferstand I have a very old database dumpa and tables have changed a lot. the changes column in the journal table doesnt exists any more and is transferred to journal_details table. I'll have to migrate the datas from those tables to new one, I dont find any rb script that should do it.