diff --git a/.babelrc b/.babelrc index d7d3d12e..d055a382 100644 --- a/.babelrc +++ b/.babelrc @@ -4,33 +4,42 @@ "presets": ["next/babel"], "plugins": [ [ - "babel-plugin-inline-react-svg", - { - "svgo": { - "plugins": [ - { - "name": "removeViewBox", - "active": false - } - ] - } + "babel-plugin-inline-react-svg", + { + "svgo": { + "plugins": [ + { + "name": "removeViewBox", + "active": false + }] } - ], - [ - "babel-plugin-transform-react-remove-prop-types", - { - "mode": "wrap" - } - ] - ] + } + ], + [ + "babel-plugin-transform-react-remove-prop-types", + { + "mode": "wrap" + } + ], + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-optional-chaining" + ] }, "development": { "presets": ["next/babel"], - "plugins": ["babel-plugin-inline-react-svg"] + "plugins": [ + "babel-plugin-inline-react-svg", + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-optional-chaining" + ] }, "test": { "presets": ["next/babel"], - "plugins": ["babel-plugin-inline-react-svg"] + "plugins": [ + "babel-plugin-inline-react-svg", + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-optional-chaining" + ] } } } diff --git a/package-lock.json b/package-lock.json index 0c83ee78..b2cd3bcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2020,9 +2020,9 @@ } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz", - "integrity": "sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.2.tgz", + "integrity": "sha512-ebR0zU9OvI2N4qiAC38KIAK75KItpIPTpAtd2r4OZmMFeKbKJpUFLYP2EuDut82+BmYi8sz42B+TfTptJ9iG5Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0", @@ -2095,9 +2095,9 @@ } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.12.tgz", - "integrity": "sha512-fcEdKOkIB7Tf4IxrgEVeFC4zeJSTr78no9wTdBuZZbqF64kzllU0ybo2zrzm7gUQfxGhBgq4E39oRs8Zx/RMYQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.2.tgz", + "integrity": "sha512-qQByMRPwMZJainfig10BoaDldx/+VDtNcrA7qdNaEOAj6VXud+gfrkA8j4CRAU5HjnWREXqIpSpH30qZX1xivA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0", diff --git a/package.json b/package.json index f3ec6dac..87b47b1c 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,8 @@ }, "devDependencies": { "@babel/plugin-proposal-class-properties": "^7.13.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2", + "@babel/plugin-proposal-optional-chaining": "^7.14.2", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/preset-env": "^7.14.1", "@babel/preset-react": "^7.13.13", diff --git a/src/api/index.js b/src/api/index.js index fe527799..75395ca9 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -4,7 +4,7 @@ import jsonFetch from "simple-json-fetch"; -import { isEmptyObject, toQueryString, ObjectNested } from "../libraries"; +import { isEmptyObject, toQueryString } from "../libraries"; import { CONFIG_API, GET, CALLBACK_API, METHODS, POST } from "../constants/Api"; /** @@ -27,7 +27,7 @@ const request = (args = {}, callback = CALLBACK_API) => { ...CONFIG_API, ...config, }; - const method = ObjectNested.get(config, "method"); + const method = config?.method; /* methods : get or post */ if ("string" !== typeof method) { diff --git a/src/components/Chart/CommonFilters.js b/src/components/Chart/CommonFilters.js index c3c63aa7..3a3a44e3 100644 --- a/src/components/Chart/CommonFilters.js +++ b/src/components/Chart/CommonFilters.js @@ -6,7 +6,6 @@ import React from "react"; import PropTypes from "prop-types"; import Input from "../Input"; -import { ObjectNested } from "../../libraries"; const CommonFilters = ({ onChange, filters, minFrom, minTo }) => { return ( @@ -16,7 +15,7 @@ const CommonFilters = ({ onChange, filters, minFrom, minTo }) => { name="from" placeholder="From" min={minFrom} - value={ObjectNested.get(filters, "from", "")} + value={filters?.from ?? ""} onChange={onChange} /> { name="to" placeholder="To" min={minTo} - value={ObjectNested.get(filters, "to", "")} + value={filters?.to ?? ""} onChange={onChange} /> diff --git a/src/components/SimpleStat/Stat.js b/src/components/SimpleStat/Stat.js index 3e63895d..1f0fc5ce 100644 --- a/src/components/SimpleStat/Stat.js +++ b/src/components/SimpleStat/Stat.js @@ -5,14 +5,12 @@ import React from "react"; import PropTypes from "prop-types"; -import { ObjectNested } from "../../libraries"; - import classes from "./SimpleStat.module.css"; const Stat = ({ stat }) => { - const label = ObjectNested.get(stat, "label"); - const count = ObjectNested.get(stat, "count"); - const style = ObjectNested.get(stat, "style"); + const label = stat?.label; + const count = stat?.count; + const style = stat?.style; return (
diff --git a/src/containers/ContactReady/index.js b/src/containers/ContactReady/index.js index ad1ed510..d35350d7 100644 --- a/src/containers/ContactReady/index.js +++ b/src/containers/ContactReady/index.js @@ -8,7 +8,6 @@ import React from "react"; import LineChart from "../../components/LineChart"; import { CommonFilters } from "../../components/Chart"; import MetricsTemplate from "../MetricsTemplate"; -import { ObjectNested } from "../../libraries"; import { mostAndLeast, normalize, @@ -18,7 +17,7 @@ import { TEMP_MIN_DATE } from "../../constants/Charts"; import Router from "../../routes"; const handleData = (data) => { - const localData = ObjectNested.get(data, "timeline", {}); + const localData = data?.timeline ?? {}; return { globalStats: mostAndLeast(localData), chart: normalize(localData, "openIssues"), @@ -46,9 +45,9 @@ const ContactReady = () => { { return ( @@ -16,19 +15,19 @@ const Filters = ({ onChange, filters }) => { type="date" name="start" placeholder="From" - value={ObjectNested.get(filters, "start", "")} + value={filters?.start ?? ""} onChange={onChange} /> { { title={"Issues Reported per Week"} fill={true} label={""} - labels={ObjectNested.get(data, "chart.dates", [])} + labels={data?.chart?.dates ?? []} legend={{ display: false }} - data={ObjectNested.get(data, "chart.newIssues", [])} + data={data?.chart?.newIssues ?? []} options={{ scales: { xAxes: [ @@ -122,9 +121,9 @@ it("renders Component with custom props", () => { title={"Issues Reported per Week"} fill={true} label={""} - labels={ObjectNested.get(data, "chart.dates", [])} + labels={data?.chart?.dates ?? []} legend={{ display: false }} - data={ObjectNested.get(data, "chart.newIssues", [])} + data={data?.chart?.newIssues ?? []} options={{ scales: { xAxes: [ diff --git a/src/containers/MetricsTemplate/index.js b/src/containers/MetricsTemplate/index.js index a98fc501..1467ed30 100644 --- a/src/containers/MetricsTemplate/index.js +++ b/src/containers/MetricsTemplate/index.js @@ -8,7 +8,6 @@ import PropTypes from "prop-types"; import request from "../../api"; import { - ObjectNested, getFiltersFromUrl, toQueryObject, pushFiltersToUrl, @@ -96,8 +95,8 @@ class MetricsTemplate extends React.Component { getFormatedDate(filters = {}) { const { nameFieldDateFrom, nameFieldDateTo } = this.props; const filterList = []; - const from = ObjectNested.get(filters, nameFieldDateFrom); - const to = ObjectNested.get(filters, nameFieldDateTo); + const from = filters?.[nameFieldDateFrom]; + const to = filters?.[nameFieldDateTo]; if (from) { filterList.push(dayjs(filters.from).format("DD MMMM YYYY")); } @@ -154,9 +153,9 @@ class MetricsTemplate extends React.Component { this.setState({ isFetching: false, error: { - message: ObjectNested.get(payload, "message", "Error"), - errors: ObjectNested.get(payload, "errors", []), - code: ObjectNested.get(payload, "code"), + message: payload?.message ?? "Error", + errors: payload?.errors ?? [], + code: payload?.code, }, }); } @@ -190,7 +189,7 @@ class MetricsTemplate extends React.Component { render() { const { filters, data } = this.state; - const globalStats = ObjectNested.get(data, "globalStats", []); + const globalStats = data?.globalStats ?? []; return (
{this.props.shouldRenderJumbotron && ( diff --git a/src/containers/NeedsContact/index.js b/src/containers/NeedsContact/index.js index ddf3a98b..2fae3f80 100644 --- a/src/containers/NeedsContact/index.js +++ b/src/containers/NeedsContact/index.js @@ -7,7 +7,6 @@ import React from "react"; import LineChart from "../../components/LineChart"; import { CommonFilters } from "../../components/Chart"; import MetricsTemplate from "../MetricsTemplate"; -import { ObjectNested } from "../../libraries"; import { mostAndLeast, normalize, @@ -17,7 +16,7 @@ import { TEMP_MIN_DATE } from "../../constants/Charts"; import Router from "../../routes"; const handleData = (data) => { - const localData = ObjectNested.get(data, "timeline", {}); + const localData = data?.timeline ?? {}; return { globalStats: mostAndLeast(localData), chart: normalize(localData, "openIssues"), @@ -45,9 +44,9 @@ const NeedsContact = () => { { - const localData = ObjectNested.get(data, "timeline", {}); + const localData = data?.timeline ?? {}; return { globalStats: mostAndLeast(localData), chart: normalize(localData, "openIssues"), @@ -29,9 +28,9 @@ const NeedsDiagnosis = () => { { - const localData = ObjectNested.get(data, "timeline", {}); + const localData = data?.timeline ?? {}; return { globalStats: mostAndLeast(localData), chart: normalize(localData, "openIssues"), @@ -45,9 +44,9 @@ const NeedsTriageChart = () => { { - const localData = ObjectNested.get(data, "timeline", {}); + const localData = data?.timeline ?? {}; return { globalStats: mostAndLeast(localData), chart: normalize(localData, "openIssues"), @@ -45,9 +44,9 @@ const SiteWait = () => { ( - {ObjectNested.get(data, "data", []).map((issue, key) => { + {(data?.data ?? []).map((issue, key) => { return ( ); diff --git a/src/containers/WeeklyReports/index.js b/src/containers/WeeklyReports/index.js index ac232a14..bedb58eb 100644 --- a/src/containers/WeeklyReports/index.js +++ b/src/containers/WeeklyReports/index.js @@ -7,13 +7,12 @@ import dayjs from "dayjs"; import BarChart from "../../components/BarChart"; import MetricsTemplate from "../MetricsTemplate"; -import { ObjectNested } from "../../libraries"; import { mostAndLeast } from "../../modules/Chart"; import { weeklyReportsParse } from "../../modules/WeeklyReports"; import Router from "../../routes"; const handleData = (data) => { - const localData = ObjectNested.get(data, "timeline", {}); + const localData = data?.timeline ?? {}; return { globalStats: mostAndLeast(localData), chart: weeklyReportsParse(localData, "newIssues"), @@ -36,9 +35,9 @@ const WeeklyReports = () => { title={"Issues Reported per Week"} fill={true} label={""} - labels={ObjectNested.get(data, "chart.labels", [])} + labels={data?.chart?.labels ?? []} legend={{ display: false }} - data={ObjectNested.get(data, "chart.newIssues", [])} + data={data?.chart?.newIssues ?? []} options={{ parsing: { xAxisKey: "timestamp", diff --git a/src/libraries/__tests__/getNestedVar-test.js b/src/libraries/__tests__/getNestedVar-test.js deleted file mode 100644 index 3bb2095f..00000000 --- a/src/libraries/__tests__/getNestedVar-test.js +++ /dev/null @@ -1,29 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -import ObjectNested from "../objectNested"; - -const date = new Date(); - -const obj = { - receiver: { - phone: "0000000000", - }, - a: { - b: { - c: date, - }, - }, -}; -test("value of phone in obj is 0000000000", () => { - expect(ObjectNested.getNestedVar(obj, "receiver.phone", null)).toBe( - "0000000000", - ); - expect(ObjectNested.getNestedVar(obj, "receiver", null)).toEqual({ - phone: "0000000000", - }); - expect(ObjectNested.getNestedVar(obj, "receiver.email", null)).toBeNull; - expect(ObjectNested.getNestedVar(obj, "receivers", "N/C")).toBe("N/C"); - expect(ObjectNested.getNestedVar(obj, "a.b.c", "N/C")).toBe(date); -}); diff --git a/src/libraries/__tests__/normalizeResponse-test.js b/src/libraries/__tests__/normalizeResponse-test.js deleted file mode 100644 index 34719966..00000000 --- a/src/libraries/__tests__/normalizeResponse-test.js +++ /dev/null @@ -1,25 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -import ObjectNested from "../objectNested"; - -const obj = { - receiver: { - phone: "0000000000", - }, -}; - -test("normalizeResponse", () => { - expect(ObjectNested.normalizeResponse("test", null)).toEqual("test"); - expect(ObjectNested.normalizeResponse("", null)).toEqual(null); - expect(ObjectNested.normalizeResponse(obj.receiver, null)).toEqual({ - phone: "0000000000", - }); - expect(ObjectNested.normalizeResponse({ phone: null }, null)).toEqual({ - phone: null, - }); - expect(ObjectNested.normalizeResponse(null, null)).toEqual(null); - expect(ObjectNested.normalizeResponse([], null)).toEqual(null); - expect(ObjectNested.normalizeResponse({}, null)).toEqual(null); -}); diff --git a/src/libraries/__tests__/objectNested-test.js b/src/libraries/__tests__/objectNested-test.js deleted file mode 100644 index da241164..00000000 --- a/src/libraries/__tests__/objectNested-test.js +++ /dev/null @@ -1,42 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -import ObjectNested from "../objectNested"; - -const obj1 = { - receiver: { - phone: "0000000000", - mail: { - pro: "example@example.fr", - family: "example@example.me", - }, - }, -}; - -const date = new Date(); - -const obj2 = { - a: { - b: { - c: date, - }, - }, -}; -test("value obj", () => { - expect(ObjectNested.get(obj1, "receiver.phone", null)).toBe("0000000000"); - expect(ObjectNested.get(obj1, "receiver", null)).toEqual({ - mail: { family: "example@example.me", pro: "example@example.fr" }, - phone: "0000000000", - }); - expect(ObjectNested.get(obj1, "receiver.phones", null)).toBeNull; - expect(ObjectNested.get(null, "receiver.phones", null)).toBeNull; - expect(ObjectNested.get(null, "receiver.phones", "1")).toBe("1"); - expect(ObjectNested.get(obj1, "receiver.mail.pro", null)).toBe( - "example@example.fr", - ); - expect(ObjectNested.get(obj1, "receiver.mail.pro", "1", false)).toBe( - "example@example.fr", - ); - expect(ObjectNested.get(obj2, "a.b.c")).toBe(date); -}); diff --git a/src/libraries/getFiltersFromUrl.js b/src/libraries/getFiltersFromUrl.js index de4d02af..eea5e19c 100644 --- a/src/libraries/getFiltersFromUrl.js +++ b/src/libraries/getFiltersFromUrl.js @@ -1,10 +1,9 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import ObjectNested from "./objectNested"; /* get data to url */ const getFiltersFromUrl = () => { - return ObjectNested.get(location, "search", null); + return location?.search ?? null; }; export default getFiltersFromUrl; diff --git a/src/libraries/index.js b/src/libraries/index.js index 2b0e3927..53163d94 100644 --- a/src/libraries/index.js +++ b/src/libraries/index.js @@ -4,7 +4,6 @@ export { default as toQueryString } from "./toQueryString"; export { default as isEmptyObject } from "./isEmptyObject"; -export { default as ObjectNested } from "./objectNested"; export { default as getFiltersFromUrl } from "./getFiltersFromUrl"; export { default as toQueryObject } from "./toQueryObject"; export { default as isBetweenDates } from "./isBetweenDates"; diff --git a/src/libraries/objectNested/get.js b/src/libraries/objectNested/get.js deleted file mode 100644 index d3f72164..00000000 --- a/src/libraries/objectNested/get.js +++ /dev/null @@ -1,23 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -import normalizeResponse from "./normalizeResponse"; -import getNestedVar from "./getNestedVar"; - -const get = (item, key, defaultValue = null, normalize = true) => { - let value = defaultValue; - if (null != item && typeof item == "object" && !Array.isArray(item)) { - if (item[key] !== undefined) { - value = item[key]; - } else if (key.indexOf(".") > 0) { - value = getNestedVar(item, key, defaultValue); - } - if (normalize) { - return normalizeResponse(value, defaultValue); - } - } - return value; -}; - -export default get; diff --git a/src/libraries/objectNested/getNestedVar.js b/src/libraries/objectNested/getNestedVar.js deleted file mode 100644 index 55f8ef90..00000000 --- a/src/libraries/objectNested/getNestedVar.js +++ /dev/null @@ -1,19 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -const getNestedVar = (item, key, defaultValue = null) => { - const pieces = key.split("."); - let object = item; - for (let index = 0; index < pieces.length; index++) { - const key = pieces[index]; - if (typeof object == "object" && object[key] !== undefined) { - object = object[key]; - } else if (object[key] === undefined && index === pieces.length - 1) { - return defaultValue; - } - } - return object; -}; - -export default getNestedVar; diff --git a/src/libraries/objectNested/index.js b/src/libraries/objectNested/index.js deleted file mode 100644 index ae07efb9..00000000 --- a/src/libraries/objectNested/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -import get from "./get"; -import getNestedVar from "./getNestedVar"; -import normalizeResponse from "./normalizeResponse"; - -/** - * @providesModule ObjectNested - */ -const ObjectNested = { - get, - getNestedVar, - normalizeResponse, -}; - -export default ObjectNested; diff --git a/src/libraries/objectNested/normalizeResponse.js b/src/libraries/objectNested/normalizeResponse.js deleted file mode 100644 index 08e36e76..00000000 --- a/src/libraries/objectNested/normalizeResponse.js +++ /dev/null @@ -1,30 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -const normalizeResponse = (value, defaultValue = null) => { - let result = value; - switch (typeof value) { - case "string": - if (value.length === 0) { - result = defaultValue; - } - break; - case "object": - if (value === null) { - result = defaultValue; - } else if (Array.isArray(value) && value.length === 0) { - result = defaultValue; - } else if ( - Object.keys(value).length === 0 && - Function.prototype.call.bind(Object.prototype.toString)(value) === - "[object Object]" - ) { - result = defaultValue; - } - break; - } - return result; -}; - -export default normalizeResponse; diff --git a/src/libraries/router/index.js b/src/libraries/router/index.js index a62b5b97..41720170 100644 --- a/src/libraries/router/index.js +++ b/src/libraries/router/index.js @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { ObjectNested, isEmptyObject } from ".."; +import { isEmptyObject } from ".."; class Router { constructor() { @@ -40,17 +40,17 @@ class Router { } /* on récupére la config du slug */ - const currentRoute = ObjectNested.get(this.routes, slug, {}); + const currentRoute = this.routes?.[slug] ?? {}; if (isEmptyObject(currentRoute)) { console.warn("no configuration found for this slug"); return ""; } /* get url*/ - const url = ObjectNested.get(currentRoute, "url"); + const url = currentRoute?.url; /* get baseUrl */ - const baseUrl = ObjectNested.get(currentRoute, "baseUrl"); + const baseUrl = currentRoute?.baseUrl; if (isEmptyObject(params)) { return this.buildUrl(baseUrl, url); diff --git a/src/modules/Chart/index.js b/src/modules/Chart/index.js index 61ff5a9d..7a05f05c 100644 --- a/src/modules/Chart/index.js +++ b/src/modules/Chart/index.js @@ -4,7 +4,7 @@ import dayjs from "dayjs"; -import { ObjectNested, isEmptyObject } from "../../libraries"; +import { isEmptyObject } from "../../libraries"; /** * Normalize data relay on API and CHART @@ -53,8 +53,8 @@ export const mostAndLeast = (stats = {}) => { for (const index in stats) { const stat = stats[index]; const date = dayjs(new Date(stat.timestamp)); - const mostCount = ObjectNested.get(most, "count"); - const leastCount = ObjectNested.get(least, "count"); + const mostCount = most?.count; + const leastCount = least?.count; /* * most diff --git a/src/modules/Triage/index.js b/src/modules/Triage/index.js index e44dda3c..24d983ff 100644 --- a/src/modules/Triage/index.js +++ b/src/modules/Triage/index.js @@ -4,7 +4,7 @@ import dayjs from "dayjs"; -import { isEmptyObject, ObjectNested } from "../../libraries"; +import { isEmptyObject } from "../../libraries"; /** * Normalize data relay on API and Triage @@ -114,17 +114,17 @@ function hasIncludeData(issue = {}, filterList = {}) { } //browser - const browser = ObjectNested.get(filterList, "browserList"); + const browser = filterList?.browserList; if (browser) { isIncluded = undefined !== - ObjectNested.get(issue, "browserList", []).find((currentBrowser) => { + (issue?.browserList ?? []).find((currentBrowser) => { return browser.includes(currentBrowser); }); } // status - const status = ObjectNested.get(filterList, "status"); + const status = filterList?.status; if (status && isIncluded) { isIncluded = issue[status]; }