Defect #23959

Issue copy form load wrong data when user can't create issues in the copied issue project

Added by Lucas Arnaud about 1 year ago. Updated 12 months ago.

Status:Needs feedbackStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution: Affected version:

Description

When a user tries to copy an issue in a project they are not allowed to create issues, the first available project in combo box is selected but all form data rendered (custom fields, assignable users, possible watchers, etc) are based on the current.

In order to load the selected project data, the user have to select a different project and then the first one to force to reload the form.

The following patch solves this bug by setting the issue project to the first "@issue.allowed_target_projects" in IssuesController#build_new_issue_from_params

Fixing-issues-form-load-when-copying-issue-from-a-pr.patch Magnifier (1.11 KB) Lucas Arnaud, 2016-09-29 17:09

Fixing-issues-form-load-when-copying-issue-from-a-pr.patch Magnifier - Fixed version (1.12 KB) Lucas Arnaud, 2016-09-29 21:53

History

#1 Updated by Lucas Arnaud about 1 year ago

The previous patch was wrong. I am sending the fixed version.

These are my environment settings:
  Redmine version                3.3.0.stable
  Ruby version                   2.3.1-p112 (2016-04-26) [x86_64-linux]
  Rails version                  4.2.6
  Environment                    development
  Database adapter               PostgreSQL

#2 Updated by Toshi MARUYAMA 12 months ago

  • Tracker changed from Patch to Defect

#3 Updated by Toshi MARUYAMA 12 months ago

  • Category set to Issues
  • Status changed from New to Needs feedback

Lucas Arnaud wrote:

When a user tries to copy an issue in a project they are not allowed to create issues, the first available project in combo box is selected but all form data rendered (custom fields, assignable users, possible watchers, etc) are based on the current.

Sorry, I cannot reproduce on 3.3.1.
Please tell us how to reproduce.

Also available in: Atom PDF