@rh-support/troubleshoot 2.2.104 → 2.2.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAMvE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAcrE,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAChE,oBAAoB,EAAE,OAAO,CAAC;CACjC;AASD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxD;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,qBA4R9B;kBA5RQ,QAAQ;;;AA8RjB,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAMvE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAerE,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAChE,oBAAoB,EAAE,OAAO,CAAC;CACjC;AASD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxD;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,qBA+R9B;kBA/RQ,QAAQ;;;AAiSjB,eAAe,QAAQ,CAAC"}
@@ -3,7 +3,7 @@ import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-c
3
3
  import WarningTriangleIcon from '@patternfly/react-icons/dist/js/icons/warning-triangle-icon';
4
4
  import { Dropdown, ValueChangedIcon } from '@rh-support/components';
5
5
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
6
- import { autoEnableFtsOnCaseViewEditPage, severitySort, showFtsOnCreateCasePage, toOption, toOptions, } from '@rh-support/utils';
6
+ import { autoEnableFtsOnCaseViewEditPage, PreviousCaseTypes, severitySort, showFtsOnCreateCasePage, toOption, toOptions, } from '@rh-support/utils';
7
7
  import find from 'lodash/find';
8
8
  import findLast from 'lodash/findLast';
9
9
  import includes from 'lodash/includes';
@@ -27,7 +27,7 @@ const defaultProps = {
27
27
  };
28
28
  function Severity(props) {
29
29
  const { t } = useTranslation();
30
- const { product, version, caseNumber, severity, entitlementSla, ownersEntitlements, versionsDetails } = useCaseSelector((state) => ({
30
+ const { product, version, caseNumber, severity, entitlementSla, ownersEntitlements, versionsDetails, caseType } = useCaseSelector((state) => ({
31
31
  product: state.caseDetails.product,
32
32
  version: state.caseDetails.version,
33
33
  caseNumber: state.caseDetails.caseNumber,
@@ -35,6 +35,7 @@ function Severity(props) {
35
35
  entitlementSla: state.caseDetails.entitlementSla,
36
36
  ownersEntitlements: state.ownersEntitlements,
37
37
  versionsDetails: state.versionsDetails,
38
+ caseType: state.caseDetails.caseType,
38
39
  }), isEqual);
39
40
  const { globalMetadataState: { allCaseSeverities, allProducts }, } = useContext(GlobalMetadataStateContext);
40
41
  const { isExportingPDF } = useContext(PDFContext);
@@ -44,6 +45,7 @@ function Severity(props) {
44
45
  const [openUpdateSeverityModal, setOpenUpdateSeverityModal] = useState(false);
45
46
  const caseDispatch = useCaseDispatch();
46
47
  const isOnCaseDetailsPage = !isEmpty(caseNumber);
48
+ const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
47
49
  const updateState = (value) => {
48
50
  const casePayload = {
49
51
  severity: value,
@@ -52,6 +54,7 @@ function Severity(props) {
52
54
  // .. change fts on sev change only while creating case or when we change to sev1
53
55
  !isOnCaseDetailsPage && (casePayload.fts = showFtsOnCreateCasePage(entitlementSla, value));
54
56
  isOnCaseDetailsPage && autoEnableFtsOnCaseViewEditPage(entitlementSla, value) && (casePayload.fts = true);
57
+ casePayload.fts = casePayload.fts && !isIdea;
55
58
  if (isOnCaseDetailsPage) {
56
59
  props.onSeverityChange && props.onSeverityChange(casePayload);
57
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBA4HlC;kBA5HQ,YAAY;;;AA8HrB,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBA+HlC;kBA/HQ,YAAY;;;AAiIrB,eAAe,YAAY,CAAC"}
@@ -2,7 +2,7 @@ import { Popover, PopoverPosition, ValidatedOptions } from '@patternfly/react-co
2
2
  import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
3
3
  import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
4
4
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
5
- import { showFtsOnCaseViewEditPage, showFtsOnCreateCasePage } from '@rh-support/utils';
5
+ import { PreviousCaseTypes, showFtsOnCaseViewEditPage, showFtsOnCreateCasePage } from '@rh-support/utils';
6
6
  import isEmpty from 'lodash/isEmpty';
7
7
  import isEqual from 'lodash/isEqual';
8
8
  import React, { useContext, useEffect, useState } from 'react';
@@ -14,18 +14,20 @@ const defaultProps = {
14
14
  className: '',
15
15
  };
16
16
  function SupportLevel(props) {
17
- const { product, caseNumber, severity, entitlementSla, ownersEntitlements } = useCaseSelector((state) => ({
17
+ const { product, caseNumber, severity, entitlementSla, ownersEntitlements, caseType } = useCaseSelector((state) => ({
18
18
  product: state.caseDetails.product,
19
19
  caseNumber: state.caseDetails.caseNumber,
20
20
  severity: state.caseDetails.severity,
21
21
  entitlementSla: state.caseDetails.entitlementSla,
22
22
  ownersEntitlements: state.ownersEntitlements,
23
+ caseType: state.caseDetails.caseType,
23
24
  }), isEqual);
24
25
  const caseDispatch = useCaseDispatch();
25
26
  const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
26
27
  const { t } = useTranslation();
27
28
  const [isSupportLevelInValid, setIsSupportLevelInValid] = useState(false);
28
29
  const [isOpen, setIsOpen] = useState(false);
30
+ const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
29
31
  const onToggle = (isOpen) => {
30
32
  setIsOpen(isOpen);
31
33
  };
@@ -38,6 +40,7 @@ function SupportLevel(props) {
38
40
  casePayload.fts = caseNumber
39
41
  ? showFtsOnCaseViewEditPage(selected, severity)
40
42
  : showFtsOnCreateCasePage(selected, severity);
43
+ casePayload.fts = casePayload.fts && !isIdea;
41
44
  setIsSupportLevelInValid(isEmpty(selected));
42
45
  onCaseDetailsChange(casePayload);
43
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.104",
3
+ "version": "2.2.105",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -131,5 +131,5 @@
131
131
  "defaults and supports es6-module",
132
132
  "maintained node versions"
133
133
  ],
134
- "gitHead": "34c73257909928297e8d704b29b9229a6fe8f21d"
134
+ "gitHead": "a062f1285ca3a3579dd8f5d13e54be2d9940d1be"
135
135
  }