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
3ad10d40
Commit
3ad10d40
authored
Apr 06, 2021
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize issue creation
parent
c9bb2ad6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/services/issuable_base_service.rb
app/services/issuable_base_service.rb
+2
-0
app/services/issues/base_service.rb
app/services/issues/base_service.rb
+1
-1
No files found.
app/services/issuable_base_service.rb
View file @
3ad10d40
...
...
@@ -483,6 +483,8 @@ class IssuableBaseService < BaseService
# we need to check this because milestone from milestone_id param is displayed on "new" page
# where private project milestone could leak without this check
def
ensure_milestone_available
(
issuable
)
return
unless
issuable
.
supports_milestone?
&&
issuable
.
milestone_id
.
present?
issuable
.
milestone_id
=
nil
unless
issuable
.
milestone_available?
end
...
...
app/services/issues/base_service.rb
View file @
3ad10d40
...
...
@@ -52,7 +52,7 @@ module Issues
end
def
execute_hooks
(
issue
,
action
=
'open'
,
old_associations:
{})
issue_data
=
hook_data
(
issue
,
action
,
old_associations:
old_associations
)
issue_data
=
Gitlab
::
Lazy
.
new
{
hook_data
(
issue
,
action
,
old_associations:
old_associations
)
}
hooks_scope
=
issue
.
confidential?
?
:confidential_issue_hooks
:
:issue_hooks
issue
.
project
.
execute_hooks
(
issue_data
,
hooks_scope
)
issue
.
project
.
execute_services
(
issue_data
,
hooks_scope
)
...
...
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