Defect #35265

Readmine: Create IssuePriority Enumeration give error

Added by Rajarshi Das 2 months ago. Updated 2 months ago.

Status:Needs feedbackStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution: Affected version:

Description

I am using readmin 4.2

while create a Issue Priority It give me error.

[46, 55] in aa/enumerations_controller.rb
46: def new
47: end
48:
49: def create
50: byebug
=> 51: if request.post? && @enumeration.save
52: flash[:notice] = l(:notice_successful_create)
53: redirect_to enumerations_path
54: else
55: render :action => 'new'
(byebug) @enumeration #<IssuePriority id: nil, name: "Normal", position: nil, is_default: false, type: "IssuePriority", active: true, project_id: nil, parent_id: nil, position_name: nil>

and then I saw the below error

(byebug) exception                                                                                                                                                                           #<ActiveRecord::StatementInvalid: Mysql2::Error: You can't specify target table 'enumerations' for update in FROM clause: UPDATE `enumerations` SET position = coalesce((
select position
from (select id, position from enumerations) as parent
where parent_id = parent.id), 1) WHERE `enumerations`.`type` IN ('IssuePriority') AND `enumerations`.`parent_id` IS NOT NULL ORDER BY `enumerations`.`position` ASC>

I am not able to create any enuumeration in redmine

any help

History

#1 Updated by Go MAEDA 2 months ago

Could you paste errors in production.log?

#2 Updated by Holger Just 2 months ago

  • Status changed from New to Needs feedback

Also available in: Atom PDF