diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-01 18:08:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-01 18:08:40 +0300 |
commit | cdd826bc3ad3e6f234f96a861efa129dba5e2502 (patch) | |
tree | b159419c3a731637f35e95fe62f30ad437356996 /app/assets/javascripts/issues | |
parent | e4a0b94a64dc5bd8f48430cd5cdf9aaa10927e75 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/issues')
3 files changed, 9 insertions, 4 deletions
diff --git a/app/assets/javascripts/issues/list/components/issue_card_time_info.vue b/app/assets/javascripts/issues/list/components/issue_card_time_info.vue index 1108021c7c6..1139861ae78 100644 --- a/app/assets/javascripts/issues/list/components/issue_card_time_info.vue +++ b/app/assets/javascripts/issues/list/components/issue_card_time_info.vue @@ -1,5 +1,6 @@ <script> import { GlLink, GlIcon, GlTooltipDirective } from '@gitlab/ui'; +import { IssuableStatus } from '~/issues/constants'; import { dateInWords, getTimeRemainingInWords, @@ -41,7 +42,10 @@ export default { return this.issue.dueDate && dateInWords(newDateAsLocaleTime(this.issue.dueDate), true); }, showDueDateInRed() { - return isInPast(newDateAsLocaleTime(this.issue.dueDate)) && !this.issue.closedAt; + return ( + isInPast(newDateAsLocaleTime(this.issue.dueDate)) && + this.issue.state !== IssuableStatus.Closed + ); }, timeEstimate() { return this.issue.humanTimeEstimate || this.issue.timeStats?.humanTimeEstimate; diff --git a/app/assets/javascripts/issues/list/components/issues_list_app.vue b/app/assets/javascripts/issues/list/components/issues_list_app.vue index 5caac3402c2..03b207eeb51 100644 --- a/app/assets/javascripts/issues/list/components/issues_list_app.vue +++ b/app/assets/javascripts/issues/list/components/issues_list_app.vue @@ -19,6 +19,7 @@ import { convertToGraphQLId, getIdFromGraphQLId } from '~/graphql_shared/utils'; import { ITEM_TYPE } from '~/groups/constants'; import CsvImportExportButtons from '~/issuable/components/csv_import_export_buttons.vue'; import IssuableByEmail from '~/issuable/components/issuable_by_email.vue'; +import { IssuableStatus } from '~/issues/constants'; import axios from '~/lib/utils/axios_utils'; import { scrollUp } from '~/lib/utils/scroll_utils'; import { getParameterByName, joinPaths } from '~/lib/utils/url_utility'; @@ -480,10 +481,10 @@ export default { return `${this.exportCsvPath}${window.location.search}`; }, getStatus(issue) { - if (issue.closedAt && issue.moved) { + if (issue.state === IssuableStatus.Closed && issue.moved) { return this.$options.i18n.closedMoved; } - if (issue.closedAt) { + if (issue.state === IssuableStatus.Closed) { return this.$options.i18n.closed; } return undefined; diff --git a/app/assets/javascripts/issues/list/queries/issue.fragment.graphql b/app/assets/javascripts/issues/list/queries/issue.fragment.graphql index 430d494deab..d09e4d9df2b 100644 --- a/app/assets/javascripts/issues/list/queries/issue.fragment.graphql +++ b/app/assets/javascripts/issues/list/queries/issue.fragment.graphql @@ -2,7 +2,6 @@ fragment IssueFragment on Issue { __typename id iid - closedAt confidential createdAt downvotes @@ -11,6 +10,7 @@ fragment IssueFragment on Issue { humanTimeEstimate mergeRequestsCount moved + state title updatedAt upvotes |