Commit 065f93c8 by Nguyen Vo Huy Hoang

Only create the subtasks for a userstory with template_id 1

parent c5e74175
Pipeline #1519 failed with stages
in 0 seconds
...@@ -611,6 +611,8 @@ class IssuesController < ApplicationController ...@@ -611,6 +611,8 @@ class IssuesController < ApplicationController
# Auto create 8 subtasks (13/08/2018) # Auto create 8 subtasks (13/08/2018)
def auto_create_subtasks(issue) def auto_create_subtasks(issue)
return if @issue.tracker_id != 12 #User story return if @issue.tracker_id != 12 #User story
# only create the subtasks for a user story with a template_id 1
return if @issue.tracker_id == 12 && params[:issue_template].to_i != 1
return if Issue.any?{ |i| i.parent_id == @issue.id } #Issue has subtasks return if Issue.any?{ |i| i.parent_id == @issue.id } #Issue has subtasks
exclude_project_ids = [106, 107, 108, 109, 110, 111] #2zigexn exclude_project_ids = [106, 107, 108, 109, 110, 111] #2zigexn
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment