Commit c23e0426 authored by Scott Hampton's avatar Scott Hampton

Merge branch 'msj-mr-created-not-opened' into 'master'

Use "created" in epics and MRs

See merge request gitlab-org/gitlab!56391
parents 7f6604f5 f046847a
...@@ -175,7 +175,7 @@ const mixins = { ...@@ -175,7 +175,7 @@ const mixins = {
return __('Merged'); return __('Merged');
} }
return this.isOpen ? __('Opened') : __('Closed'); return this.isOpen ? __('Created') : __('Closed');
}, },
stateTimeInWords() { stateTimeInWords() {
if (this.isMerged) { if (this.isMerged) {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#{issuable_reference(merge_request)} #{issuable_reference(merge_request)}
%span.issuable-authored.d-none.d-sm-inline-block %span.issuable-authored.d-none.d-sm-inline-block
· ·
opened #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')} created #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')}
by #{link_to_member(@project, merge_request.author, avatar: false)} by #{link_to_member(@project, merge_request.author, avatar: false)}
= render_if_exists 'shared/issuable/gitlab_team_member_badge', author: merge_request.author = render_if_exists 'shared/issuable/gitlab_team_member_badge', author: merge_request.author
- if merge_request.milestone - if merge_request.milestone
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
= link_to issuable_path(issuable), data: { track_event: 'click_text', track_label: "#{issuable.class.name.downcase}_title", track_property: 'search_result' }, class: 'gl-w-full' do = link_to issuable_path(issuable), data: { track_event: 'click_text', track_label: "#{issuable.class.name.downcase}_title", track_property: 'search_result' }, class: 'gl-w-full' do
%span.term.str-truncated.gl-font-weight-bold.gl-ml-2= issuable.title %span.term.str-truncated.gl-font-weight-bold.gl-ml-2= issuable.title
.gl-text-gray-500.gl-my-3 .gl-text-gray-500.gl-my-3
= sprintf(s_(' %{project_name}#%{issuable_iid} · opened %{issuable_created} by %{author} · updated %{issuable_updated}'), { project_name: issuable.project.full_name, issuable_iid: issuable.iid, issuable_created: time_ago_with_tooltip(issuable.created_at, placement: 'bottom'), issuable_updated: time_ago_with_tooltip(issuable.updated_at, placement: 'bottom'), author: link_to_member(@project, issuable.author, avatar: false) }).html_safe = sprintf(s_(' %{project_name}#%{issuable_iid} · created %{issuable_created} by %{author} · updated %{issuable_updated}'), { project_name: issuable.project.full_name, issuable_iid: issuable.iid, issuable_created: time_ago_with_tooltip(issuable.created_at, placement: 'bottom'), issuable_updated: time_ago_with_tooltip(issuable.updated_at, placement: 'bottom'), author: link_to_member(@project, issuable.author, avatar: false) }).html_safe
.description.term.col-sm-10.gl-px-0 .description.term.col-sm-10.gl-px-0
= highlight_and_truncate_issuable(issuable, @search_term, @search_highlight) = highlight_and_truncate_issuable(issuable, @search_term, @search_highlight)
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%ul.nav-links.issues-state-filters.mobile-separator.nav.nav-tabs %ul.nav-links.issues-state-filters.mobile-separator.nav.nav-tabs
%li{ class: active_when(params[:state] == 'opened') }> %li{ class: active_when(params[:state] == 'opened') }>
= link_to page_filter_path(state: 'opened'), id: 'state-opened', title: _("Filter by %{page_context_word} that are currently opened.") % { page_context_word: page_context_word }, data: { state: 'opened' } do = link_to page_filter_path(state: 'opened'), id: 'state-opened', title: _("Filter by %{page_context_word} that are currently open.") % { page_context_word: page_context_word }, data: { state: 'opened' } do
#{issuables_state_counter_text(type, :opened, display_count)} #{issuables_state_counter_text(type, :opened, display_count)}
- if type == :merge_requests - if type == :merge_requests
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
}, },
epicTimeAgoString() { epicTimeAgoString() {
return this.isOpen return this.isOpen
? sprintf(__(`Opened %{epicTimeagoDate}`), { ? sprintf(__(`Created %{epicTimeagoDate}`), {
epicTimeagoDate: this.timeFormatted(this.epic.createdAt), epicTimeagoDate: this.timeFormatted(this.epic.createdAt),
}) })
: sprintf(__(`Closed %{epicTimeagoDate}`), { : sprintf(__(`Closed %{epicTimeagoDate}`), {
......
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
> >
<gl-icon name="eye-slash" class="icon" /> <gl-icon name="eye-slash" class="icon" />
</div> </div>
{{ __('Opened') }} {{ __('Created') }}
<timeago-tooltip :time="created" /> <timeago-tooltip :time="created" />
{{ __('by') }} {{ __('by') }}
<strong class="text-nowrap"> <strong class="text-nowrap">
......
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
}, },
computed: { computed: {
stateText() { stateText() {
return this.isOpen ? __('Opened') : __('Closed'); return this.isOpen ? __('Created') : __('Closed');
}, },
createdAtInWords() { createdAtInWords() {
return this.getTimestampInWords(this.createdAt); return this.getTimestampInWords(this.createdAt);
......
...@@ -11,7 +11,7 @@ export const TestCaseTabs = [ ...@@ -11,7 +11,7 @@ export const TestCaseTabs = [
id: 'state-opened', id: 'state-opened',
name: TestCaseStates.Opened, name: TestCaseStates.Opened,
title: __('Open'), title: __('Open'),
titleTooltip: __('Filter by test cases that are currently opened.'), titleTooltip: __('Filter by test cases that are currently open.'),
}, },
{ {
id: 'state-archived', id: 'state-archived',
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
= epic.to_reference(@group) = epic.to_reference(@group)
%span.issuable-authored.d-none.d-sm-inline-block %span.issuable-authored.d-none.d-sm-inline-block
&middot; &middot;
opened #{time_ago_with_tooltip(epic.created_at, placement: 'bottom')} created #{time_ago_with_tooltip(epic.created_at, placement: 'bottom')}
by #{link_to_member(@group, epic.author, avatar: false)} by #{link_to_member(@group, epic.author, avatar: false)}
= gitlab_team_member_badge(epic.author) = gitlab_team_member_badge(epic.author)
- if epic.start_date? || epic.end_date? - if epic.start_date? || epic.end_date?
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
= link_to group_epic_path(epic.group, epic), data: { track_event: 'click_text', track_label: 'epic_title', track_property: 'search_result' }, class: 'gl-w-full' do = link_to group_epic_path(epic.group, epic), data: { track_event: 'click_text', track_label: 'epic_title', track_property: 'search_result' }, class: 'gl-w-full' do
%span.term.str-truncated.gl-font-weight-bold.gl-ml-2= epic.title %span.term.str-truncated.gl-font-weight-bold.gl-ml-2= epic.title
.gl-text-gray-500.gl-my-3 .gl-text-gray-500.gl-my-3
= sprintf(s_('%{group_name}&%{epic_iid} &middot; opened %{epic_created} by %{author}'), { group_name: epic.group.full_name, epic_iid: epic.iid, epic_created: time_ago_with_tooltip(epic.created_at, placement: 'bottom'), author: link_to_member(@project, epic.author, avatar: false) }).html_safe = sprintf(s_('%{group_name}&%{epic_iid} &middot; created %{epic_created} by %{author}'), { group_name: epic.group.full_name, epic_iid: epic.iid, epic_created: time_ago_with_tooltip(epic.created_at, placement: 'bottom'), author: link_to_member(@project, epic.author, avatar: false) }).html_safe
- if epic.description.present? - if epic.description.present?
.description.term.col-sm-10.gl-px-0 .description.term.col-sm-10.gl-px-0
= truncate(epic.description, length: 200) = truncate(epic.description, length: 200)
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%ul.nav-links.mobile-separator.epics-state-filters %ul.nav-links.mobile-separator.epics-state-filters
%li{ class: active_when(params[:state] == 'opened') }> %li{ class: active_when(params[:state] == 'opened') }>
= link_to page_filter_path(state: 'opened'), id: 'state-opened', title: (_("Filter by %{issuable_type} that are currently opened.") % { issuable_type: page_context_word }), data: { state: 'opened' } do = link_to page_filter_path(state: 'opened'), id: 'state-opened', title: (_("Filter by %{issuable_type} that are currently open.") % { issuable_type: page_context_word }), data: { state: 'opened' } do
#{issuables_state_counter_text(type, :opened, display_count)} #{issuables_state_counter_text(type, :opened, display_count)}
%li{ class: active_when(params[:state] == 'closed') }> %li{ class: active_when(params[:state] == 'closed') }>
......
---
title: Use created in epics and MRs
merge_request: 56391
author:
type: fixed
...@@ -125,7 +125,7 @@ RSpec.describe 'Epic show', :js do ...@@ -125,7 +125,7 @@ RSpec.describe 'Epic show', :js do
it 'shows epic status, date and author in header' do it 'shows epic status, date and author in header' do
page.within('.epic-page-container .detail-page-header-body') do page.within('.epic-page-container .detail-page-header-body') do
expect(find('.issuable-status-box > span')).to have_content('Open') expect(find('.issuable-status-box > span')).to have_content('Open')
expect(find('.issuable-meta')).to have_content('Opened') expect(find('.issuable-meta')).to have_content('Created')
expect(find('.issuable-meta .js-user-avatar-link-username')).to have_content('Rick Sanchez') expect(find('.issuable-meta .js-user-avatar-link-username')).to have_content('Rick Sanchez')
end end
end end
......
...@@ -27,7 +27,7 @@ RSpec.describe 'epics list', :js do ...@@ -27,7 +27,7 @@ RSpec.describe 'epics list', :js do
it 'shows epics tabs for each status type' do it 'shows epics tabs for each status type' do
page.within('.epics-state-filters') do page.within('.epics-state-filters') do
expect(page).to have_selector('li > a#state-opened') expect(page).to have_selector('li > a#state-opened')
expect(find('li > a#state-opened')[:title]).to eq('Filter by epics that are currently opened.') expect(find('li > a#state-opened')[:title]).to eq('Filter by epics that are currently open.')
expect(page).to have_selector('li > a#state-closed') expect(page).to have_selector('li > a#state-closed')
expect(find('li > a#state-closed')[:title]).to eq('Filter by epics that are currently closed.') expect(find('li > a#state-closed')[:title]).to eq('Filter by epics that are currently closed.')
......
...@@ -48,13 +48,13 @@ describe('RelatedItemsTree', () => { ...@@ -48,13 +48,13 @@ describe('RelatedItemsTree', () => {
describe('computed', () => { describe('computed', () => {
describe('stateText', () => { describe('stateText', () => {
it('returns string `Opened` when `isOpen` prop is true', () => { it('returns string `Created` when `isOpen` prop is true', () => {
wrapper.setProps({ wrapper.setProps({
isOpen: true, isOpen: true,
}); });
return wrapper.vm.$nextTick(() => { return wrapper.vm.$nextTick(() => {
expect(wrapper.vm.stateText).toBe('Opened'); expect(wrapper.vm.stateText).toBe('Created');
}); });
}); });
......
...@@ -16,7 +16,7 @@ msgstr "" ...@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
msgid " %{project_name}#%{issuable_iid} &middot; opened %{issuable_created} by %{author} &middot; updated %{issuable_updated}" msgid " %{project_name}#%{issuable_iid} &middot; created %{issuable_created} by %{author} &middot; updated %{issuable_updated}"
msgstr "" msgstr ""
msgid " %{start} to %{end}" msgid " %{start} to %{end}"
...@@ -537,7 +537,7 @@ msgstr "" ...@@ -537,7 +537,7 @@ msgstr ""
msgid "%{group_name} uses group managed accounts. You need to create a new GitLab account which will be managed by %{group_name}." msgid "%{group_name} uses group managed accounts. You need to create a new GitLab account which will be managed by %{group_name}."
msgstr "" msgstr ""
msgid "%{group_name}&%{epic_iid} &middot; opened %{epic_created} by %{author}" msgid "%{group_name}&%{epic_iid} &middot; created %{epic_created} by %{author}"
msgstr "" msgstr ""
msgid "%{hook_type} was deleted" msgid "%{hook_type} was deleted"
...@@ -9000,6 +9000,9 @@ msgstr "" ...@@ -9000,6 +9000,9 @@ msgstr ""
msgid "Created" msgid "Created"
msgstr "" msgstr ""
msgid "Created %{epicTimeagoDate}"
msgstr ""
msgid "Created %{timestamp}" msgid "Created %{timestamp}"
msgstr "" msgstr ""
...@@ -13224,10 +13227,10 @@ msgstr "" ...@@ -13224,10 +13227,10 @@ msgstr ""
msgid "Filter by %{issuable_type} that are currently closed." msgid "Filter by %{issuable_type} that are currently closed."
msgstr "" msgstr ""
msgid "Filter by %{issuable_type} that are currently opened." msgid "Filter by %{issuable_type} that are currently open."
msgstr "" msgstr ""
msgid "Filter by %{page_context_word} that are currently opened." msgid "Filter by %{page_context_word} that are currently open."
msgstr "" msgstr ""
msgid "Filter by Git revision" msgid "Filter by Git revision"
...@@ -13260,7 +13263,7 @@ msgstr "" ...@@ -13260,7 +13263,7 @@ msgstr ""
msgid "Filter by test cases that are currently archived." msgid "Filter by test cases that are currently archived."
msgstr "" msgstr ""
msgid "Filter by test cases that are currently opened." msgid "Filter by test cases that are currently open."
msgstr "" msgstr ""
msgid "Filter by two-factor authentication" msgid "Filter by two-factor authentication"
...@@ -21487,9 +21490,6 @@ msgstr "" ...@@ -21487,9 +21490,6 @@ msgstr ""
msgid "Opened" msgid "Opened"
msgstr "" msgstr ""
msgid "Opened %{epicTimeagoDate}"
msgstr ""
msgid "Opened MRs" msgid "Opened MRs"
msgstr "" msgstr ""
......
...@@ -88,7 +88,7 @@ describe('RelatedIssuableItem', () => { ...@@ -88,7 +88,7 @@ describe('RelatedIssuableItem', () => {
const stateTitle = tokenState().attributes('title'); const stateTitle = tokenState().attributes('title');
const formattedCreateDate = formatDate(props.createdAt); const formattedCreateDate = formatDate(props.createdAt);
expect(stateTitle).toContain('<span class="bold">Opened</span>'); expect(stateTitle).toContain('<span class="bold">Created</span>');
expect(stateTitle).toContain(`<span class="text-tertiary">${formattedCreateDate}</span>`); expect(stateTitle).toContain(`<span class="text-tertiary">${formattedCreateDate}</span>`);
}); });
......
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