Defect #1257
Sprint link in calendar redirects to localhost
Description
Hi,
I'm using 0.15.0 scrum plugin. My Redmine is running on a server on port 3000, but I can access it via nginx proxypass. The problem is that link to sprint in calendar points to localhost.
My nginx settings:
server {
server_name myinternaldomain.com;
location / {
proxy_pass http://localhost:3000;
proxy_redirect default;
proxy_cookie_domain localhost myinternaldomain.com;
}
}
All other Redmine links (including calendar ones) works well. Just sprint link is broken.
Files
Subtasks
Updated by Emilio González Montaña almost 9 years ago
I cannot reproduce this, please go to plugin folder and open this file lib/scrum/calendars_controller_patch.rb, change this (at the end of the file):
sprints << {:name => sprint.name,
:url => url_for(:controller => :sprints,
:action => :show,
:id => sprint.id),
:day => sprint.send(date_field).day,
:week => sprint.send(date_field).cweek,
:start => start}
With this new code:
sprints << {:name => sprint.name,
:url => url_for(sprint),
:day => sprint.send(date_field).day,
:week => sprint.send(date_field).cweek,
:start => start}
If it works let me know and I will fix the sources.
Updated by Bartosz Firyn almost 9 years ago
- File 2.png 2.png added
- File 0001-Fix-broken-sprint-link-in-calendar.patch 0001-Fix-broken-sprint-link-in-calendar.patch added
Hi Emilio,
Thank you for pointing me to the source code. The change you proposed is not working, but after reading more about function url_for(..):
http://apidock.com/rails/ActionView/RoutingUrlFor/url_for
I added :only_path option set to true and now it works well:

Versus how it was before:

Code:
:url => url_for(:controller => :sprints,
:action => :show,
:id => sprint.id,
:only_path => true),
Attached I'm sending patch file.
Updated by Emilio González Montaña almost 9 years ago
- Target version set to Scrum v0.16.2
- Sprint set to Sprint 32
Updated by Emilio González Montaña almost 9 years ago
- Status changed from In progress to Resolved