Commit c623b8ac authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Change title of backlog list to Open

Right now this is just overriden in the frontend and led to bugs in
other components where we forgot to override the title.

This moves the logic to the backend so that we don't have to do those
overrides.
parent a47d17f6
......@@ -34,7 +34,13 @@ module Boards
end
def title
label? ? label.name : list_type.humanize
if label?
label.name
elsif backlog?
_('Open')
else
list_type.humanize
end
end
private
......
---
title: Rename Backlog list to Open in issue boards
merge_request: 51562
author:
type: fixed
......@@ -68,6 +68,12 @@ RSpec.shared_examples 'boards listable model' do |list_factory|
expect(subject.title).to eq 'Development'
end
it 'returns Open when list_type is set to backlog' do
subject.list_type = :backlog
expect(subject.title).to eq 'Open'
end
it 'returns Closed when list_type is set to closed' do
subject.list_type = :closed
......
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