Project

General

Profile

Actions

Defect #35265

closed

Readmine: Create IssuePriority Enumeration give error

Added by Rajarshi Das almost 3 years ago. Updated over 2 years ago.

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

0%

Estimated time:
Resolution:
Cant reproduce
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

Actions #1

Updated by Go MAEDA almost 3 years ago

Could you paste errors in production.log?

Actions #2

Updated by Holger Just almost 3 years ago

  • Status changed from New to Needs feedback
Actions #3

Updated by Marius BÄ‚LTEANU over 2 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Cant reproduce

Please reopen with the requested info if you still experience this issue.

Actions

Also available in: Atom PDF