diff options
author | Sean McGivern <sean@gitlab.com> | 2017-03-10 22:01:05 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-03-15 20:02:38 +0300 |
commit | 03dabc522e937f091ad30cc40034ffd6d19c7011 (patch) | |
tree | 683abccc734faf19b6f630ac8e26d8c50a9e64b2 /app/helpers | |
parent | 101fddfa9203fbcc96151e880a3a1241338a91f2 (diff) |
Allow filtering by all started milestones
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/issuables_helper.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index aad83731b87..a777db2826b 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -90,11 +90,14 @@ module IssuablesHelper end def milestone_dropdown_label(milestone_title, default_label = "Milestone") - if milestone_title == Milestone::Upcoming.name - milestone_title = Milestone::Upcoming.title - end + title = + case milestone_title + when Milestone::Upcoming.name then Milestone::Upcoming.title + when Milestone::Started.name then Milestone::Started.title + else milestone_title.presence + end - h(milestone_title.presence || default_label) + h(title || default_label) end def to_url_reference(issuable) |