Commit 5d880d71 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/227414/wipToDraftFilteredBar' into 'master'

Rename the WIP filter to draft in the filtered search bar

See merge request gitlab-org/gitlab!38161
parents 49b8392e 58475767
import { __ } from '~/locale'; import { __ } from '~/locale';
export default IssuableTokenKeys => { export default IssuableTokenKeys => {
const wipToken = { const draftToken = {
formattedKey: __('WIP'), token: {
key: 'wip', formattedKey: __('Draft'),
type: 'string', key: 'draft',
param: '', type: 'string',
symbol: '', param: '',
icon: 'admin', symbol: '',
tag: __('Yes or No'), icon: 'admin',
lowercaseValueOnSubmit: true, tag: __('Yes or No'),
uppercaseTokenName: true, lowercaseValueOnSubmit: true,
capitalizeTokenValue: true, capitalizeTokenValue: true,
},
conditions: [
{
url: 'wip=yes',
// eslint-disable-next-line @gitlab/require-i18n-strings
replacementUrl: 'draft=yes',
tokenKey: 'draft',
value: __('Yes'),
operator: '=',
},
{
url: 'wip=no',
// eslint-disable-next-line @gitlab/require-i18n-strings
replacementUrl: 'draft=no',
tokenKey: 'draft',
value: __('No'),
operator: '=',
},
{
url: 'not[wip]=yes',
replacementUrl: 'not[draft]=yes',
tokenKey: 'draft',
value: __('Yes'),
operator: '!=',
},
{
url: 'not[wip]=no',
replacementUrl: 'not[draft]=no',
tokenKey: 'draft',
value: __('No'),
operator: '!=',
},
],
}; };
IssuableTokenKeys.tokenKeys.push(wipToken); IssuableTokenKeys.tokenKeys.push(draftToken.token);
IssuableTokenKeys.tokenKeysWithAlternative.push(wipToken); IssuableTokenKeys.tokenKeysWithAlternative.push(draftToken.token);
IssuableTokenKeys.conditions.push(...draftToken.conditions);
const targetBranchToken = { const targetBranchToken = {
formattedKey: __('Target-Branch'), formattedKey: __('Target-Branch'),
......
...@@ -106,7 +106,7 @@ export default class AvailableDropdownMappings { ...@@ -106,7 +106,7 @@ export default class AvailableDropdownMappings {
gl: DropdownEmoji, gl: DropdownEmoji,
element: this.container.querySelector('#js-dropdown-my-reaction'), element: this.container.querySelector('#js-dropdown-my-reaction'),
}, },
wip: { draft: {
reference: null, reference: null,
gl: DropdownNonUser, gl: DropdownNonUser,
element: this.container.querySelector('#js-dropdown-wip'), element: this.container.querySelector('#js-dropdown-wip'),
......
...@@ -8646,6 +8646,9 @@ msgstr "" ...@@ -8646,6 +8646,9 @@ msgstr ""
msgid "Downvotes" msgid "Downvotes"
msgstr "" msgstr ""
msgid "Draft"
msgstr ""
msgid "Draft merge requests can't be merged." msgid "Draft merge requests can't be merged."
msgstr "" msgstr ""
...@@ -27000,9 +27003,6 @@ msgstr "" ...@@ -27000,9 +27003,6 @@ msgstr ""
msgid "Vulnerability|Status" msgid "Vulnerability|Status"
msgstr "" msgstr ""
msgid "WIP"
msgstr ""
msgid "Wait for the file to load to copy its contents" msgid "Wait for the file to load to copy its contents"
msgstr "" msgstr ""
......
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