import role silent, and support role OPERATIONS_ALERT

This commit is contained in:
Timotheus Pokorra 2024-10-05 23:44:16 +02:00 committed by Dev und Test fuer hsadminng
parent 792ef1d87f
commit 23544e74db
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@ CREATE TYPE HsOfficeRelationType AS ENUM (
'DEBITOR', 'DEBITOR',
'VIP_CONTACT', 'VIP_CONTACT',
'OPERATIONS', 'OPERATIONS',
'OPERATIONS_ALERT',
'SUBSCRIBER'); 'SUBSCRIBER');
CREATE CAST (character varying as HsOfficeRelationType) WITH INOUT AS IMPLICIT; CREATE CAST (character varying as HsOfficeRelationType) WITH INOUT AS IMPLICIT;

View File

@ -55,7 +55,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport {
"subscriber:customers-announce" "subscriber:customers-announce"
}; };
private static final String[] KNOWN_ROLES = ArrayUtils.addAll( private static final String[] KNOWN_ROLES = ArrayUtils.addAll(
new String[] { "partner", "vip-contact", "ex-partner", "billing", "contractual", "operation" }, new String[] { "partner", "vip-contact", "ex-partner", "billing", "contractual", "operation", "silent" },
SUBSCRIBER_ROLES); SUBSCRIBER_ROLES);
// at least as the number of lines in business_partners.csv from test-data, but less than real data partner count // at least as the number of lines in business_partners.csv from test-data, but less than real data partner count
@ -995,6 +995,10 @@ public abstract class BaseOfficeDataImport extends CsvDataImport {
debitor.getDebitorRel().setContact(contact); debitor.getDebitorRel().setContact(contact);
} }
if (containsRole(rec, "operation")) { if (containsRole(rec, "operation")) {
addRelation(HsOfficeRelationType.OPERATIONS_ALERT, partnerPerson, contactPerson, contact);
addRelation(HsOfficeRelationType.OPERATIONS, partnerPerson, contactPerson, contact);
}
if (containsRole(rec, "silent")) {
addRelation(HsOfficeRelationType.OPERATIONS, partnerPerson, contactPerson, contact); addRelation(HsOfficeRelationType.OPERATIONS, partnerPerson, contactPerson, contact);
} }
if (containsRole(rec, "contractual")) { if (containsRole(rec, "contractual")) {