Bug #1766
Updated by liaham over 1 year ago
🐛 Thanks for taking the time to fill out this bug report! 😊 ## What did you expect? I expect no HTML 500 status code when clicking on an edit button on top of the inheritance page for table calculation. ## What has happened instead? The HTML 500 status code was raised. ## What could be a possible solution? Do not allow to click the button link when no calculated result it there. ## How can we reproduce the problem? 1. Create a table which should inherit results to linked projects. 1. Visit a projects table page where the inherited result could be accepted. 1. Click on the first edit link in the first table on that page. 1. Get the exception. ## In what environment are you running the plugin? Please copy and paste your environment information as displayed in Administration » Information or run `bin/about` in the root dir of your Redmine instance. ## What browsers are you seeing the problem on? * [x] Firefox * [ ] Chrome * [ ] Safari ## Relevant log output ``` shell # Copy your log output (log/production.log) here Subject: [Exception] spreadsheet_row_results#new (NoMethodError) "undefined method `id' for nil:NilClass\n\n ... Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable A NoMethodError occurred in spreadsheet_row_results#new:=0D =0D undefined method `id' for nil:NilClass=0D =0D calculation_config_id: @calculation_config.i= d,=0D ^^= ^=0D plugins/redmine_table_calculation_inheritance/app/controllers/spreadshe= et_row_results_controller.rb:93:in `new_row'=0D =0D =0D -------------------------------=0D Introduction:=0D -------------------------------=0D =0D This is an automated email notification from xmera Omnia. =0D =0D When you recieve this email then something must went wrong. =0D =0D Don't panic we recived this notification too. =0D =0D Certainly, someone is already fixing the problem. :)=0D =0D Thany you very much for your help!!!=0D =0D -----=0D NOTE:=0D -----=0D If you won't support us anymore by making xmera Omnia better or won't r= ecive =0D these emails anymore than update your settings in =0D Administration =C2=BB Configurable plugins =C2=BB xmera Omnia Operation= s accordingly.=0D -----=0D =0D -------------------------------=0D Backtrace:=0D -------------------------------=0D =0D plugins/redmine_table_calculation_inheritance/app/controllers/spreadshe= et_row_results_controller.rb:93:in `new_row'=0D plugins/redmine_table_calculation_inheritance/app/controllers/spreadshe= et_row_results_controller.rb:37:in `new'=0D lib/redmine/sudo_mode.rb:61:in `sudo_mode'=0D =0D -------------------------------=0D Request:=0D -------------------------------=0D =0D * URL : http://(url)/projects/io015/spreadsheets/110/sprea= dsheet_row_results/new?spreadsheet_row_result%5Bspreadsheet_row_result%5D= %5Bcalculation_config_id%5D=3D1=0D * HTTP Method: GET=0D * IP address : 192.168.2.26=0D * Parameters : {"spreadsheet_row_result"=3D>{"spreadsheet_row_result"=3D= >{"calculation_config_id"=3D>"1"}}, "controller"=3D>"spreadsheet_row_resu= lts", "action"=3D>"new", "project_id"=3D>"io015", "spreadsheet_id"=3D>"11= 0"}=0D * Timestamp : 2023-10-09 11:22:51 UTC=0D * Server : 059bb8b0c5d9=0D * Rails root : (home)=0D * Process: 1=0D =0D ```