Project

General

Profile

Actions

Bug #2618

closed

xmera Omnia - Collection #2546: Third-Party module maintenance and bug-fixing

ActiveRecord::NotNullViolation with DMS project preferences

Added by liaham 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
11/21/2024
Due date:
11/25/2024
% Done:

100%

Estimated time:
Affected Version:
Compatible Redmine Version:
5.1.z, 6.0.z

Description

Project settings » DMS
Project Preferences -> DMS Attachments: Files & DMS (default), wen selecting Files the error below is thrown.

Logfile

Started POST "/projects/meldungen/dmsf/state" for 192.168.3.25 at 2024-11-06 16:33:35 +0100
Processing by DmsfStateController#user_pref_save as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"+FxLLCTfQY08sH4P+oh28+r6OBGQlWO/EKSFWt3aWs33Q7KW+sIZ80rr/Z6RGsVD/+X38d4vhj/RIax5yKkxPw==", "title_format"=>"", "act_as_attachable"=>"2", "default_dmsf_query"=>"", "commit"=>"Speichern", "id"=>"meldungen"}
   (1.3ms)  SELECT MAX(`tokens`.`updated_on`) FROM `tokens` WHERE `tokens`.`user_id` = 1 AND `tokens`.`value` = 'a871ad76c108e6fe41bb52ba11e9bd9c0c55ac68' AND `tokens`.`action` = 'session'
  ↳ app/models/user.rb:478:in `verify_session_token'
  Token Update All (14.3ms)  UPDATE `tokens` SET `tokens`.`updated_on` = '2024-11-06 16:33:35' WHERE `tokens`.`user_id` = 1 AND `tokens`.`value` = 'a871ad76c108e6fe41bb52ba11e9bd9c0c55ac68' AND `tokens`.`action` = 'session'
  ↳ app/models/user.rb:482:in `verify_session_token'
   (1.0ms)  SELECT MAX(`settings`.`updated_on`) FROM `settings`
  ↳ app/models/setting.rb:280:in `check_cache'
  User Load (0.4ms)  SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`status` = 1 AND `users`.`id` = 1 LIMIT 1
  ↳ app/controllers/application_controller.rb:118:in `find_current_user'
  Current user: admin (id=1)
  CustomMessageSetting Load (0.5ms)  SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'plugin_redmine_message_customize' ORDER BY `settings`.`id` DESC LIMIT 1
  ↳ app/models/setting.rb:363:in `find_or_default'
  Project Load (0.3ms)  SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'meldungen' LIMIT 1
  ↳ app/models/project.rb:347:in `find'
   (0.2ms)  SELECT `enabled_modules`.`name` FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 8
  ↳ app/models/project.rb:1302:in `allowed_permissions'
  Member Load (0.4ms)  SELECT `members`.* FROM `members` INNER JOIN `users` ON `users`.`id` = `members`.`user_id` WHERE `members`.`project_id` = 8 AND `users`.`type` = 'User' AND `users`.`status` = 1 AND `members`.`user_id` = 1 LIMIT 1
  ↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:29:in `user_pref_save'
  TRANSACTION (0.1ms)  BEGIN
   plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
  Principal Load (0.3ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
  ↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
  Project Load (0.2ms)  SELECT `projects`.* FROM `projects` WHERE `projects`.`id` = 8 LIMIT 1
  ↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
  Member Exists? (0.3ms)  SELECT 1 AS one FROM `members` WHERE `members`.`user_id` = 1 AND `members`.`id` != 2 AND `members`.`project_id` = 8 LIMIT 1
  ↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
  MemberRole Exists? (0.3ms)  SELECT 1 AS one FROM `member_roles` WHERE `member_roles`.`member_id` = 2 LIMIT 1
  ↳ app/models/member.rb:224:in `validate_role'
  Member Update (0.4ms)  UPDATE `members` SET `members`.`dmsf_mail_notification` = NULL WHERE `members`.`id` = 2
  ↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
  TRANSACTION (0.1ms)  ROLLBACK
  ↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
Completed 500 Internal Server Error in 48ms (ActiveRecord: 20.1ms | Allocations: 11000)


  
ActiveRecord::NotNullViolation (Mysql2::Error: Column 'dmsf_mail_notification' cannot be null):
  
plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'
plugins/redmine_dmsf/lib/redmine_dmsf/webdav/custom_middleware.rb:57:in `call'

Screenshot


Files

Actions #1

Updated by liaham 5 months ago

  • Status changed from New to In Progress
  • Assignee set to liaham
  • Start date set to 11/21/2024
  • Compatible Redmine Version 5.1.z, 6.0.z added
  • Compatible Redmine Version deleted (n/a)
Actions #2

Updated by liaham 4 months ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 80
  • Pull Request Link changed from n/a to https://github.com/danmunn/redmine_dmsf/pull/1567
Actions #3

Updated by liaham 4 months ago

Branch: bugfix/dmsf_mail_notification_cannot_be_null based on fa62c09d872a95a55741a256f4ef6fe93f138a97

Actions #4

Updated by liaham 4 months ago

  • Due date set to 11/25/2024
  • % Done changed from 80 to 90

PR is merged and planned for 4.0.0.

Actions #5

Updated by liaham 4 months ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100
  • Parent task set to #2546

Backported to be released in xO 4.3.1.

Actions #6

Updated by liaham 4 months ago

  • Target version changed from 3.2.4 to 3.2.5-xmr
Actions

Also available in: Atom PDF