mirror of
https://github.com/datahub-project/datahub.git
synced 2025-09-01 05:13:15 +00:00
Merge pull request #1222 from theseyi/suggestion-conflict-not-required
removes requirement that a suggestion conflict be resolved before use…
This commit is contained in:
commit
7186449552
@ -23,7 +23,6 @@ import {
|
|||||||
} from 'wherehows-web/typings/app/dataset-columns';
|
} from 'wherehows-web/typings/app/dataset-columns';
|
||||||
import { IDatasetColumn } from 'wherehows-web/typings/api/datasets/columns';
|
import { IDatasetColumn } from 'wherehows-web/typings/api/datasets/columns';
|
||||||
import { ComplianceFieldIdValue } from 'wherehows-web/constants/datasets/compliance';
|
import { ComplianceFieldIdValue } from 'wherehows-web/constants/datasets/compliance';
|
||||||
import { isHighConfidenceSuggestion } from 'wherehows-web/utils/datasets/compliance-suggestions';
|
|
||||||
import { validateRegExp } from 'wherehows-web/utils/validators/regexp';
|
import { validateRegExp } from 'wherehows-web/utils/validators/regexp';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -191,31 +190,20 @@ const tagNeedsReview = (complianceDataTypes: Array<IComplianceDataType>) =>
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
(tag: IComplianceChangeSet): boolean => {
|
(tag: IComplianceChangeSet): boolean => {
|
||||||
const {
|
const { isDirty, privacyPolicyExists, readonly, identifierType, logicalType, valuePattern } = tag;
|
||||||
isDirty,
|
|
||||||
suggestion,
|
|
||||||
privacyPolicyExists,
|
|
||||||
suggestionAuthority,
|
|
||||||
readonly,
|
|
||||||
identifierType,
|
|
||||||
logicalType,
|
|
||||||
valuePattern
|
|
||||||
} = tag;
|
|
||||||
let isReviewRequired = false;
|
let isReviewRequired = false;
|
||||||
|
|
||||||
|
// Readonly tags are exempt from review
|
||||||
if (readonly) {
|
if (readonly) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure that the tag has an identifier type specified
|
||||||
if (!identifierType) {
|
if (!identifierType) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that a hi confidence suggestion exists and the identifierType does not match the change set item
|
// Ensure that tag has a logical type and nonOwner flag is set when tag is of id type
|
||||||
if (suggestion && suggestion.identifierType !== identifierType && isHighConfidenceSuggestion(suggestion)) {
|
|
||||||
isReviewRequired = isReviewRequired || !suggestionAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isTagIdType(complianceDataTypes)(tag)) {
|
if (isTagIdType(complianceDataTypes)(tag)) {
|
||||||
isReviewRequired = isReviewRequired || !idTypeTagHasLogicalType(tag) || !tagOwnerIsSet(tag);
|
isReviewRequired = isReviewRequired || !idTypeTagHasLogicalType(tag) || !tagOwnerIsSet(tag);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user