Defect #27066
closedissue parents is wrong
Added by Randa Bustami about 8 years ago. Updated about 8 years ago.
0%
Description
i  added a sub task to a task but when i save it appeared under another task
example
under task  69759 i had added task 253921 but it appeared under task  69755 !
pls check  screen shots attached.
Files
| parents task.PNG (69 KB) parents task.PNG | Randa Bustami, 2017-09-24 13:35 | ||
| subtask.PNG (64.3 KB) subtask.PNG | Randa Bustami, 2017-09-24 13:35 | ||
| remdine info.PNG (32.7 KB) remdine info.PNG | redmine version | Randa Bustami, 2017-09-25 08:05 | |
| 2017-09-25_09-48-27.png (54.5 KB) 2017-09-25_09-48-27.png | line we changed | Randa Bustami, 2017-09-25 09:51 | |
| rebuild tree result.png (34.9 KB) rebuild tree result.png | Randa Bustami, 2017-09-25 12:37 | ||
| single rebuild tree.png (103 KB) single rebuild tree.png | Randa Bustami, 2017-09-25 12:39 | ||
| REBUILD SINGLE TREE.png (33.7 KB) REBUILD SINGLE TREE.png | Randa Bustami, 2017-09-25 14:17 | ||
| REBUILD TREE.png (33.4 KB) REBUILD TREE.png | Randa Bustami, 2017-09-25 14:17 | ||
| rebuild tree (2).png (31 KB) rebuild tree (2).png | Randa Bustami, 2017-09-26 11:12 | ||
| rebuid single tree2.png (33.6 KB) rebuid single tree2.png | Randa Bustami, 2017-09-26 11:12 | ||
| revert changes.png (43 KB) revert changes.png | Randa Bustami, 2017-09-26 12:58 | 
Related issues
       Updated by Toshi MARUYAMA about 8 years ago
      Updated by Toshi MARUYAMA about 8 years ago
      
    
    - Status changed from New to Needs feedback
Please see submissions.
       Updated by Randa Bustami about 8 years ago
      Updated by Randa Bustami about 8 years ago
      
    
    - File remdine info.PNG remdine info.PNG added
attached the redmine version version is this enough to trace the issue ?
       Updated by Toshi MARUYAMA about 8 years ago
      Updated by Toshi MARUYAMA about 8 years ago
      
    
    Could you try "Issues#rebuild_tree!" of "Issues#rebuild_single_tree!"?
source:tags/3.4.2/lib/redmine/nested_set/issue_nested_set.rb#L174
       Updated by Randa Bustami about 8 years ago
      Updated by Randa Bustami about 8 years ago
      
    
    - File 2017-09-25_09-48-27.png 2017-09-25_09-48-27.png added
we did the following:
1- go to folder /lib/ under the main folder of redmine then to folder / redmine/  then /nested_set/ then we open file named " issue_nested_set.rb" then we go to line #L174
and change  rebuild_tree!"  to be "rebuild_single_tree!" ( pls see attached screenshot)
2- save file
3- restart redmine
4- check the issue its still in the wrong place 
  also i want to ask what is the purpose of tags folder  we go directly to lib folder
       Updated by Toshi MARUYAMA about 8 years ago
      Updated by Toshi MARUYAMA about 8 years ago
      
    
    Sorry for my typo.
Could you try "Issue#rebuild_tree!"
ofor "Issue#rebuild_single_tree!"?
Please revert your change.
On your console try:
$ RAILS_ENV=production rails runner 'Issue.rebuild_tree!'
or
$ RAILS_ENV=production rails runner 'Issue.rebuild_single_tree!(1)'
Change "1" to your parent issue id.
       Updated by Randa Bustami about 8 years ago
      Updated by Randa Bustami about 8 years ago
      
    
    - File rebuild tree result.png rebuild tree result.png added
