Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ff85a006
Commit
ff85a006
authored
Oct 29, 2019
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move condition to a callback
Move the check to update the issue title to `after_create` callback
parent
6a5d8499
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ee/app/models/ee/issue.rb
ee/app/models/ee/issue.rb
+3
-3
No files found.
ee/app/models/ee/issue.rb
View file @
ff85a006
...
...
@@ -34,7 +34,7 @@ module EE
validates
:weight
,
allow_nil:
true
,
numericality:
{
greater_than_or_equal_to:
0
}
after_create
:update_generic_alert_title
_if_applicable
after_create
:update_generic_alert_title
,
if: :generic_alert_with_default_title?
end
class_methods
do
...
...
@@ -134,8 +134,8 @@ module EE
private
def
update_generic_alert_title
_if_applicable
update
(
title:
"
#{
title
}
#{
iid
}
"
)
if
generic_alert_with_default_title?
def
update_generic_alert_title
update
(
title:
"
#{
title
}
#{
iid
}
"
)
end
def
generic_alert_with_default_title?
...
...
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