4/debian-10/plugins/redmine_issue_templates/app/models/issue_template.rb
# return projects that use this template
return projects that use this template
return projects that use this template
def used_projects
    return [] unless enabled_sharing
    projects = project.descendants
                      .joins(:trackers, :enabled_modules).merge(Tracker.where(id: tracker_id)).merge(EnabledModule.where(name: 'issue_templates'))
    IssueTemplateSetting.where(project_id: projects).inherit_templates.select(:project_id)
  end
def used_projects return [ ] unless enabled_sharing projects = project . descendants . joins ( :trackers , :enabled_modules ) . merge ( Tracker . where ( id : tracker_id ) ) . merge ( EnabledModule . where ( name : 'issue_templates' ) ) IssueTemplateSetting . where ( project_id : projects ) . inherit_templates . select ( :project_id ) end
return projects that use this template
return projects that use this template