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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
9acaec7a
Commit
9acaec7a
authored
Aug 20, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Searching for issue/mr by iid in markdown
parent
a73e068c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/project.rb
app/models/project.rb
+1
-1
lib/gitlab/markdown.rb
lib/gitlab/markdown.rb
+1
-1
No files found.
app/models/project.rb
View file @
9acaec7a
...
...
@@ -201,7 +201,7 @@ class Project < ActiveRecord::Base
def
issue_exists?
(
issue_id
)
if
used_default_issues_tracker?
self
.
issues
.
where
(
id:
issue_id
).
first
.
present?
self
.
issues
.
where
(
i
i
d:
issue_id
).
first
.
present?
else
true
end
...
...
lib/gitlab/markdown.rb
View file @
9acaec7a
...
...
@@ -181,7 +181,7 @@ module Gitlab
end
def
reference_merge_request
(
identifier
)
if
merge_request
=
@project
.
merge_requests
.
where
(
id:
identifier
).
first
if
merge_request
=
@project
.
merge_requests
.
where
(
i
i
d:
identifier
).
first
link_to
(
"!
#{
identifier
}
"
,
project_merge_request_url
(
@project
,
merge_request
),
html_options
.
merge
(
title:
"Merge Request:
#{
merge_request
.
title
}
"
,
class:
"gfm gfm-merge_request
#{
html_options
[
:class
]
}
"
))
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