- File single rebuild tree.png single rebuild tree.png added
we revert the changes and restart redmine 
we tried the first command $ RAILS_ENV=production rails runner 'Issue.rebuild_tree!' but it give us error message (attached screen shot)
we restart  redmine and check still have wrong parents
we tried sencond command with the issue ID itself 253921   but it give us error message (attached screen shot)
we restart  redmine and check still have wrong parents
pls advise
       Updated by Toshi MARUYAMA about 8 years ago
      Updated by Toshi MARUYAMA about 8 years ago
      
    
    Try:
$ RAILS_ENV=production bundle exec rails runner 'Issue.rebuild_tree!'
or
$ RAILS_ENV=production bundle exec rails runner 'Issue.rebuild_single_tree!(1)'
       Updated by Randa Bustami about 8 years ago
      Updated by Randa Bustami about 8 years ago
      
    
    - File REBUILD SINGLE TREE.png REBUILD SINGLE TREE.png added
- File REBUILD TREE.png REBUILD TREE.png added
We executed the new commands but still the same error message
pls check attached screenshots
       Updated by Toshi MARUYAMA about 8 years ago
      Updated by Toshi MARUYAMA about 8 years ago
      
    
    Try:
$ RAILS_ENV=production bundle exec ruby bin/rails runner 'Issue.rebuild_tree!'
or
$ RAILS_ENV=production bundle exec ruby bin/rails runner 'Issue.rebuild_single_tree!(1)'
       Updated by Randa Bustami about 8 years ago
      Updated by Randa Bustami about 8 years ago
      
    
    - File rebuild tree (2).png rebuild tree (2).png added
- File rebuid single tree2.png rebuid single tree2.png added
we execute the 2 command and attached the result
the rebuild tree command executed but it give error message
the rebuild single tree still cannot find it 
 this is critical issue for us where we build the structure of our products and must have the correct tree at view (its correct at the edit !)
       Updated by Randa Bustami about 8 years ago
      Updated by Randa Bustami about 8 years ago
      
    
    - File revert changes.png revert changes.png added
yes we did.
pls see attached screen for  the inside code of the file
       Updated by Toshi MARUYAMA about 8 years ago
      Updated by Toshi MARUYAMA about 8 years ago
      
    
    Randa Bustami wrote:
yes we did.
It is wrong.
See source:tags/3.4.2/lib/redmine/nested_set/issue_nested_set.rb#L174
       Updated by Randa Bustami about 8 years ago
      Updated by Randa Bustami about 8 years ago
      
    
    sorry i didn't get your point
what is exactly the wrong ? 
i compared the 2 code its different ;the file you send me the link and the picture i sent you, the code it different
so how i can fix it in our file?
many thanks for your help i do appreciated
       Updated by Randa Bustami about 8 years ago
      Updated by Randa Bustami about 8 years ago
      
    
    please note we didn't change any code, we use the standard files  remdine team release 
how come the code of the file we have different from the code here  " source:tags/3.4.2/lib/redmine/nested_set/issue_nested_set.rb#L174"
       Updated by Toshi MARUYAMA about 8 years ago
      Updated by Toshi MARUYAMA about 8 years ago
      
    
    - Status changed from Needs feedback to Closed
Please look your source code carefully. rebuild_tree should be no argument.
Please use forum for question.
We don't provide any technical support for specific environment.
I think your issue tree was broken from long ago.
Recent Redmine prevents it.
       Updated by Randa Bustami about 8 years ago
      Updated by Randa Bustami about 8 years ago
      
    
    we had installed the version again  from the redmine and the issue is solved
many thanks for your help
       Updated by Tomoko  Shimizu over 7 years ago
      Updated by Tomoko  Shimizu over 7 years ago
      
    
    - Copied to Defect #28240: Issue parents are getting set incorrectly added
       Updated by Mischa The Evil over 7 years ago
      Updated by Mischa The Evil over 7 years ago
      
    
    - Copied to deleted (Defect #28240: Issue parents are getting set incorrectly)
       Updated by Mischa The Evil over 7 years ago
      Updated by Mischa The Evil over 7 years ago
      
    
    - Related to Defect #28240: Issue parents are getting set incorrectly added