Commit 4f599491 authored by Jarka Kadlecova's avatar Jarka Kadlecova

Set all state as default for epics

parent 5cf10e2f
...@@ -9,6 +9,7 @@ class Groups::EpicsController < Groups::ApplicationController ...@@ -9,6 +9,7 @@ class Groups::EpicsController < Groups::ApplicationController
skip_before_action :labels skip_before_action :labels
def index def index
set_default_state
@epics = @issuables @epics = @issuables
respond_to do |format| respond_to do |format|
...@@ -65,4 +66,10 @@ class Groups::EpicsController < Groups::ApplicationController ...@@ -65,4 +66,10 @@ class Groups::EpicsController < Groups::ApplicationController
def preload_for_collection def preload_for_collection
@preload_for_collection ||= [:group, :author] @preload_for_collection ||= [:group, :author]
end end
# we need to override the default state which is opened for now because we don't have
# states for epics and need all as default for navigation to work correctly
def set_default_state
params[:state] = 'all'
end
end end
...@@ -19,9 +19,11 @@ class EpicsFinder < IssuableFinder ...@@ -19,9 +19,11 @@ class EpicsFinder < IssuableFinder
execute.count execute.count
end end
# we don't have states for epics for now but need this method # we don't have states for epics for now but need counts for all and opened
def count_by_state def count_by_state
{ all: row_count } {
all: row_count
}
end end
def group def group
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment