Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
redmine_v2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
redmine_v2
Commits
d98ddaaa
Commit
d98ddaaa
authored
Apr 18, 2019
by
Hiếu Lê
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip auto delete with some conditions
parent
749bf6af
Pipeline
#69
canceled with stages
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
app/controllers/issues_controller.rb
+9
-1
No files found.
app/controllers/issues_controller.rb
View file @
d98ddaaa
...
@@ -632,7 +632,15 @@ class IssuesController < ApplicationController
...
@@ -632,7 +632,15 @@ class IssuesController < ApplicationController
return
if
@issue
.
tracker_id
!=
3
#Support
return
if
@issue
.
tracker_id
!=
3
#Support
#Remove subtasks when change from User Story to Support
#Remove subtasks when change from User Story to Support
Issue
.
where
(
tracker_id:
8
,
parent_id:
@issue
.
id
).
delete_all
tasks
=
Issue
.
where
(
tracker_id:
8
,
parent_id:
@issue
.
id
)
tasks
.
each
do
|
task
|
next
if
task
.
description
.
present?
next
if
task
.
attachments
.
present?
next
if
task
.
time_entries
.
present?
next
if
task
.
notes
.
present?
next
if
task
.
journals
.
present?
task
.
delete
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment