When project moved, original image references are broken

Summary

  • The issue images are broken when the project is moved from one group to another group.
  • In my particular case I moved it from group/sub-group/project to newGroup/project

Steps to reproduce

  • Create a project in under any group/sub-group
  • Create an issue and upload an image in the description
  • Move the project to a newGroup
  • Now the images in the issue is broken.

What is the current bug behavior?

I'm not sure if this bug exists for all moved projects or for my particular case.

  • The image URL when I open it in the new tab does a 302 redirect to a wrong URL
  • If the URL was https://mydomain.com/group/sub-group/project/uploads/<some-hash>/filename.png
  • It does a 302 to https://mydomain.com/uploads/newGroup/project/<some-hash>/filename.png.html
  • The /uploads came at the beginning of the path, and it ends with .html

What is the expected correct behavior?

  • It should do a 302 to https://mydomain.com/newGroup/project/uploads/<some-hash>/filename.png

Results of GitLab environment info

Expand for output related to GitLab environment info

pastedImage

Results of GitLab application Check

Expand for output related to the GitLab application check

Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.17.1) Git user has default SSH configuration? ... yes Active users: ... 303

Checking GitLab ... Finished

Edited Oct 09, 2018 by Mark Fletcher
Assignee Loading
Time tracking Loading