Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

got 500 error when i click 'sprints' menu #1147

Open
namjae opened this issue Aug 21, 2017 · 1 comment
Open

got 500 error when i click 'sprints' menu #1147

namjae opened this issue Aug 21, 2017 · 1 comment

Comments

@namjae
Copy link

namjae commented Aug 21, 2017

hi, i'm using @TheMagician1 's fork with redmine 3.4.2.stable.

got following error when i click 'sprints' menu

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

Back

log/production.log:

Started GET "/rb/sprints/infra" for 211.63.148.155 at 2017-08-21 03:06:12 +0900
Processing by RbSprintsRoadmapController#index as HTML
  Parameters: {"project_id"=>"infra"}
  Current user: dhpark (id=6)
Options: {:project=>3, :sprint=>1, :release=>nil}
SprintId: [1]; ReleaseId: ; TrackerId: [7]; GenScope: false;
Options: {:project=>3, :sprint=>1, :release=>nil}
SprintId: [1]; ReleaseId: ; TrackerId: [7]; GenScope: false;
  Rendered plugins/redmine_backlogs/app/views/rb_sprints_roadmap/_overview.html.erb (8.5ms)
  Rendered plugins/redmine_backlogs/app/views/rb_sprints_roadmap/index.html.erb within layouts/base (12.2ms)
Completed 500 Internal Server Error in 28ms (ActiveRecord: 6.9ms)

ActionView::Template::Error (PG::GroupingError: ERROR:  column "issues.position" must appear in the GROUP BY clause or be used in an aggregate function
LINE 4: ...d IN (1)) GROUP BY "issues"."status_id"  ORDER BY issues.pos...
                                                             ^
: SELECT COUNT(*) AS count_all, "issues"."status_id" AS issues_status_id FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" WHERE (projects.status <> 9 AND EXISTS (SELECT 1 AS one FROM enabled_modules em WHERE em.project_id = projects.id AND em.name='issue_tracking')) AND (
        project_id = 3
        and tracker_id in (7)
        and fixed_version_id IN (1)) GROUP BY "issues"."status_id"  ORDER BY issues.position):
    19: </ul>
    20: <% end %>
    21: 
    22: <% if version.issues_count > 0 %>
    23:     <%= progress_bar([version.closed_percent, version.completed_percent],
    24:                      :titles =>
    25:                        ["%s: %0.0f%" % [l(:label_closed_issues_plural), version.closed_percent],
  plugins/redmine_backlogs/app/models/rb_sprint.rb:162:in `load_issue_counts'
  app/models/version.rb:168:in `issues_count'
  plugins/redmine_backlogs/app/views/rb_sprints_roadmap/_overview.html.erb:22:in `_plugins_redmine_backlogs_app_views_rb_sprints_roadmap__overview_html_erb___4415765111336970270_70105918376660'
  plugins/redmine_backlogs/app/views/rb_sprints_roadmap/index.html.erb:31:in `block in _plugins_redmine_backlogs_app_views_rb_sprints_roadmap_index_html_erb__153815755200380439_70105919134840'
  plugins/redmine_backlogs/app/views/rb_sprints_roadmap/index.html.erb:11:in `each'
  plugins/redmine_backlogs/app/views/rb_sprints_roadmap/index.html.erb:11:in `_plugins_redmine_backlogs_app_views_rb_sprints_roadmap_index_html_erb__153815755200380439_70105919134840'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

my environment:

Environment:
  Redmine version                3.4.2.stable
  Ruby version                   2.3.1-p112 (2016-04-26) [x86_64-linux-gnu]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               PostgreSQL
SCM:
  Git                            2.7.4
  Filesystem                     
Redmine plugins:
  redmine_backlogs               v2.0.2
@cure
Copy link

cure commented Oct 14, 2017

You can comment out the definition of load_issue_counts in app/models/rb_sprint.rb to make this problem go away.

Note that you should file this issue on @TheMagician1 's fork !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants