Project

General

Profile

Actions

Defect #19873

closed

Problem in copying issue

Added by Petr Šourek almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hello,

we have a problem under redmine 3.0.3. Whethere we try to copy issue to another (open issue, click copy, change header/description) we get error 500 on the server. When I look into nginx log I see this:

App 79015 stderr: Started POST "/projects/cr55-wfdfa/issues" for 192.168.211.42 at 2015-05-18 09:43:32 +0200
App 79015 stderr: Processing by IssuesController#create as HTML
App 79015 stderr:   Parameters: {"uástka: 121\r\n5. vymazat pole Splatné dne\r\nEnter - dump", "status_id"=>"8", "priority_id"=>"3", "assigned_to_id"=>"10", "parent_issue_id"=>"", "start_date"=>"2015-05-15", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0", "custom_field_values"=>{"1"=>"SK4", "6"=>"018"}}, "link_copy"=>"1", "continue"=>"Create and continue", "project_id"=>"cr55-wfdfa"}
App 79015 stderr:   Current user: petr.sourek (id=9)
App 79015 stderr:   Rendered mailer/_issue.text.erb (2.5ms)
App 79015 stderr:   Rendered mailer/issue_add.text.erb within layouts/mailer (3.2ms)
App 79015 stderr:   Rendered mailer/_issue.html.erb (2.8ms)
App 79015 stderr:   Rendered mailer/issue_add.html.erb within layouts/mailer (3.3ms)
App 79015 stderr: PG::NotNullViolation: ERROR:  null value in column "private_notes" violates not-null constraint
App 79015 stderr: DETAIL:  Failing row contains (309, 134, Issue, 9, , 2015-05-18 09:43:33.28097+02, null).
App 79015 stderr: : INSERT INTO "journals" ("journalized_id", "journalized_type", "user_id", "notes", "created_on") VALUES ($1, $2, $3, $4, $5) RETURNING "id" 
App 79015 stderr: Completed 500 Internal Server Error in 652ms (ActiveRecord: 34.6ms)
App 79015 stderr: 
App 79015 stderr: ActiveRecord::StatementInvalid (PG::NotNullViolation: ERROR:  null value in column "private_notes" violates not-null constraint
App 79015 stderr: DETAIL:  Failing row contains (309, 134, Issue, 9, , 2015-05-18 09:43:33.28097+02, null).
App 79015 stderr: : INSERT INTO "journals" ("journalized_id", "journalized_type", "user_id", "notes", "created_on") VALUES ($1, $2, $3, $4, $5) RETURNING "id"):
App 79015 stderr:   app/models/journal.rb:67:in `save'
App 79015 stderr:   app/models/issue.rb:1497:in `relation_added'
App 79015 stderr:   app/models/issue_relation.rb:211:in `block in call_issues_callba
App 79015 stderr: ck'
App 79015 stderr:   app/models/issue_relation.rb:209:in `each'
App 79015 stderr:   app/models/issue_relation.rb:209:in `call_issues_callback'
App 79015 stderr:   app/models/issue_relation.rb:201:in `call_issues_relation_added_callback'
App 79015 stderr:   app/models/issue.rb:1358:in `after_create_from_copy'
App 79015 stderr:   app/models/issue.rb:175:in `create_or_update'
App 79015 stderr:   app/controllers/issues_controller.rb:141:in `create'

Versions:

OS:       10.1-RELEASE-p9 FreeBSD 10.1-RELEASE-p9 #1 r281932M: Fri Apr 24 17:52:20 CEST 2015
Nginx:    nginx-1.8.0_1,2
Database: postgresql94-server-9.4.1_1

Thank you,
Regards,
Petr Sourek

Actions #1

Updated by Petr Šourek almost 9 years ago

  • Status changed from New to Resolved

I have repaired it (dunno if it is correct) by logging into database and setting:

alter table only journals alter column private_notes set default false;

Actions #2

Updated by Jean-Philippe Lang almost 9 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

This column was created with default set to false: source:/trunk/db/migrate/20120930112914_add_journals_private_notes.rb

Actions

Also available in: Atom PDF