Defect #9220

enabled related project changeset reference

Added by Takashi Okamoto over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:2011-09-10
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:-
Resolution:Invalid Affected version:1.2.1

Description

Hi,

I would like to update ticket by commit for related project(parent or child).

While check changesets.rb, I aware such code exists:

  def find_referenced_issue_by_id(id)
    return nil if id.blank?
    issue = Issue.find_by_id(id.to_i, :include => :project)
    if issue
      unless issue.project &&
                (project == issue.project || project.is_ancestor_of?(issue.project) ||
                 project.is_descendant_of?(issue.project))
        issue = nil
      end
    end
    issue
  end

However ":include => project" condition seems to prevent following code.

Why don't you permit referencing changesets for related project's scm?

regards,

Takashi Okamoto


Related issues

Duplicated by Redmine - Defect #9221: enabled related project changeset reference Closed 2011-09-10

History

#1 Updated by Etienne Massip over 7 years ago

Don't understand, is this really a defect or should you ask your question in Development forum?

:include option allows early (join) fetch of Issue.project property, AFAIR.

#2 Updated by Takashi Okamoto over 7 years ago

  • Status changed from New to Resolved

Sorry, I'm quite a new for RoR. And I didn't understand the code.

I found related tickets work without any modification.

thanks,

Takashi Okamoto

#3 Updated by Etienne Massip over 7 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

#4 Updated by Toshi MARUYAMA over 7 years ago

  • Category set to SCM

Also available in: Atom PDF