Project

General

Profile

Subtasks shows wrong!

Added by Andrey Tatarnikov over 11 years ago

Hi,

I'm using last stable redmine as a stand alone installation.
Here is my script/about:

r2d2-tmp /opt/redmine # RAILS_ENV=production script/about
/var/lib/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.

Environment:
  Redmine version                          2.1.2.stable
  Ruby version                             1.9.3 (x86_64-linux)
  Rails version                            3.2.8
  Environment                              production
  Database adapter                         Mysql2
Redmine plugins:
  no plugin installed

I have issues stored like a tree (with parent-child relationship) with this structure:

2140
    2141
        2142
            2143
        2144
            2145
        2146
            2147
        2148
        2149
    2150
        1999
        2093
        2151
        2152
    2158

Here is this tree in database:

+------+-----------+---------+
| id   | parent_id | root_id |
+------+-----------+---------+
| 1999 |      2150 |    2140 |
| 2093 |      2150 |    2140 |
| 2140 |      NULL |    2140 |
| 2141 |      2140 |    2140 |
| 2142 |      2141 |    2140 |
| 2143 |      2142 |    2140 |
| 2144 |      2141 |    2140 |
| 2145 |      2144 |    2140 |
| 2146 |      2141 |    2140 |
| 2147 |      2146 |    2140 |
| 2148 |      2141 |    2140 |
| 2149 |      2141 |    2140 |
| 2150 |      2140 |    2140 |
| 2151 |      2150 |    2140 |
| 2152 |      2150 |    2140 |
| 2158 |      2140 |    2140 |
+------+-----------+---------+

But now when I'm looking at issue #2140 I see this: 2141.png
WTF is this? o.O Where is issue #2150? Why #2158 is a #2152 child?
If I go to #2150 edit page (Update button from issue page) I see that this issue is #2140 child. If I try to delete parentship (empty 'Parent task' field) and save, I get 404 error and these lines in production.log:

Started PUT "/issues/2150" for 10.4.2.5 at 2012-10-16 14:48:52 +0400
Processing by IssuesController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"ywh0xXtlgN7SSIfBTVqc6noh62qP6682h3kVHF52eCs=", "issue"=>{"is_private"=>"0", "project_id"=>"41", "tracker_id"=>"2", "subject"=>"Asset: SAM: Учет лицензий Per User", "description"=>"Это информационная заявка.\r\n\r\nУчет реализуется для следующих продуктов:\r\nMS Exchange\r\nMS SharePoint\r\nMS SQL Server\r\nIBM Lotus\r\nCitrix\r\nWindows Terminal", "status_id"=>"1", "assigned_to_id"=>"34", "parent_issue_id"=>"", "custom_field_values"=>{"1"=>""}, "lock_version"=>"2"}, "time_entry"=>{"hours"=>"", "activity_id"=>"", "comments"=>""}, "notes"=>"", "attachments"=>{"1"=>{"description"=>""}}, "last_journal_id"=>"5087", "commit"=>"Submit", "id"=>"2150"}
  Current user: a.tatarnikov (id=34)
Completed 500 Internal Server Error in 68ms

ActiveRecord::RecordNotFound (Couldn't find Issue without an ID):
  lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:497:in `block (2 levels) in move_to'
  lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:426:in `in_tenacious_transaction'
  lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:492:in `block in move_to'
  lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:491:in `move_to'
  lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:356:in `move_to_right_of'
  app/models/issue.rb:1057:in `update_nested_set_attributes'
  app/models/issue.rb:884:in `block in save_issue_with_child_records'
  app/models/issue.rb:871:in `save_issue_with_child_records'
  app/controllers/issues_controller.rb:171:in `update'

What the hell is happening here? O.O How could I fix it?
I'm also having exactly the same problem on another redmine installation - 1.0.2 from bitnami stack and now I'm moving to this new redmine.

2141.PNG (42.8 KB) 2141.PNG

Replies (2)

RE: Subtasks shows wrong! - Added by Sunny Milenov almost 10 years ago

I have exactly the same problem with

Environment:
Redmine version 2.4.3.stable

Is there a fix? I could not find an issue in the bug tracker.

RE: Subtasks shows wrong! - Added by Rajoj Maharjan over 9 years ago

I too have the same problem.
I'm using Redmine 1.1.1.stable.

Is there any solution to this problem???

Please help..

    (1-2/2)