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
e8b5d816
Commit
e8b5d816
authored
Feb 09, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix spec and added options to Issue
parent
181fd9b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
app/models/issue.rb
app/models/issue.rb
+6
-0
spec/features/issues/filter_by_weight_spec.rb
spec/features/issues/filter_by_weight_spec.rb
+1
-1
No files found.
app/models/issue.rb
View file @
e8b5d816
...
...
@@ -30,6 +30,8 @@ class Issue < ActiveRecord::Base
include
Elastic
::
IssuesSearch
WEIGHT_RANGE
=
1
..
9
WEIGHT_ANY
=
'Any Weight'
WEIGHT_NONE
=
'No Weight'
ActsAsTaggableOn
.
strict_case_match
=
true
...
...
@@ -123,4 +125,8 @@ class Issue < ActiveRecord::Base
note
.
all_references
(
current_user
).
merge_requests
end
.
uniq
.
select
{
|
mr
|
mr
.
open?
&&
mr
.
closes_issue?
(
self
)
}
end
def
self
.
weight_options
[
WEIGHT_ANY
,
WEIGHT_NONE
]
+
WEIGHT_RANGE
.
to_a
end
end
spec/features/issues/filter_by_weight_spec.rb
View file @
e8b5d816
...
...
@@ -43,6 +43,6 @@ feature 'Issue filtering by Weight', feature: true do
end
def
random_weight
Issue
::
WEIGHT_RANGE
.
sample
Issue
::
WEIGHT_RANGE
.
to_a
.
sample
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