Skip to content

Commit

Permalink
EPMRPP-87564 || Disable issue type field for all BTS plugins (#3661)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmsterGet authored Nov 17, 2023
1 parent 81afa73 commit 71b1808
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ export class BtsPropertiesForIssueForm extends Component {
let selectedIssueTypeValue = [];
if (defectFormFields && defectFormFields.length) {
selectedIssueTypeValue =
(defectFormFields.find((item) => item.id === ISSUE_TYPE_FIELD_KEY) || {}).value || [];
(defectFormFields.find((item) => item.fieldType === ISSUE_TYPE_FIELD_KEY) || {})
.value || [];
}
selectedIssueTypeValue = selectedIssueTypeValue[0] || issueTypes[0];
this.changeIssueTypeConfig(issueTypes, selectedIssueTypeValue);
Expand Down Expand Up @@ -291,7 +292,7 @@ export class BtsPropertiesForIssueForm extends Component {
updatedFields[index] = {
...updatedFields[index],
checked,
disabled: field.id === ISSUE_TYPE_FIELD_KEY ? true : disabled || !checked,
disabled: field.fieldType === ISSUE_TYPE_FIELD_KEY ? true : disabled || !checked,
};
});

Expand All @@ -305,7 +306,9 @@ export class BtsPropertiesForIssueForm extends Component {
let checkedFieldsIds = {};

if (defectFormFields && defectFormFields.length) {
const savedIssueType = defectFormFields.find((item) => item.id === ISSUE_TYPE_FIELD_KEY);
const savedIssueType = defectFormFields.find(
(item) => item.fieldType === ISSUE_TYPE_FIELD_KEY,
);
if (
!savedIssueType ||
(savedIssueType.value && savedIssueType.value[0] === issueTypeValue)
Expand Down

0 comments on commit 71b1808

Please sign in to comment.