From 341f5a7fb038f984c2b52d564cbce49e753a3384 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Fri, 27 Sep 2024 17:16:05 +0200 Subject: [PATCH 01/28] dump.sh: emailaddr.csv in hosting folder --- src/test/resources/migration/dump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/resources/migration/dump.sh b/src/test/resources/migration/dump.sh index aa9cc0e3..53ad9ac4 100644 --- a/src/test/resources/migration/dump.sh +++ b/src/test/resources/migration/dump.sh @@ -85,7 +85,7 @@ dump "select domain_id, domain_name, domain_since, domain_dns_master, domain_own dump "select emailaddr_id, domain_id, localpart, subdomain, target from emailaddr order by emailaddr_id" \ - "emailaddr.csv" + "hosting/emailaddr.csv" dump "select emailalias_id, pac_id, name, target from emailalias -- 2.39.5 From be4c98f608af795f17d24f09103a4774896da5cb Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Fri, 27 Sep 2024 17:19:08 +0200 Subject: [PATCH 02/28] import contacts: only drop relation of type representative if holder and anchor are the same --- .../hsadminng/hs/migration/BaseOfficeDataImport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index f00d57dd..c60645ba 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -503,7 +503,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { // this happens if a natural person is marked as 'contractual' for itself final var idsToRemove = new HashSet(); relations.forEach((id, r) -> { - if (r.getHolder() == r.getAnchor()) { + if (r.getType() == HsOfficeRelationType.REPRESENTATIVE && r.getHolder() == r.getAnchor()) { idsToRemove.add(id); } }); -- 2.39.5 From 792ef1d87f40cdcdef5bbfb88c337545fb03ec38 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Sat, 5 Oct 2024 23:38:01 +0200 Subject: [PATCH 03/28] fix space before comma if there is a firm --- .../hsadminng/hs/migration/BaseOfficeDataImport.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index c60645ba..5fee84df 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -1190,13 +1190,13 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { final String firm) { final var result = new StringBuilder(); if (isNotBlank(salut)) - result.append(salut + " "); + result.append((isBlank(result) ? "" : " ") + salut); if (isNotBlank(title)) - result.append(title + " "); + result.append((isBlank(result) ? "" : " ") + title); if (isNotBlank(firstname)) - result.append(firstname + " "); + result.append((isBlank(result) ? "" : " ") + firstname); if (isNotBlank(lastname)) - result.append(lastname + " "); + result.append((isBlank(result) ? "" : " ") + lastname); if (isNotBlank(firm)) { result.append((isBlank(result) ? "" : ", ") + firm); } -- 2.39.5 From 23544e74dbcd6449ed2f90c4e24109ac58d6d20a Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Sat, 5 Oct 2024 23:44:16 +0200 Subject: [PATCH 04/28] import role silent, and support role OPERATIONS_ALERT --- .../5-hs-office/503-relation/5030-hs-office-relation.sql | 1 + .../hsadminng/hs/migration/BaseOfficeDataImport.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/resources/db/changelog/5-hs-office/503-relation/5030-hs-office-relation.sql b/src/main/resources/db/changelog/5-hs-office/503-relation/5030-hs-office-relation.sql index 1c207177..4b15674b 100644 --- a/src/main/resources/db/changelog/5-hs-office/503-relation/5030-hs-office-relation.sql +++ b/src/main/resources/db/changelog/5-hs-office/503-relation/5030-hs-office-relation.sql @@ -12,6 +12,7 @@ CREATE TYPE HsOfficeRelationType AS ENUM ( 'DEBITOR', 'VIP_CONTACT', 'OPERATIONS', + 'OPERATIONS_ALERT', 'SUBSCRIBER'); CREATE CAST (character varying as HsOfficeRelationType) WITH INOUT AS IMPLICIT; diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index 5fee84df..be27edc8 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -55,7 +55,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { "subscriber:customers-announce" }; 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); // 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); } 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); } if (containsRole(rec, "contractual")) { -- 2.39.5 From c6531200d34d35049a5a59641e18406f500ee801 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Sun, 6 Oct 2024 00:03:31 +0200 Subject: [PATCH 05/28] add Person Type OPERATIONS_ALERT --- .../hsadminng/hs/office/relation/HsOfficeRelationType.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/relation/HsOfficeRelationType.java b/src/main/java/net/hostsharing/hsadminng/hs/office/relation/HsOfficeRelationType.java index 035c9b55..74c28314 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/relation/HsOfficeRelationType.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/relation/HsOfficeRelationType.java @@ -8,5 +8,6 @@ public enum HsOfficeRelationType { VIP_CONTACT, DEBITOR, OPERATIONS, + OPERATIONS_ALERT, SUBSCRIBER } -- 2.39.5 From 7914c9a9b80568a239d1ee94bc5770d8f2653e82 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 7 Oct 2024 22:28:39 +0200 Subject: [PATCH 06/28] add OPERATIONS_ALERT to api definition --- .../api-definition/hs-office/hs-office-relation-schemas.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/api-definition/hs-office/hs-office-relation-schemas.yaml b/src/main/resources/api-definition/hs-office/hs-office-relation-schemas.yaml index e0448a6f..17f3d6dd 100644 --- a/src/main/resources/api-definition/hs-office/hs-office-relation-schemas.yaml +++ b/src/main/resources/api-definition/hs-office/hs-office-relation-schemas.yaml @@ -13,6 +13,7 @@ components: - REPRESENTATIVE - VIP_CONTACT - OPERATIONS + - OPERATIONS_ALERT - SUBSCRIBER HsOfficeRelation: -- 2.39.5 From 6254cb0fcc3a4c1abeeac0d567ff399378f7d80e Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 7 Oct 2024 22:43:31 +0200 Subject: [PATCH 07/28] refactoring determinePersonType --- .../hs/migration/BaseOfficeDataImport.java | 77 +++++++++++++++---- .../hs/migration/ImportOfficeData.java | 2 +- 2 files changed, 64 insertions(+), 15 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index be27edc8..05213bc5 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -69,12 +69,25 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { 512167, // 11139, partner without contractual contact 512170, // 11142, partner without contractual contact 511725, // 10764, partner without contractual contact + 512177, // 11149, partner without contractual contact // 512171, // 11143, partner without partner contact -- exception -1 ); + private static final List LEGAL_PERSON_CONTACTS = Arrays.asList( + 90641, // we have two persons with same name, but one is the legal person + -1 + ); + private static final List INCORPORATED_FIRM_CONTACTS = Arrays.asList( + -1 + ); + private static final List NATURAL_PERSON_CONTACTS = Arrays.asList( + -1 + ); + private static final List IGNORE_CONTACTS = Arrays.asList( 90547, // Kontakt hat keine Rolle + 90312, // es gibt bereits einen partner Contact -1 ); @@ -1080,30 +1093,53 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { person.setGivenName(contactRecord.getString("first_name")); person.setFamilyName(contactRecord.getString("last_name")); person.setTradeName(contactRecord.getString("firma")); - determinePersonType(person, contactRecord.getString("roles")); + person.setPersonType(determinePersonType(contactRecord)); persons.put(contactRecord.getInteger("contact_id"), person); return person; } - private static void determinePersonType(final HsOfficePersonEntity person, final String roles) { - if (person.getTradeName().isBlank()) { - person.setPersonType(HsOfficePersonType.NATURAL_PERSON); + private static HsOfficePersonType determinePersonType(final Record contactRecord) { + String roles = contactRecord.getString("roles"); + String country = contactRecord.getString("country"); + String familyName = contactRecord.getString("last_name"); + String givenName = contactRecord.getString("first_name"); + String tradeName = contactRecord.getString("firma"); + + if (LEGAL_PERSON_CONTACTS.contains(contactRecord.getString("contact_id"))) { + return HsOfficePersonType.LEGAL_PERSON; + } else if (INCORPORATED_FIRM_CONTACTS.contains(contactRecord.getString("contact_id"))) { + return HsOfficePersonType.INCORPORATED_FIRM; + } else if (NATURAL_PERSON_CONTACTS.contains(contactRecord.getString("contact_id"))) { + return HsOfficePersonType.NATURAL_PERSON; + } + + if (tradeName.isBlank() || tradeName.startsWith("verstorben")) { + return HsOfficePersonType.NATURAL_PERSON; } else // contractual && !partner with a firm and a natural person name // should actually be split up into two persons // but the legacy database consists such records - if (roles.contains("contractual") && !roles.contains("partner") && - !person.getFamilyName().isBlank() && !person.getGivenName().isBlank()) { - person.setPersonType(HsOfficePersonType.NATURAL_PERSON); - } else if (endsWithWord(person.getTradeName(), "e.K.", "e.G.", "eG", "GmbH", "AG", "KG")) { - person.setPersonType(HsOfficePersonType.LEGAL_PERSON); - } else if (endsWithWord(person.getTradeName(), "OHG")) { - person.setPersonType(HsOfficePersonType.INCORPORATED_FIRM); - } else if (endsWithWord(person.getTradeName(), "GbR")) { - person.setPersonType(HsOfficePersonType.INCORPORATED_FIRM); + + if (endsWithWord(tradeName, "OHG", "GbR", "KG", "UG")) { + return HsOfficePersonType.INCORPORATED_FIRM; // Personengesellschaft. Gesellschafter haften persönlich. + } else if (containsWord(tradeName, "e.K.", "e.G.", "eG", "gGmbH", "GmbH", "mbH", "AG", "e.V.", "eV", "e.V") + || tradeName.toLowerCase().contains("haftungsbeschränkt") + || tradeName.toLowerCase().contains("stiftung") + || tradeName.toLowerCase().contains("stichting") + || tradeName.toLowerCase().contains("foundation") + || tradeName.toLowerCase().contains("schule") + || tradeName.toLowerCase().contains("Landkreis") + || tradeName.toLowerCase().contains("Behörde") + || tradeName.toLowerCase().contains("Bezirksamt") + ) { + return HsOfficePersonType.LEGAL_PERSON; // Haftungsbeschränkt + } else if (roles.contains("contractual") && !roles.contains("partner") && + !familyName.isBlank() && !givenName.isBlank()) { + // REPRESENTATIVES are always natural persons + return HsOfficePersonType.NATURAL_PERSON; } else { - person.setPersonType(HsOfficePersonType.UNKNOWN_PERSON_TYPE); + return HsOfficePersonType.UNKNOWN_PERSON_TYPE; } } @@ -1117,6 +1153,19 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { return false; } + private static boolean containsWord(final String value, final String... endings) { + final var lowerCaseValue = value.toLowerCase(); + for (String ending : endings) { + if (lowerCaseValue.isEqualTo(ending.toLowerCase()) || + lowerCaseValue.startsWith(ending.toLowerCase() + " ") || + lowerCaseValue.contains(" " + ending.toLowerCase() + " ") || + lowerCaseValue.endsWith(" " + ending.toLowerCase())) { + return true; + } + } + return false; + } + private void verifyContainsOnlyKnownRoles(final String roles) { final var allowedRolesSet = stream(KNOWN_ROLES).collect(Collectors.toSet()); final var givenRolesSet = stream(roles.replace(" ", "").split(",")).collect(Collectors.toSet()); diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java index add8f8ec..eda4891d 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java @@ -61,6 +61,6 @@ public class ImportOfficeData extends BaseOfficeDataImport { @BeforeEach void check() { - assertThat(jdbcUrl).isEqualTo("jdbc:tc:postgresql:15.5-bookworm:///importOfficeDataTC"); + //assertThat(jdbcUrl).isEqualTo("jdbc:tc:postgresql:15.5-bookworm:///importOfficeDataTC"); } } -- 2.39.5 From 3a55a861f3bcd49fe9bd0bd06bd38cf895109f03 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 8 Oct 2024 08:47:02 +0200 Subject: [PATCH 08/28] small fixes --- .../hsadminng/hs/migration/BaseOfficeDataImport.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index 05213bc5..705f1280 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -1129,9 +1129,13 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { || tradeName.toLowerCase().contains("stichting") || tradeName.toLowerCase().contains("foundation") || tradeName.toLowerCase().contains("schule") - || tradeName.toLowerCase().contains("Landkreis") - || tradeName.toLowerCase().contains("Behörde") - || tradeName.toLowerCase().contains("Bezirksamt") + || tradeName.toLowerCase().contains("verein") + || tradeName.toLowerCase().contains("gewerkschaft") + || tradeName.toLowerCase().contains("gesellschaft") + || tradeName.toLowerCase().contains("landkreis") + || tradeName.toLowerCase().contains("behörde") + || tradeName.toLowerCase().contains("bundesamt") + || tradeName.toLowerCase().contains("bezirksamt") ) { return HsOfficePersonType.LEGAL_PERSON; // Haftungsbeschränkt } else if (roles.contains("contractual") && !roles.contains("partner") && @@ -1156,7 +1160,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { private static boolean containsWord(final String value, final String... endings) { final var lowerCaseValue = value.toLowerCase(); for (String ending : endings) { - if (lowerCaseValue.isEqualTo(ending.toLowerCase()) || + if (lowerCaseValue.equals(ending.toLowerCase()) || lowerCaseValue.startsWith(ending.toLowerCase() + " ") || lowerCaseValue.contains(" " + ending.toLowerCase() + " ") || lowerCaseValue.endsWith(" " + ending.toLowerCase())) { -- 2.39.5 From 4eb7f2e19dbc0e260909dbe43cdd2e306f0eed99 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Thu, 10 Oct 2024 10:12:06 +0200 Subject: [PATCH 09/28] more fixes for persontype --- .../hsadminng/hs/migration/BaseOfficeDataImport.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index 705f1280..9865416a 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -1121,7 +1121,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { // should actually be split up into two persons // but the legacy database consists such records - if (endsWithWord(tradeName, "OHG", "GbR", "KG", "UG")) { + if (endsWithWord(tradeName, "OHG", "GbR", "KG", "UG", "PartGmbB", "mbB")) { return HsOfficePersonType.INCORPORATED_FIRM; // Personengesellschaft. Gesellschafter haften persönlich. } else if (containsWord(tradeName, "e.K.", "e.G.", "eG", "gGmbH", "GmbH", "mbH", "AG", "e.V.", "eV", "e.V") || tradeName.toLowerCase().contains("haftungsbeschränkt") @@ -1132,6 +1132,8 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { || tradeName.toLowerCase().contains("verein") || tradeName.toLowerCase().contains("gewerkschaft") || tradeName.toLowerCase().contains("gesellschaft") + || tradeName.toLowerCase().contains("kirche") + || tradeName.toLowerCase().contains("fraktion") || tradeName.toLowerCase().contains("landkreis") || tradeName.toLowerCase().contains("behörde") || tradeName.toLowerCase().contains("bundesamt") -- 2.39.5 From a3418a1d49975612904fb1951c5dd35d42fee6ba Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Thu, 10 Oct 2024 14:48:07 +0200 Subject: [PATCH 10/28] import: map for PERSON_TYPES_BY_CONTACT --- .../hs/migration/BaseOfficeDataImport.java | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index 7b404165..7d5a14ea 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -73,23 +73,17 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { -1 ); - private static final List LEGAL_PERSON_CONTACTS = Arrays.asList( - 90641, // we have two persons with same name, but one is the legal person - -1 - ); - private static final List INCORPORATED_FIRM_CONTACTS = Arrays.asList( - -1 - ); - private static final List NATURAL_PERSON_CONTACTS = Arrays.asList( - -1 - ); - private static final List IGNORE_CONTACTS = Arrays.asList( 90547, // Kontakt hat keine Rolle 90312, // es gibt bereits einen partner Contact -1 ); + private static final Map PERSON_TYPES_BY_CONTACT = Map.of( + 90641, HsOfficePersonType.LEGAL_PERSON, + -1, HsOfficePersonType.LEGAL_PERSON + ); + static Map contacts = new WriteOnceMap<>(); static Map persons = new WriteOnceMap<>(); static Map partners = new WriteOnceMap<>(); @@ -971,6 +965,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { HsOfficePersonEntity contactPerson = partnerPerson; if (!StringUtils.equals(rec.getString("firma"), partnerPerson.getTradeName()) || + partnerPerson.getPersonType() != determinePersonType(rec) || !StringUtils.equals(rec.getString("first_name"), partnerPerson.getGivenName()) || !StringUtils.equals(rec.getString("last_name"), partnerPerson.getFamilyName())) { contactPerson = addPerson(HsOfficePersonEntity.builder().build(), rec); @@ -1087,12 +1082,8 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { String givenName = contactRecord.getString("first_name"); String tradeName = contactRecord.getString("firma"); - if (LEGAL_PERSON_CONTACTS.contains(contactRecord.getString("contact_id"))) { - return HsOfficePersonType.LEGAL_PERSON; - } else if (INCORPORATED_FIRM_CONTACTS.contains(contactRecord.getString("contact_id"))) { - return HsOfficePersonType.INCORPORATED_FIRM; - } else if (NATURAL_PERSON_CONTACTS.contains(contactRecord.getString("contact_id"))) { - return HsOfficePersonType.NATURAL_PERSON; + if (PERSON_TYPES_BY_CONTACT.containsKey(contactRecord.getInteger("contact_id"))) { + return PERSON_TYPES_BY_CONTACT.get(contactRecord.getInteger("contact_id")); } if (tradeName.isBlank() || tradeName.startsWith("verstorben")) { -- 2.39.5 From d9a6507d77f0887f3233b773370f81f47377d50f Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 14 Oct 2024 12:38:27 +0200 Subject: [PATCH 11/28] replace coopsharestransaction_legacy_id with coopsharetx_legacy_id --- .../5116-hs-office-coopshares-migration.sql | 20 +++++++++---------- .../hs/migration/BaseOfficeDataImport.java | 2 +- .../hsadminng/hs/migration/CsvDataImport.java | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/resources/db/changelog/5-hs-office/511-coopshares/5116-hs-office-coopshares-migration.sql b/src/main/resources/db/changelog/5-hs-office/511-coopshares/5116-hs-office-coopshares-migration.sql index 8e620bcd..a13b54ef 100644 --- a/src/main/resources/db/changelog/5-hs-office/511-coopshares/5116-hs-office-coopshares-migration.sql +++ b/src/main/resources/db/changelog/5-hs-office/511-coopshares/5116-hs-office-coopshares-migration.sql @@ -7,7 +7,7 @@ --changeset michael.hoennig:hs-office-coopshares-MIGRATION-mapping endDelimiter:--// -- ---------------------------------------------------------------------------- -CREATE TABLE hs_office.coopsharestransaction_legacy_id +CREATE TABLE hs_office.coopsharetx_legacy_id ( uuid uuid NOT NULL REFERENCES hs_office.coopsharetx(uuid), member_share_id integer NOT NULL @@ -19,10 +19,10 @@ CREATE TABLE hs_office.coopsharestransaction_legacy_id --changeset michael.hoennig:hs-office-coopshares-MIGRATION-sequence endDelimiter:--// -- ---------------------------------------------------------------------------- -CREATE SEQUENCE IF NOT EXISTS hs_office.coopsharestransaction_legacy_id_seq +CREATE SEQUENCE IF NOT EXISTS hs_office.coopsharetx_legacy_id_seq AS integer START 1000000000 - OWNED BY hs_office.coopsharestransaction_legacy_id.member_share_id; + OWNED BY hs_office.coopsharetx_legacy_id.member_share_id; --// @@ -30,9 +30,9 @@ CREATE SEQUENCE IF NOT EXISTS hs_office.coopsharestransaction_legacy_id_seq --changeset michael.hoennig:hs-office-coopshares-MIGRATION-default endDelimiter:--// -- ---------------------------------------------------------------------------- -ALTER TABLE hs_office.coopsharestransaction_legacy_id +ALTER TABLE hs_office.coopsharetx_legacy_id ALTER COLUMN member_share_id - SET DEFAULT nextVal('hs_office.coopsharestransaction_legacy_id_seq'); + SET DEFAULT nextVal('hs_office.coopsharetx_legacy_id_seq'); --/ @@ -41,8 +41,8 @@ ALTER TABLE hs_office.coopsharestransaction_legacy_id -- ---------------------------------------------------------------------------- CALL base.defineContext('schema-migration'); -INSERT INTO hs_office.coopsharestransaction_legacy_id(uuid, member_share_id) - SELECT uuid, nextVal('hs_office.coopsharestransaction_legacy_id_seq') FROM hs_office.coopsharetx; +INSERT INTO hs_office.coopsharetx_legacy_id(uuid, member_share_id) + SELECT uuid, nextVal('hs_office.coopsharetx_legacy_id_seq') FROM hs_office.coopsharetx; --/ @@ -58,8 +58,8 @@ begin raise exception 'invalid usage of trigger'; end if; - INSERT INTO hs_office.coopsharestransaction_legacy_id VALUES - (NEW.uuid, nextVal('hs_office.coopsharestransaction_legacy_id_seq')); + INSERT INTO hs_office.coopsharetx_legacy_id VALUES + (NEW.uuid, nextVal('hs_office.coopsharetx_legacy_id_seq')); return NEW; end; $$; @@ -83,7 +83,7 @@ begin raise exception 'invalid usage of trigger'; end if; - DELETE FROM hs_office.coopsharestransaction_legacy_id + DELETE FROM hs_office.coopsharetx_legacy_id WHERE uuid = OLD.uuid; return OLD; diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index de90103e..2ae7d76e 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -677,7 +677,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { jpaAttempt.transacted(() -> { context(rbacSuperuser); coopShares.forEach(this::persist); - updateLegacyIds(coopShares, "hs_office.coopsharestransaction_legacy_id", "member_share_id"); + updateLegacyIds(coopShares, "hs_office.coopsharetx_legacy_id", "member_share_id"); }).assertSuccessful(); diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/CsvDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/CsvDataImport.java index d04fc0a5..1f45dcce 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/CsvDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/CsvDataImport.java @@ -255,7 +255,7 @@ public class CsvDataImport extends ContextBasedTest { em.createNativeQuery("delete from hs_office.coopassettx where true").executeUpdate(); em.createNativeQuery("delete from hs_office.coopassettx_legacy_id where true").executeUpdate(); em.createNativeQuery("delete from hs_office.coopsharetx where true").executeUpdate(); - em.createNativeQuery("delete from hs_office.coopsharestransaction_legacy_id where true").executeUpdate(); + em.createNativeQuery("delete from hs_office.coopsharetx_legacy_id where true").executeUpdate(); em.createNativeQuery("delete from hs_office.membership where true").executeUpdate(); em.createNativeQuery("delete from hs_office.sepamandate where true").executeUpdate(); em.createNativeQuery("delete from hs_office.sepamandate_legacy_id where true").executeUpdate(); @@ -275,7 +275,7 @@ public class CsvDataImport extends ContextBasedTest { em.createNativeQuery("alter sequence hs_office.contact_legacy_id_seq restart with 1000000000;").executeUpdate(); em.createNativeQuery("alter sequence hs_office.coopassettx_legacy_id_seq restart with 1000000000;") .executeUpdate(); - em.createNativeQuery("alter sequence public.hs_office.coopsharestransaction_legacy_id_seq restart with 1000000000;") + em.createNativeQuery("alter sequence public.hs_office.coopsharetx_legacy_id_seq restart with 1000000000;") .executeUpdate(); em.createNativeQuery("alter sequence public.hs_office.partner_legacy_id_seq restart with 1000000000;") .executeUpdate(); -- 2.39.5 From 0e58ccfe2cc077796d9fbc13538aaa0dc91e9080 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 29 Oct 2024 09:12:27 +0100 Subject: [PATCH 12/28] add view for Kimai: hs_integration.time_customer --- .../9-hs-global/9100-hs-integration-schema.sql | 8 ++++++++ .../9-hs-global/9101-integration-kimai.sql | 17 +++++++++++++++++ .../db/changelog/db.changelog-master.yaml | 4 ++++ 3 files changed, 29 insertions(+) create mode 100644 src/main/resources/db/changelog/9-hs-global/9100-hs-integration-schema.sql create mode 100644 src/main/resources/db/changelog/9-hs-global/9101-integration-kimai.sql diff --git a/src/main/resources/db/changelog/9-hs-global/9100-hs-integration-schema.sql b/src/main/resources/db/changelog/9-hs-global/9100-hs-integration-schema.sql new file mode 100644 index 00000000..1f0a8a44 --- /dev/null +++ b/src/main/resources/db/changelog/9-hs-global/9100-hs-integration-schema.sql @@ -0,0 +1,8 @@ +--liquibase formatted sql + + +-- ============================================================================ +--changeset timotheus.pokorra:hs-integration-SCHEMA endDelimiter:--// +-- ---------------------------------------------------------------------------- +CREATE SCHEMA hs_integration; +--// diff --git a/src/main/resources/db/changelog/9-hs-global/9101-integration-kimai.sql b/src/main/resources/db/changelog/9-hs-global/9101-integration-kimai.sql new file mode 100644 index 00000000..895936c1 --- /dev/null +++ b/src/main/resources/db/changelog/9-hs-global/9101-integration-kimai.sql @@ -0,0 +1,17 @@ +--liquibase formatted sql + +-- ============================================================================ +--changeset timotheus.pokorra:hs-global-integration-kimai endDelimiter:--// +CREATE OR REPLACE VIEW hs_integration.time_customer AS + SELECT p.partnernumber, debitor.defaultprefix + FROM hs_office.partner p + JOIN hs_office.relation AS pRel + ON pRel.type = 'PARTNER' + AND pRel.uuid = p.partnerRelUuid + JOIN hs_office.relation AS dRel + ON dRel.type = 'DEBITOR' + AND dRel.anchorUuid = pRel.holderUuid + JOIN hs_office.debitor AS debitor + ON debitor.debitorreluuid = dRel.uuid + AND debitor.debitornumbersuffix = '00'; +--// \ No newline at end of file diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml index 78622a51..20fc9193 100644 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -171,3 +171,7 @@ databaseChangeLog: file: db/changelog/7-hs-hosting/701-hosting-asset/7018-hs-hosting-asset-test-data.sql - include: file: db/changelog/9-hs-global/9000-statistics.sql + - include: + file: db/changelog/9-hs-global/9100-hs-integration-schema.sql + - include: + file: db/changelog/9-hs-global/9101-integration-kimai.sql \ No newline at end of file -- 2.39.5 From db6e4a75309bfc374dfa8778e236d52f38429d2d Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 29 Oct 2024 09:18:25 +0100 Subject: [PATCH 13/28] small fixes for imported data --- .../hsadminng/hs/migration/BaseOfficeDataImport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index 2ae7d76e..dd745b36 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -69,7 +69,6 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { 512170, // 11142, partner without contractual contact 511725, // 10764, partner without contractual contact 512177, // 11149, partner without contractual contact - // 512171, // 11143, partner without partner contact -- exception -1 ); @@ -80,6 +79,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { ); private static final Map PERSON_TYPES_BY_CONTACT = Map.of( + 90072, HsOfficePersonType.NATURAL_PERSON, 90641, HsOfficePersonType.LEGAL_PERSON, -1, HsOfficePersonType.LEGAL_PERSON ); -- 2.39.5 From d4b57cf047513dc9ac40c3a25c9bc19c7e8d464b Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 29 Oct 2024 10:16:21 +0100 Subject: [PATCH 14/28] dop check method fro ImportOfficeData class --- .../hostsharing/hsadminng/hs/migration/ImportOfficeData.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java index eda4891d..8bb99cb8 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java @@ -58,9 +58,4 @@ import static org.assertj.core.api.Assertions.assertThat; @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @ExtendWith(OrderedDependedTestsExtension.class) public class ImportOfficeData extends BaseOfficeDataImport { - - @BeforeEach - void check() { - //assertThat(jdbcUrl).isEqualTo("jdbc:tc:postgresql:15.5-bookworm:///importOfficeDataTC"); - } } -- 2.39.5 From 900d77e8a723e0260b7f9727810f1f17be06f26f Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 29 Oct 2024 10:20:05 +0100 Subject: [PATCH 15/28] rename db changelog file for kimai view --- .../{9101-integration-kimai.sql => 9110-integration-kimai.sql} | 0 src/main/resources/db/changelog/db.changelog-master.yaml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/main/resources/db/changelog/9-hs-global/{9101-integration-kimai.sql => 9110-integration-kimai.sql} (100%) diff --git a/src/main/resources/db/changelog/9-hs-global/9101-integration-kimai.sql b/src/main/resources/db/changelog/9-hs-global/9110-integration-kimai.sql similarity index 100% rename from src/main/resources/db/changelog/9-hs-global/9101-integration-kimai.sql rename to src/main/resources/db/changelog/9-hs-global/9110-integration-kimai.sql diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml index 20fc9193..dda5e0d9 100644 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -174,4 +174,4 @@ databaseChangeLog: - include: file: db/changelog/9-hs-global/9100-hs-integration-schema.sql - include: - file: db/changelog/9-hs-global/9101-integration-kimai.sql \ No newline at end of file + file: db/changelog/9-hs-global/9110-integration-kimai.sql \ No newline at end of file -- 2.39.5 From e15d82ac9c74d5bf82ba91badaae125f5c61cd0e Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 11 Nov 2024 16:46:43 +0100 Subject: [PATCH 16/28] import title and salutation for person --- .../hsadminng/hs/migration/BaseOfficeDataImport.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index 858e302d..6e8d0af9 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -1065,10 +1065,11 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { } private HsOfficePersonEntity addPerson(final HsOfficePersonEntity person, final Record contactRecord) { - // TODO: title+salutation: add to person - person.setGivenName(contactRecord.getString("first_name")); - person.setFamilyName(contactRecord.getString("last_name")); - person.setTradeName(contactRecord.getString("firma")); + person.setSalutation(contactRecord.getString("salut").trim()); + person.setTitle(contactRecord.getString("title").trim()); + person.setGivenName(contactRecord.getString("first_name").trim()); + person.setFamilyName(contactRecord.getString("last_name").trim()); + person.setTradeName(contactRecord.getString("firma").trim()); person.setPersonType(determinePersonType(contactRecord)); persons.put(contactRecord.getInteger("contact_id"), person); -- 2.39.5 From 4d7b6ca8ababa9813a6e46f03747135f8077170d Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 11 Nov 2024 22:54:35 +0100 Subject: [PATCH 17/28] more fixes for import --- .../hsadminng/hs/migration/BaseOfficeDataImport.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index 480cef6d..033f6637 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -81,6 +81,8 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { private static final Map PERSON_TYPES_BY_CONTACT = Map.of( 90072, HsOfficePersonType.NATURAL_PERSON, 90641, HsOfficePersonType.LEGAL_PERSON, + 90368, HsOfficePersonType.LEGAL_PERSON, + 90564, HsOfficePersonType.NATURAL_PERSON, -1, HsOfficePersonType.LEGAL_PERSON ); @@ -966,6 +968,8 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { HsOfficePersonEntity contactPerson = partnerPerson; if (!StringUtils.equals(rec.getString("firma"), partnerPerson.getTradeName()) || partnerPerson.getPersonType() != determinePersonType(rec) || + !StringUtils.equals(rec.getString("title"), partnerPerson.getTitle()) || + !StringUtils.equals(rec.getString("salut"), partnerPerson.getSalutation()) || !StringUtils.equals(rec.getString("first_name"), partnerPerson.getGivenName()) || !StringUtils.equals(rec.getString("last_name"), partnerPerson.getFamilyName())) { contactPerson = addPerson(HsOfficePersonEntity.builder().build(), rec); -- 2.39.5 From 3eafbabc3dcca5210c54edda4fea2f92c1edb8bd Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Fri, 15 Nov 2024 09:35:26 +0100 Subject: [PATCH 18/28] import: exclude exceptions --- .../hsadminng/hs/migration/BaseOfficeDataImport.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index 033f6637..8e881062 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -65,16 +65,10 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { static int relationId = INITIAL_RELATION_ID; private static final List IGNORE_BUSINESS_PARTNERS = Arrays.asList( - 512167, // 11139, partner without contractual contact - 512170, // 11142, partner without contractual contact - 511725, // 10764, partner without contractual contact - 512177, // 11149, partner without contractual contact -1 ); private static final List IGNORE_CONTACTS = Arrays.asList( - 90547, // Kontakt hat keine Rolle - 90312, // es gibt bereits einen partner Contact -1 ); -- 2.39.5 From a2390149e96f32cafe8566467c601325ac56687c Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Fri, 15 Nov 2024 09:53:25 +0100 Subject: [PATCH 19/28] dump: revert exceptions --- src/test/resources/migration/dump.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/resources/migration/dump.sh b/src/test/resources/migration/dump.sh index 53ad9ac4..c0af6492 100644 --- a/src/test/resources/migration/dump.sh +++ b/src/test/resources/migration/dump.sh @@ -36,13 +36,11 @@ dump "select sepa_mandat_id, bp_id, bank_customer, bank_name, bank_iban, bank_bi dump "select member_asset_id, bp_id, date, action, amount, comment from member_asset - WHERE bp_id NOT IN (511912) order by member_asset_id" \ "office/asset_transactions.csv" dump "select member_share_id, bp_id, date, action, quantity, comment from member_share - WHERE bp_id NOT IN (511912) order by member_share_id" \ "office/share_transactions.csv" -- 2.39.5 From 4aecd380955d3aa5ee3568ccbb79ebc8cc7c2a7a Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Sat, 16 Nov 2024 10:17:35 +0100 Subject: [PATCH 20/28] adjust business glossary for OPERATIONS and OPERATIONS_ALERT role --- doc/business-glossary-de.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/business-glossary-de.md b/doc/business-glossary-de.md index 65d316a1..b0f3002d 100644 --- a/doc/business-glossary-de.md +++ b/doc/business-glossary-de.md @@ -79,12 +79,26 @@ der Person des VIP-Contact (_Holder_) zur repräsentierten Person (_Anchor_) dar ### Operations-Contact -Ein _Operations-_Contact_ ist_ eine natürliche Person, die für einen Geschäftspartner technischer Ansprechpartner ist +Ein _Operations-_Contact_ ist_ eine natürliche Person, die für einen Geschäftspartner technischer Ansprechpartner ist. + +Ein Seiteneffekt ist, dass diese Person im Ticketsystem Znuny direkt dem Geschäftspartner zugeordnet werden kann. + +Im Legacy System waren das die Kontakte mit der Rolle `operation` und `silent`. Implementiert ist der _Operations-Contact_ als eine besondere Form der [Relation](#Relation) der Person des _Operations-Contact_ (_Holder_) zur repräsentierten Person (_Anchor_) dargestellt. +### OperationsAlert-Contact + +Ein _OperationsAlert-_Contact_ ist_ eine natürliche Person, die für einen Geschäftspartner bei technischen Probleme kontaktiert werden soll. + +Im Legacy System waren das die Kontakte mit der Rolle `operation`. + +Implementiert ist der _OperationsAlert-Contact_ als eine besondere Form der [Relation](#Relation) +der Person des _OperationsAlert-Contact_ (_Holder_) zur repräsentierten Person (_Anchor_) dargestellt. + + ### Subscriber-Contact Ein _Subscriber-_Contact_ ist_ eine natürliche Person, die für einen Geschäftspartner eine bestimmte Mailingliste abonniert. -- 2.39.5 From fc70524111591283b049e59aa6afc747f9f84207 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Sat, 16 Nov 2024 10:43:40 +0100 Subject: [PATCH 21/28] add view for znuny --- .../9-hs-global/9120-integration-znuny.sql | 39 +++++++++++++++++++ .../db/changelog/db.changelog-master.yaml | 4 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql diff --git a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql new file mode 100644 index 00000000..ebc097b4 --- /dev/null +++ b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql @@ -0,0 +1,39 @@ +CREATE OR REPLACE VIEW hs_integration.ticket_customer_user AS +SELECT + max(p.partnernumber::text) as number, + max(debitor.defaultprefix) as code, + c.emailaddresses->>'main' as login, + max(per.salutation) as salut, + max(per.givenname) as firstname, + max(per.familyname) as lastname, + max(per.title) as title, + max(per.tradename) as firma, + max(c.postaladdress->>'co') as co, + max(c.postaladdress->>'street') as street, + max(c.postaladdress->>'zipcode') as zipcode, + max(c.postaladdress->>'city') as city, + max(c.postaladdress->>'country') as country, + c.phonenumbers->>'phone_office' as phoneoffice, + c.phonenumbers->>'phone_mobile' as mobile, + c.phonenumbers->>'phone_private' as phoneprivate, + c.phonenumbers->>'fax' as fax, + c.emailaddresses->>'main' as email, + string_agg(CASE WHEN relation.mark IS NULL THEN relation.type::text ELSE CONCAT(relation.type::text, ':', relation.mark::text) END, '/'::text) AS comment, + 1 AS valid + FROM hs_office.partner p + JOIN hs_office.relation AS pRel + ON pRel.type = 'PARTNER' + AND pRel.uuid = p.partnerRelUuid + JOIN hs_office.relation AS dRel + ON dRel.type = 'DEBITOR' + AND dRel.anchorUuid = pRel.holderUuid + JOIN hs_office.debitor AS debitor + ON debitor.debitorreluuid = dRel.uuid + AND debitor.debitornumbersuffix = '00' + JOIN hs_office.relation AS rs1 ON rs1.uuid = p.partnerreluuid AND rs1.type = 'PARTNER' + JOIN hs_office.relation AS relation ON relation.anchoruuid = rs1.holderuuid + JOIN hs_office.contact AS c ON c.uuid = relation.contactuuid + JOIN hs_office.person AS per ON per.uuid = relation.holderuuid +where debitor.defaultprefix != 'hsh' +and relation.type != 'DEBITOR' +group by c.emailaddresses, c.phonenumbers; diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml index dda5e0d9..b97e3f2d 100644 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -174,4 +174,6 @@ databaseChangeLog: - include: file: db/changelog/9-hs-global/9100-hs-integration-schema.sql - include: - file: db/changelog/9-hs-global/9110-integration-kimai.sql \ No newline at end of file + file: db/changelog/9-hs-global/9110-integration-kimai.sql + - include: + file: db/changelog/9-hs-global/9120-integration-znuny.sql \ No newline at end of file -- 2.39.5 From 8f790b0abe201d70a215170b8c5e904f0eb6c90a Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Sat, 16 Nov 2024 10:50:22 +0100 Subject: [PATCH 22/28] format sql for liquibase --- .../db/changelog/9-hs-global/9120-integration-znuny.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql index ebc097b4..16e0dbb1 100644 --- a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql +++ b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql @@ -1,3 +1,8 @@ + +--liquibase formatted sql + +-- ============================================================================ +--changeset timotheus.pokorra:hs-global-integration-znuny endDelimiter:--// CREATE OR REPLACE VIEW hs_integration.ticket_customer_user AS SELECT max(p.partnernumber::text) as number, @@ -37,3 +42,4 @@ SELECT where debitor.defaultprefix != 'hsh' and relation.type != 'DEBITOR' group by c.emailaddresses, c.phonenumbers; +--// \ No newline at end of file -- 2.39.5 From cbb45b4d46ce560b91c9411c0f2fb0715c541612 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 18 Nov 2024 11:07:38 +0100 Subject: [PATCH 23/28] add todo.impl for znuny and kimai view --- .../db/changelog/9-hs-global/9110-integration-kimai.sql | 1 + .../db/changelog/9-hs-global/9120-integration-znuny.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/resources/db/changelog/9-hs-global/9110-integration-kimai.sql b/src/main/resources/db/changelog/9-hs-global/9110-integration-kimai.sql index 895936c1..fe6266d3 100644 --- a/src/main/resources/db/changelog/9-hs-global/9110-integration-kimai.sql +++ b/src/main/resources/db/changelog/9-hs-global/9110-integration-kimai.sql @@ -2,6 +2,7 @@ -- ============================================================================ --changeset timotheus.pokorra:hs-global-integration-kimai endDelimiter:--// +-- TODO.impl: also select column debitorNumber and do not filter anymore for '00' CREATE OR REPLACE VIEW hs_integration.time_customer AS SELECT p.partnernumber, debitor.defaultprefix FROM hs_office.partner p diff --git a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql index 16e0dbb1..7c8f0d7e 100644 --- a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql +++ b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql @@ -3,6 +3,7 @@ -- ============================================================================ --changeset timotheus.pokorra:hs-global-integration-znuny endDelimiter:--// +-- TODO.impl: also select column debitorNumber and do not filter anymore for '00' CREATE OR REPLACE VIEW hs_integration.ticket_customer_user AS SELECT max(p.partnernumber::text) as number, -- 2.39.5 From 141f761ded31b0a2d74c4c953c257434b2b40807 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 18 Nov 2024 12:47:12 +0100 Subject: [PATCH 24/28] fix fields for znuny view --- .../9-hs-global/9120-integration-znuny.sql | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql index 7c8f0d7e..adaa1ce4 100644 --- a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql +++ b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql @@ -9,19 +9,20 @@ SELECT max(p.partnernumber::text) as number, max(debitor.defaultprefix) as code, c.emailaddresses->>'main' as login, - max(per.salutation) as salut, - max(per.givenname) as firstname, - max(per.familyname) as lastname, - max(per.title) as title, - max(per.tradename) as firma, - max(c.postaladdress->>'co') as co, + (CASE WHEN max(per.salutation) <> '' THEN max(per.salutation) ELSE NULL END) as salut, + (CASE WHEN max(per.givenname) <> '' THEN max(per.givenname) ELSE NULL END) as firstname, + (CASE WHEN max(per.familyname) <> '' THEN max(per.familyname) ELSE NULL END) as lastname, + (CASE WHEN max(per.title) <> '' THEN max(per.title) ELSE NULL END) as title, + (CASE WHEN max(per.tradename) <> '' THEN max(per.tradename) ELSE NULL END) as firma, + (CASE WHEN max(c.postaladdress->>'co') <> '' THEN max(c.postaladdress->>'co') ELSE NULL END) as co, max(c.postaladdress->>'street') as street, max(c.postaladdress->>'zipcode') as zipcode, max(c.postaladdress->>'city') as city, max(c.postaladdress->>'country') as country, - c.phonenumbers->>'phone_office' as phoneoffice, + concat_ws(', '::text, c.phonenumbers->>'phone_office', c.phonenumbers->>'phone_private') AS phone, + c.phonenumbers->>'phone_office' as phone_office, + c.phonenumbers->>'phone_private' as phone_private, c.phonenumbers->>'phone_mobile' as mobile, - c.phonenumbers->>'phone_private' as phoneprivate, c.phonenumbers->>'fax' as fax, c.emailaddresses->>'main' as email, string_agg(CASE WHEN relation.mark IS NULL THEN relation.type::text ELSE CONCAT(relation.type::text, ':', relation.mark::text) END, '/'::text) AS comment, -- 2.39.5 From bb2bdea788f7f1acf8c26ea69176e956f29a9823 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 18 Nov 2024 13:05:19 +0100 Subject: [PATCH 25/28] more fixes for znuny view --- .../db/changelog/9-hs-global/9120-integration-znuny.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql index adaa1ce4..eeea88a4 100644 --- a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql +++ b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql @@ -41,7 +41,6 @@ SELECT JOIN hs_office.relation AS relation ON relation.anchoruuid = rs1.holderuuid JOIN hs_office.contact AS c ON c.uuid = relation.contactuuid JOIN hs_office.person AS per ON per.uuid = relation.holderuuid -where debitor.defaultprefix != 'hsh' -and relation.type != 'DEBITOR' -group by c.emailaddresses, c.phonenumbers; +WHERE (debitor.defaultprefix != 'hsh' OR (p.partnernumber = 10000 AND c.emailaddresses->>'main' = 'hostmaster@hostsharing.net')) +GROUP BY c.emailaddresses, c.phonenumbers; --// \ No newline at end of file -- 2.39.5 From 6bd872703d51452058ae1c739c55c60f7b692d71 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 19 Nov 2024 18:26:53 +0100 Subject: [PATCH 26/28] fix for view for znuny --- .../9-hs-global/9120-integration-znuny.sql | 120 +++++++++++++----- 1 file changed, 88 insertions(+), 32 deletions(-) diff --git a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql index eeea88a4..0247ec53 100644 --- a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql +++ b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql @@ -4,43 +4,99 @@ -- ============================================================================ --changeset timotheus.pokorra:hs-global-integration-znuny endDelimiter:--// -- TODO.impl: also select column debitorNumber and do not filter anymore for '00' -CREATE OR REPLACE VIEW hs_integration.ticket_customer_user AS -SELECT - max(p.partnernumber::text) as number, - max(debitor.defaultprefix) as code, - c.emailaddresses->>'main' as login, - (CASE WHEN max(per.salutation) <> '' THEN max(per.salutation) ELSE NULL END) as salut, - (CASE WHEN max(per.givenname) <> '' THEN max(per.givenname) ELSE NULL END) as firstname, - (CASE WHEN max(per.familyname) <> '' THEN max(per.familyname) ELSE NULL END) as lastname, - (CASE WHEN max(per.title) <> '' THEN max(per.title) ELSE NULL END) as title, - (CASE WHEN max(per.tradename) <> '' THEN max(per.tradename) ELSE NULL END) as firma, - (CASE WHEN max(c.postaladdress->>'co') <> '' THEN max(c.postaladdress->>'co') ELSE NULL END) as co, - max(c.postaladdress->>'street') as street, - max(c.postaladdress->>'zipcode') as zipcode, - max(c.postaladdress->>'city') as city, - max(c.postaladdress->>'country') as country, - concat_ws(', '::text, c.phonenumbers->>'phone_office', c.phonenumbers->>'phone_private') AS phone, - c.phonenumbers->>'phone_office' as phone_office, +CREATE OR REPLACE VIEW hs_integration.contact AS + SELECT DISTINCT ON (uuid) + partner.partnernumber as partnernumber, + debitor.defaultprefix as defaultprefix, + c.uuid as uuid, + (CASE WHEN per.salutation <> '' THEN per.salutation ELSE NULL END) as salutation, + (CASE WHEN per.givenname <> '' THEN per.givenname ELSE NULL END) as givenname, + (CASE WHEN per.familyname <> '' THEN per.familyname ELSE NULL END) as familyname, + (CASE WHEN per.title <> '' THEN per.title ELSE NULL END) as title, + (CASE WHEN per.tradename <> '' THEN per.tradename ELSE NULL END) as tradename, + (CASE WHEN c.postaladdress->>'co' <> '' THEN c.postaladdress->>'co' ELSE NULL END) as co, + c.postaladdress->>'street' as street, + c.postaladdress->>'zipcode' as zipcode, + c.postaladdress->>'city' as city, + c.postaladdress->>'country' as country, c.phonenumbers->>'phone_private' as phone_private, - c.phonenumbers->>'phone_mobile' as mobile, + c.phonenumbers->>'phone_office' as phone_office, + c.phonenumbers->>'phone_mobile' as phone_mobile, c.phonenumbers->>'fax' as fax, - c.emailaddresses->>'main' as email, - string_agg(CASE WHEN relation.mark IS NULL THEN relation.type::text ELSE CONCAT(relation.type::text, ':', relation.mark::text) END, '/'::text) AS comment, - 1 AS valid - FROM hs_office.partner p - JOIN hs_office.relation AS pRel + c.emailaddresses->>'main' as email + FROM hs_office.partner AS partner + JOIN hs_office.partner_legacy_id AS partner_lid ON partner_lid.uuid = partner.uuid + JOIN hs_office.relation AS pRel ON pRel.type = 'PARTNER' - AND pRel.uuid = p.partnerRelUuid - JOIN hs_office.relation AS dRel + AND pRel.uuid = partner.partnerRelUuid + JOIN hs_office.relation AS dRel ON dRel.type = 'DEBITOR' AND dRel.anchorUuid = pRel.holderUuid - JOIN hs_office.debitor AS debitor + JOIN hs_office.debitor AS debitor ON debitor.debitorreluuid = dRel.uuid AND debitor.debitornumbersuffix = '00' - JOIN hs_office.relation AS rs1 ON rs1.uuid = p.partnerreluuid AND rs1.type = 'PARTNER' - JOIN hs_office.relation AS relation ON relation.anchoruuid = rs1.holderuuid - JOIN hs_office.contact AS c ON c.uuid = relation.contactuuid - JOIN hs_office.person AS per ON per.uuid = relation.holderuuid -WHERE (debitor.defaultprefix != 'hsh' OR (p.partnernumber = 10000 AND c.emailaddresses->>'main' = 'hostmaster@hostsharing.net')) -GROUP BY c.emailaddresses, c.phonenumbers; + JOIN hs_office.contact AS c ON c.uuid = pRel.contactuuid + JOIN hs_office.person AS per ON per.uuid = pRel.holderuuid + UNION + SELECT DISTINCT ON (uuid) + partner.partnernumber as partnernumber, + debitor.defaultprefix as defaultprefix, + c.uuid as uuid, + (CASE WHEN per.salutation <> '' THEN per.salutation ELSE NULL END) as salutation, + (CASE WHEN per.givenname <> '' THEN per.givenname ELSE NULL END) as givenname, + (CASE WHEN per.familyname <> '' THEN per.familyname ELSE NULL END) as familyname, + (CASE WHEN per.title <> '' THEN per.title ELSE NULL END) as title, + (CASE WHEN per.tradename <> '' THEN per.tradename ELSE NULL END) as tradename, + (CASE WHEN c.postaladdress->>'co' <> '' THEN c.postaladdress->>'co' ELSE NULL END) as co, + c.postaladdress->>'street' as street, + c.postaladdress->>'zipcode' as zipcode, + c.postaladdress->>'city' as city, + c.postaladdress->>'country' as country, + c.phonenumbers->>'phone_private' as phone_private, + c.phonenumbers->>'phone_office' as phone_office, + c.phonenumbers->>'phone_mobile' as phone_mobile, + c.phonenumbers->>'fax' as fax, + c.emailaddresses->>'main' as email + FROM hs_office.partner AS partner + JOIN hs_office.relation AS pRel + ON pRel.type = 'PARTNER' + AND pRel.uuid = partner.partnerRelUuid + JOIN hs_office.relation AS dRel + ON dRel.type = 'DEBITOR' + AND dRel.anchorUuid = pRel.holderUuid + JOIN hs_office.debitor AS debitor + ON debitor.debitorreluuid = dRel.uuid + AND debitor.debitornumbersuffix = '00' + JOIN hs_office.relation AS rs1 ON rs1.uuid = partner.partnerreluuid AND rs1.type = 'PARTNER' + JOIN hs_office.relation AS relation ON relation.anchoruuid = rs1.holderuuid + JOIN hs_office.contact AS c ON c.uuid = relation.contactuuid + JOIN hs_office.person AS per ON per.uuid = relation.holderuuid; + +CREATE OR REPLACE VIEW hs_integration.ticket_customer_user AS + SELECT c.uuid, + max(c.partnernumber)::text as number, + max(c.defaultprefix) as code, + max(c.email) as login, + max(c.salutation) as salut, + max(c.givenname) as firstname, + max(c.familyname) as lastname, + max(c.title) as title, + max(c.tradename) as firma, + max(c.co) as co, + max(c.street) as street, + max(c.zipcode) as zipcode, + max(c.city) as city, + max(c.country) as country, + max(concat_ws(', '::text, c.phone_office, c.phone_private)) AS phone, + max(c.phone_private) as phone_private, + max(c.phone_office) as phone_office, + max(c.phone_mobile) as mobile, + max(c.fax) as fax, + max(c.email) as email, + string_agg(CASE WHEN relation.mark IS NULL THEN relation.type::text ELSE CONCAT(relation.type::text, ':', relation.mark::text) END, '/'::text) AS comment, + 1 AS valid + FROM hs_integration.contact AS c + JOIN hs_office.relation AS relation ON c.uuid = relation.contactuuid + WHERE (c.defaultprefix != 'hsh' OR (c.partnernumber = 10000 AND c.email = 'hostmaster@hostsharing.net')) + GROUP BY c.uuid; --// \ No newline at end of file -- 2.39.5 From d5c241015d8482df93a64b48b4bcf9b322206922 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 19 Nov 2024 19:05:04 +0100 Subject: [PATCH 27/28] fixes for tests for Data Import --- .../hs/migration/BaseOfficeDataImport.java | 212 +++++++++--------- 1 file changed, 111 insertions(+), 101 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index 11a3be37..04ebc1db 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -195,56 +195,56 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { assertThat(toJsonFormattedString(partners)).isEqualToIgnoringWhitespace(""" { - 100=partner(P-10003: ?? Michael Mellis, Herr Michael Mellis , Michael Mellis), - 120=partner(P-10020: LP JM GmbH, Herr Philip Meyer-Contract , JM GmbH), - 122=partner(P-11022: ?? Test PS, Petra Schmidt , Test PS), - 132=partner(P-10152: ?? Ragnar IT-Beratung, Herr Ragnar Richter , Ragnar IT-Beratung), - 190=partner(P-19090: NP Camus, Cecilia, Frau Cecilia Camus ), + 100=partner(P-10003: ?? Michael Mellis, Herr Michael Mellis, Michael Mellis), + 120=partner(P-10020: LP JM GmbH, Herr Philip Meyer-Contract, JM GmbH), + 122=partner(P-11022: ?? Test PS, Petra Schmidt, Test PS), + 132=partner(P-10152: ?? Ragnar IT-Beratung, Herr Ragnar Richter, Ragnar IT-Beratung), + 190=partner(P-19090: NP Camus, Cecilia, Frau Cecilia Camus), 199=partner(P-19999: null null, null), - 213=partner(P-10000: LP Hostsharing e.G., Firma Hostmaster Hostsharing , Hostsharing e.G.), - 541=partner(P-11018: ?? Wasserwerk Südholstein, Frau Christiane Milberg , Wasserwerk Südholstein), - 542=partner(P-11019: ?? Das Perfekte Haus, Herr Richard Wiese , Das Perfekte Haus) + 213=partner(P-10000: LP Hostsharing e.G., Firma Hostmaster Hostsharing, Hostsharing e.G.), + 541=partner(P-11018: ?? Wasserwerk Südholstein, Frau Christiane Milberg, Wasserwerk Südholstein), + 542=partner(P-11019: ?? Das Perfekte Haus, Herr Richard Wiese, Das Perfekte Haus) } """); assertThat(toJsonFormattedString(contacts)).isEqualToIgnoringWhitespace(""" { - 100=contact(caption='Herr Michael Mellis , Michael Mellis', emailAddresses='{ "main": "michael@Mellis.example.org"}'), + 100=contact(caption='Herr Michael Mellis, Michael Mellis', emailAddresses='{ "main": "michael@Mellis.example.org"}'), 1200=contact(caption='JM e.K.', emailAddresses='{ "main": "jm-ex-partner@example.org"}'), - 1201=contact(caption='Frau Dr. Jenny Meyer-Billing , JM GmbH', emailAddresses='{ "main": "jm-billing@example.org"}'), - 1202=contact(caption='Herr Andrew Meyer-Operation , JM GmbH', emailAddresses='{ "main": "am-operation@example.org"}'), - 1203=contact(caption='Herr Philip Meyer-Contract , JM GmbH', emailAddresses='{ "main": "pm-partner@example.org"}'), - 1204=contact(caption='Frau Tammy Meyer-VIP , JM GmbH', emailAddresses='{ "main": "tm-vip@example.org"}'), - 1301=contact(caption='Petra Schmidt , Test PS', emailAddresses='{ "main": "ps@example.com"}'), - 132=contact(caption='Herr Ragnar Richter , Ragnar IT-Beratung', emailAddresses='{ "main": "hostsharing@ragnar-richter.de"}'), - 1401=contact(caption='Frau Frauke Fanninga ', emailAddresses='{ "main": "ff@example.org"}'), - 1501=contact(caption='Frau Cecilia Camus ', emailAddresses='{ "main": "cc@example.org"}'), - 212=contact(caption='Firma Hostmaster Hostsharing , Hostsharing e.G.', emailAddresses='{ "main": "hostmaster@hostsharing.net"}'), - 90436=contact(caption='Frau Christiane Milberg , Wasserwerk Südholstein', emailAddresses='{ "main": "rechnung@ww-sholst.example.org"}'), - 90437=contact(caption='Herr Richard Wiese , Das Perfekte Haus', emailAddresses='{ "main": "admin@das-perfekte-haus.example.org"}'), - 90438=contact(caption='Herr Karim Metzger , Wasswerwerk Südholstein', emailAddresses='{ "main": "karim.metzger@ww-sholst.example.org"}'), - 90590=contact(caption='Herr Inhaber R. Wiese , Das Perfekte Haus', emailAddresses='{ "main": "515217@kkemail.example.org"}'), - 90629=contact(caption='Ragnar Richter ', emailAddresses='{ "main": "mail@ragnar-richter..example.org"}'), - 90677=contact(caption='Eike Henning ', emailAddresses='{ "main": "hostsharing@eike-henning..example.org"}'), - 90698=contact(caption='Jan Henning ', emailAddresses='{ "main": "mail@jan-henning.example.org"}') + 1201=contact(caption='Frau Dr. Jenny Meyer-Billing, JM GmbH', emailAddresses='{ "main": "jm-billing@example.org"}'), + 1202=contact(caption='Herr Andrew Meyer-Operation, JM GmbH', emailAddresses='{ "main": "am-operation@example.org"}'), + 1203=contact(caption='Herr Philip Meyer-Contract, JM GmbH', emailAddresses='{ "main": "pm-partner@example.org"}'), + 1204=contact(caption='Frau Tammy Meyer-VIP, JM GmbH', emailAddresses='{ "main": "tm-vip@example.org"}'), + 1301=contact(caption='Petra Schmidt, Test PS', emailAddresses='{ "main": "ps@example.com"}'), + 132=contact(caption='Herr Ragnar Richter, Ragnar IT-Beratung', emailAddresses='{ "main": "hostsharing@ragnar-richter.de"}'), + 1401=contact(caption='Frau Frauke Fanninga', emailAddresses='{ "main": "ff@example.org"}'), + 1501=contact(caption='Frau Cecilia Camus', emailAddresses='{ "main": "cc@example.org"}'), + 212=contact(caption='Firma Hostmaster Hostsharing, Hostsharing e.G.', emailAddresses='{ "main": "hostmaster@hostsharing.net"}'), + 90436=contact(caption='Frau Christiane Milberg, Wasserwerk Südholstein', emailAddresses='{ "main": "rechnung@ww-sholst.example.org"}'), + 90437=contact(caption='Herr Richard Wiese, Das Perfekte Haus', emailAddresses='{ "main": "admin@das-perfekte-haus.example.org"}'), + 90438=contact(caption='Herr Karim Metzger, Wasswerwerk Südholstein', emailAddresses='{ "main": "karim.metzger@ww-sholst.example.org"}'), + 90590=contact(caption='Herr Inhaber R. Wiese, Das Perfekte Haus', emailAddresses='{ "main": "515217@kkemail.example.org"}'), + 90629=contact(caption='Ragnar Richter', emailAddresses='{ "main": "mail@ragnar-richter..example.org"}'), + 90677=contact(caption='Eike Henning', emailAddresses='{ "main": "hostsharing@eike-henning..example.org"}'), + 90698=contact(caption='Jan Henning', emailAddresses='{ "main": "mail@jan-henning.example.org"}') } """); assertThat(toJsonFormattedString(persons)).isEqualToIgnoringWhitespace(""" { - 100=person(personType='??', tradeName='Michael Mellis', familyName='Mellis', givenName='Michael'), + 100=person(personType='??', tradeName='Michael Mellis', salutation='Herr', familyName='Mellis', givenName='Michael'), 1200=person(personType='LP', tradeName='JM e.K.'), - 1201=person(personType='LP', tradeName='JM GmbH', familyName='Meyer-Billing', givenName='Jenny'), - 1202=person(personType='LP', tradeName='JM GmbH', familyName='Meyer-Operation', givenName='Andrew'), - 1203=person(personType='LP', tradeName='JM GmbH', familyName='Meyer-Contract', givenName='Philip'), - 1204=person(personType='LP', tradeName='JM GmbH', familyName='Meyer-VIP', givenName='Tammy'), + 1201=person(personType='LP', tradeName='JM GmbH', salutation='Frau', title='Dr.', familyName='Meyer-Billing', givenName='Jenny'), + 1202=person(personType='LP', tradeName='JM GmbH', salutation='Herr', familyName='Meyer-Operation', givenName='Andrew'), + 1203=person(personType='LP', tradeName='JM GmbH', salutation='Herr', familyName='Meyer-Contract', givenName='Philip'), + 1204=person(personType='LP', tradeName='JM GmbH', salutation='Frau', familyName='Meyer-VIP', givenName='Tammy'), 1301=person(personType='??', tradeName='Test PS', familyName='Schmidt', givenName='Petra'), - 132=person(personType='??', tradeName='Ragnar IT-Beratung', familyName='Richter', givenName='Ragnar'), - 1401=person(personType='NP', familyName='Fanninga', givenName='Frauke'), - 1501=person(personType='NP', familyName='Camus', givenName='Cecilia'), - 212=person(personType='LP', tradeName='Hostsharing e.G.', familyName='Hostsharing', givenName='Hostmaster'), - 90436=person(personType='??', tradeName='Wasserwerk Südholstein', familyName='Milberg', givenName='Christiane'), - 90437=person(personType='??', tradeName='Das Perfekte Haus', familyName='Wiese', givenName='Richard'), - 90438=person(personType='??', tradeName='Wasswerwerk Südholstein', familyName='Metzger', givenName='Karim'), - 90590=person(personType='??', tradeName='Das Perfekte Haus', familyName='Wiese', givenName='Inhaber R.'), + 132=person(personType='??', tradeName='Ragnar IT-Beratung', salutation='Herr', familyName='Richter', givenName='Ragnar'), + 1401=person(personType='NP', salutation='Frau', familyName='Fanninga', givenName='Frauke'), + 1501=person(personType='NP', salutation='Frau', familyName='Camus', givenName='Cecilia'), + 212=person(personType='LP', tradeName='Hostsharing e.G.', salutation='Firma', familyName='Hostsharing', givenName='Hostmaster'), + 90436=person(personType='??', tradeName='Wasserwerk Südholstein', salutation='Frau', familyName='Milberg', givenName='Christiane'), + 90437=person(personType='??', tradeName='Das Perfekte Haus', salutation='Herr', familyName='Wiese', givenName='Richard'), + 90438=person(personType='??', tradeName='Wasswerwerk Südholstein', salutation='Herr', familyName='Metzger', givenName='Karim'), + 90590=person(personType='??', tradeName='Das Perfekte Haus', salutation='Herr', familyName='Wiese', givenName='Inhaber R.'), 90629=person(personType='NP', familyName='Richter', givenName='Ragnar'), 90677=person(personType='NP', familyName='Henning', givenName='Eike'), 90698=person(personType='NP', familyName='Henning', givenName='Jan') @@ -275,71 +275,81 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { """); assertThat(toJsonFormattedString(relations)).isEqualToIgnoringWhitespace(""" { - 2000000=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='?? Michael Mellis', contact='Herr Michael Mellis , Michael Mellis'), - 2000001=rel(anchor='?? Michael Mellis', type='DEBITOR', holder='?? Michael Mellis', contact='Herr Michael Mellis , Michael Mellis'), - 2000002=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter , Ragnar IT-Beratung'), - 2000003=rel(anchor='?? Ragnar IT-Beratung', type='DEBITOR', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter , Ragnar IT-Beratung'), - 2000004=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='LP Hostsharing e.G.', contact='Firma Hostmaster Hostsharing , Hostsharing e.G.'), - 2000005=rel(anchor='LP Hostsharing e.G.', type='DEBITOR', holder='LP Hostsharing e.G.', contact='Firma Hostmaster Hostsharing , Hostsharing e.G.'), - 2000006=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg , Wasserwerk Südholstein'), - 2000007=rel(anchor='?? Wasserwerk Südholstein', type='DEBITOR', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg , Wasserwerk Südholstein'), - 2000008=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese , Das Perfekte Haus'), - 2000009=rel(anchor='?? Das Perfekte Haus', type='DEBITOR', holder='?? Das Perfekte Haus', contact='Herr Inhaber R. Wiese , Das Perfekte Haus'), - 2000010=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='LP JM GmbH', contact='Herr Philip Meyer-Contract , JM GmbH'), - 2000011=rel(anchor='LP JM GmbH', type='DEBITOR', holder='LP JM GmbH', contact='Frau Dr. Jenny Meyer-Billing , JM GmbH'), - 2000012=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='?? Test PS', contact='Petra Schmidt , Test PS'), - 2000013=rel(anchor='?? Test PS', type='DEBITOR', holder='?? Test PS', contact='Petra Schmidt , Test PS'), - 2000014=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='NP Camus, Cecilia', contact='Frau Cecilia Camus '), - 2000015=rel(anchor='NP Camus, Cecilia', type='DEBITOR', holder='NP Camus, Cecilia', contact='Frau Cecilia Camus '), + 2000000=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='?? Michael Mellis', contact='Herr Michael Mellis, Michael Mellis'), + 2000001=rel(anchor='?? Michael Mellis', type='DEBITOR', holder='?? Michael Mellis', contact='Herr Michael Mellis, Michael Mellis'), + 2000002=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter, Ragnar IT-Beratung'), + 2000003=rel(anchor='?? Ragnar IT-Beratung', type='DEBITOR', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter, Ragnar IT-Beratung'), + 2000004=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='LP Hostsharing e.G.', contact='Firma Hostmaster Hostsharing, Hostsharing e.G.'), + 2000005=rel(anchor='LP Hostsharing e.G.', type='DEBITOR', holder='LP Hostsharing e.G.', contact='Firma Hostmaster Hostsharing, Hostsharing e.G.'), + 2000006=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg, Wasserwerk Südholstein'), + 2000007=rel(anchor='?? Wasserwerk Südholstein', type='DEBITOR', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg, Wasserwerk Südholstein'), + 2000008=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese, Das Perfekte Haus'), + 2000009=rel(anchor='?? Das Perfekte Haus', type='DEBITOR', holder='?? Das Perfekte Haus', contact='Herr Inhaber R. Wiese, Das Perfekte Haus'), + 2000010=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='LP JM GmbH', contact='Herr Philip Meyer-Contract, JM GmbH'), + 2000011=rel(anchor='LP JM GmbH', type='DEBITOR', holder='LP JM GmbH', contact='Frau Dr. Jenny Meyer-Billing, JM GmbH'), + 2000012=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='?? Test PS', contact='Petra Schmidt, Test PS'), + 2000013=rel(anchor='?? Test PS', type='DEBITOR', holder='?? Test PS', contact='Petra Schmidt, Test PS'), + 2000014=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='NP Camus, Cecilia', contact='Frau Cecilia Camus'), + 2000015=rel(anchor='NP Camus, Cecilia', type='DEBITOR', holder='NP Camus, Cecilia', contact='Frau Cecilia Camus'), 2000016=rel(anchor='LP Hostsharing e.G.', type='PARTNER', holder='null null, null'), 2000017=rel(anchor='null null, null', type='DEBITOR'), - 2000018=rel(anchor='LP Hostsharing e.G.', type='OPERATIONS', holder='LP Hostsharing e.G.', contact='Firma Hostmaster Hostsharing , Hostsharing e.G.'), - 2000019=rel(anchor='LP Hostsharing e.G.', type='REPRESENTATIVE', holder='LP Hostsharing e.G.', contact='Firma Hostmaster Hostsharing , Hostsharing e.G.'), - 2000020=rel(anchor='?? Michael Mellis', type='OPERATIONS', holder='?? Michael Mellis', contact='Herr Michael Mellis , Michael Mellis'), - 2000021=rel(anchor='?? Michael Mellis', type='REPRESENTATIVE', holder='?? Michael Mellis', contact='Herr Michael Mellis , Michael Mellis'), - 2000022=rel(anchor='?? Michael Mellis', type='SUBSCRIBER', mark='operations-discussion', holder='?? Michael Mellis', contact='Herr Michael Mellis , Michael Mellis'), - 2000023=rel(anchor='?? Michael Mellis', type='SUBSCRIBER', mark='operations-announce', holder='?? Michael Mellis', contact='Herr Michael Mellis , Michael Mellis'), - 2000024=rel(anchor='?? Michael Mellis', type='SUBSCRIBER', mark='generalversammlung', holder='?? Michael Mellis', contact='Herr Michael Mellis , Michael Mellis'), - 2000025=rel(anchor='?? Michael Mellis', type='SUBSCRIBER', mark='members-announce', holder='?? Michael Mellis', contact='Herr Michael Mellis , Michael Mellis'), - 2000026=rel(anchor='?? Michael Mellis', type='SUBSCRIBER', mark='members-discussion', holder='?? Michael Mellis', contact='Herr Michael Mellis , Michael Mellis'), - 2000027=rel(anchor='?? Ragnar IT-Beratung', type='OPERATIONS', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter , Ragnar IT-Beratung'), - 2000028=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='operations-discussion', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter , Ragnar IT-Beratung'), - 2000029=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='operations-announce', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter , Ragnar IT-Beratung'), - 2000030=rel(anchor='LP JM GmbH', type='EX_PARTNER', holder='LP JM e.K.', contact='JM e.K.'), - 2000031=rel(anchor='LP JM GmbH', type='OPERATIONS', holder='LP JM GmbH', contact='Herr Andrew Meyer-Operation , JM GmbH'), - 2000032=rel(anchor='LP JM GmbH', type='VIP_CONTACT', holder='LP JM GmbH', contact='Herr Andrew Meyer-Operation , JM GmbH'), - 2000033=rel(anchor='LP JM GmbH', type='SUBSCRIBER', mark='operations-announce', holder='LP JM GmbH', contact='Herr Andrew Meyer-Operation , JM GmbH'), - 2000034=rel(anchor='LP JM GmbH', type='REPRESENTATIVE', holder='LP JM GmbH', contact='Herr Philip Meyer-Contract , JM GmbH'), - 2000035=rel(anchor='LP JM GmbH', type='SUBSCRIBER', mark='members-announce', holder='LP JM GmbH', contact='Herr Philip Meyer-Contract , JM GmbH'), - 2000036=rel(anchor='LP JM GmbH', type='SUBSCRIBER', mark='customers-announce', holder='LP JM GmbH', contact='Herr Philip Meyer-Contract , JM GmbH'), - 2000037=rel(anchor='LP JM GmbH', type='VIP_CONTACT', holder='LP JM GmbH', contact='Frau Tammy Meyer-VIP , JM GmbH'), - 2000038=rel(anchor='?? Test PS', type='OPERATIONS', holder='?? Test PS', contact='Petra Schmidt , Test PS'), - 2000039=rel(anchor='?? Test PS', type='REPRESENTATIVE', holder='?? Test PS', contact='Petra Schmidt , Test PS'), - 2000040=rel(anchor='LP JM GmbH', type='SUBSCRIBER', mark='operations-announce', holder='NP Fanninga, Frauke', contact='Frau Frauke Fanninga '), - 2000041=rel(anchor='NP Camus, Cecilia', type='OPERATIONS', holder='NP Camus, Cecilia', contact='Frau Cecilia Camus '), - 2000042=rel(anchor='NP Camus, Cecilia', type='REPRESENTATIVE', holder='NP Camus, Cecilia', contact='Frau Cecilia Camus '), - 2000043=rel(anchor='?? Wasserwerk Südholstein', type='REPRESENTATIVE', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg , Wasserwerk Südholstein'), - 2000044=rel(anchor='?? Wasserwerk Südholstein', type='SUBSCRIBER', mark='generalversammlung', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg , Wasserwerk Südholstein'), - 2000045=rel(anchor='?? Wasserwerk Südholstein', type='SUBSCRIBER', mark='members-announce', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg , Wasserwerk Südholstein'), - 2000046=rel(anchor='?? Wasserwerk Südholstein', type='SUBSCRIBER', mark='members-discussion', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg , Wasserwerk Südholstein'), - 2000047=rel(anchor='?? Das Perfekte Haus', type='OPERATIONS', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese , Das Perfekte Haus'), - 2000048=rel(anchor='?? Das Perfekte Haus', type='REPRESENTATIVE', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese , Das Perfekte Haus'), - 2000049=rel(anchor='?? Das Perfekte Haus', type='SUBSCRIBER', mark='operations-discussion', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese , Das Perfekte Haus'), - 2000050=rel(anchor='?? Das Perfekte Haus', type='SUBSCRIBER', mark='operations-announce', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese , Das Perfekte Haus'), - 2000051=rel(anchor='?? Das Perfekte Haus', type='SUBSCRIBER', mark='generalversammlung', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese , Das Perfekte Haus'), - 2000052=rel(anchor='?? Das Perfekte Haus', type='SUBSCRIBER', mark='members-announce', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese , Das Perfekte Haus'), - 2000053=rel(anchor='?? Das Perfekte Haus', type='SUBSCRIBER', mark='members-discussion', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese , Das Perfekte Haus'), - 2000054=rel(anchor='?? Wasserwerk Südholstein', type='OPERATIONS', holder='?? Wasswerwerk Südholstein', contact='Herr Karim Metzger , Wasswerwerk Südholstein'), - 2000055=rel(anchor='?? Wasserwerk Südholstein', type='SUBSCRIBER', mark='operations-discussion', holder='?? Wasswerwerk Südholstein', contact='Herr Karim Metzger , Wasswerwerk Südholstein'), - 2000056=rel(anchor='?? Wasserwerk Südholstein', type='SUBSCRIBER', mark='operations-announce', holder='?? Wasswerwerk Südholstein', contact='Herr Karim Metzger , Wasswerwerk Südholstein'), - 2000057=rel(anchor='?? Ragnar IT-Beratung', type='REPRESENTATIVE', holder='NP Richter, Ragnar', contact='Ragnar Richter '), - 2000058=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='generalversammlung', holder='NP Richter, Ragnar', contact='Ragnar Richter '), - 2000059=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='members-announce', holder='NP Richter, Ragnar', contact='Ragnar Richter '), - 2000060=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='members-discussion', holder='NP Richter, Ragnar', contact='Ragnar Richter '), - 2000061=rel(anchor='?? Ragnar IT-Beratung', type='OPERATIONS', holder='NP Henning, Eike', contact='Eike Henning '), - 2000062=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='operations-discussion', holder='NP Henning, Eike', contact='Eike Henning '), - 2000063=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='operations-announce', holder='NP Henning, Eike', contact='Eike Henning '), - 2000064=rel(anchor='?? Ragnar IT-Beratung', type='OPERATIONS', holder='NP Henning, Jan', contact='Jan Henning ') + 2000018=rel(anchor='LP Hostsharing e.G.', type='OPERATIONS_ALERT', holder='LP Hostsharing e.G.', contact='Firma Hostmaster Hostsharing, Hostsharing e.G.'), + 2000019=rel(anchor='LP Hostsharing e.G.', type='OPERATIONS', holder='LP Hostsharing e.G.', contact='Firma Hostmaster Hostsharing, Hostsharing e.G.'), + 2000020=rel(anchor='LP Hostsharing e.G.', type='REPRESENTATIVE', holder='LP Hostsharing e.G.', contact='Firma Hostmaster Hostsharing, Hostsharing e.G.'), + 2000021=rel(anchor='?? Michael Mellis', type='OPERATIONS_ALERT', holder='?? Michael Mellis', contact='Herr Michael Mellis, Michael Mellis'), + 2000022=rel(anchor='?? Michael Mellis', type='OPERATIONS', holder='?? Michael Mellis', contact='Herr Michael Mellis, Michael Mellis'), + 2000023=rel(anchor='?? Michael Mellis', type='REPRESENTATIVE', holder='?? Michael Mellis', contact='Herr Michael Mellis, Michael Mellis'), + 2000024=rel(anchor='?? Michael Mellis', type='SUBSCRIBER', mark='operations-discussion', holder='?? Michael Mellis', contact='Herr Michael Mellis, Michael Mellis'), + 2000025=rel(anchor='?? Michael Mellis', type='SUBSCRIBER', mark='operations-announce', holder='?? Michael Mellis', contact='Herr Michael Mellis, Michael Mellis'), + 2000026=rel(anchor='?? Michael Mellis', type='SUBSCRIBER', mark='generalversammlung', holder='?? Michael Mellis', contact='Herr Michael Mellis, Michael Mellis'), + 2000027=rel(anchor='?? Michael Mellis', type='SUBSCRIBER', mark='members-announce', holder='?? Michael Mellis', contact='Herr Michael Mellis, Michael Mellis'), + 2000028=rel(anchor='?? Michael Mellis', type='SUBSCRIBER', mark='members-discussion', holder='?? Michael Mellis', contact='Herr Michael Mellis, Michael Mellis'), + 2000029=rel(anchor='?? Ragnar IT-Beratung', type='OPERATIONS_ALERT', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter, Ragnar IT-Beratung'), + 2000030=rel(anchor='?? Ragnar IT-Beratung', type='OPERATIONS', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter, Ragnar IT-Beratung'), + 2000031=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='operations-discussion', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter, Ragnar IT-Beratung'), + 2000032=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='operations-announce', holder='?? Ragnar IT-Beratung', contact='Herr Ragnar Richter, Ragnar IT-Beratung'), + 2000033=rel(anchor='LP JM GmbH', type='EX_PARTNER', holder='LP JM e.K.', contact='JM e.K.'), + 2000034=rel(anchor='LP JM GmbH', type='OPERATIONS_ALERT', holder='LP JM GmbH', contact='Herr Andrew Meyer-Operation, JM GmbH'), + 2000035=rel(anchor='LP JM GmbH', type='OPERATIONS', holder='LP JM GmbH', contact='Herr Andrew Meyer-Operation, JM GmbH'), + 2000036=rel(anchor='LP JM GmbH', type='VIP_CONTACT', holder='LP JM GmbH', contact='Herr Andrew Meyer-Operation, JM GmbH'), + 2000037=rel(anchor='LP JM GmbH', type='SUBSCRIBER', mark='operations-announce', holder='LP JM GmbH', contact='Herr Andrew Meyer-Operation, JM GmbH'), + 2000038=rel(anchor='LP JM GmbH', type='REPRESENTATIVE', holder='LP JM GmbH', contact='Herr Philip Meyer-Contract, JM GmbH'), + 2000039=rel(anchor='LP JM GmbH', type='SUBSCRIBER', mark='members-announce', holder='LP JM GmbH', contact='Herr Philip Meyer-Contract, JM GmbH'), + 2000040=rel(anchor='LP JM GmbH', type='SUBSCRIBER', mark='customers-announce', holder='LP JM GmbH', contact='Herr Philip Meyer-Contract, JM GmbH'), + 2000041=rel(anchor='LP JM GmbH', type='VIP_CONTACT', holder='LP JM GmbH', contact='Frau Tammy Meyer-VIP, JM GmbH'), + 2000042=rel(anchor='?? Test PS', type='OPERATIONS_ALERT', holder='?? Test PS', contact='Petra Schmidt, Test PS'), + 2000043=rel(anchor='?? Test PS', type='OPERATIONS', holder='?? Test PS', contact='Petra Schmidt, Test PS'), + 2000044=rel(anchor='?? Test PS', type='REPRESENTATIVE', holder='?? Test PS', contact='Petra Schmidt, Test PS'), + 2000045=rel(anchor='LP JM GmbH', type='SUBSCRIBER', mark='operations-announce', holder='NP Fanninga, Frauke', contact='Frau Frauke Fanninga'), + 2000046=rel(anchor='NP Camus, Cecilia', type='OPERATIONS_ALERT', holder='NP Camus, Cecilia', contact='Frau Cecilia Camus'), + 2000047=rel(anchor='NP Camus, Cecilia', type='OPERATIONS', holder='NP Camus, Cecilia', contact='Frau Cecilia Camus'), + 2000048=rel(anchor='NP Camus, Cecilia', type='REPRESENTATIVE', holder='NP Camus, Cecilia', contact='Frau Cecilia Camus'), + 2000049=rel(anchor='?? Wasserwerk Südholstein', type='REPRESENTATIVE', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg, Wasserwerk Südholstein'), + 2000050=rel(anchor='?? Wasserwerk Südholstein', type='SUBSCRIBER', mark='generalversammlung', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg, Wasserwerk Südholstein'), + 2000051=rel(anchor='?? Wasserwerk Südholstein', type='SUBSCRIBER', mark='members-announce', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg, Wasserwerk Südholstein'), + 2000052=rel(anchor='?? Wasserwerk Südholstein', type='SUBSCRIBER', mark='members-discussion', holder='?? Wasserwerk Südholstein', contact='Frau Christiane Milberg, Wasserwerk Südholstein'), + 2000053=rel(anchor='?? Das Perfekte Haus', type='OPERATIONS_ALERT', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese, Das Perfekte Haus'), + 2000054=rel(anchor='?? Das Perfekte Haus', type='OPERATIONS', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese, Das Perfekte Haus'), + 2000055=rel(anchor='?? Das Perfekte Haus', type='REPRESENTATIVE', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese, Das Perfekte Haus'), + 2000056=rel(anchor='?? Das Perfekte Haus', type='SUBSCRIBER', mark='operations-discussion', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese, Das Perfekte Haus'), + 2000057=rel(anchor='?? Das Perfekte Haus', type='SUBSCRIBER', mark='operations-announce', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese, Das Perfekte Haus'), + 2000058=rel(anchor='?? Das Perfekte Haus', type='SUBSCRIBER', mark='generalversammlung', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese, Das Perfekte Haus'), + 2000059=rel(anchor='?? Das Perfekte Haus', type='SUBSCRIBER', mark='members-announce', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese, Das Perfekte Haus'), + 2000060=rel(anchor='?? Das Perfekte Haus', type='SUBSCRIBER', mark='members-discussion', holder='?? Das Perfekte Haus', contact='Herr Richard Wiese, Das Perfekte Haus'), + 2000061=rel(anchor='?? Wasserwerk Südholstein', type='OPERATIONS_ALERT', holder='?? Wasswerwerk Südholstein', contact='Herr Karim Metzger, Wasswerwerk Südholstein'), + 2000062=rel(anchor='?? Wasserwerk Südholstein', type='OPERATIONS', holder='?? Wasswerwerk Südholstein', contact='Herr Karim Metzger, Wasswerwerk Südholstein'), + 2000063=rel(anchor='?? Wasserwerk Südholstein', type='SUBSCRIBER', mark='operations-discussion', holder='?? Wasswerwerk Südholstein', contact='Herr Karim Metzger, Wasswerwerk Südholstein'), + 2000064=rel(anchor='?? Wasserwerk Südholstein', type='SUBSCRIBER', mark='operations-announce', holder='?? Wasswerwerk Südholstein', contact='Herr Karim Metzger, Wasswerwerk Südholstein'), + 2000065=rel(anchor='?? Ragnar IT-Beratung', type='REPRESENTATIVE', holder='NP Richter, Ragnar', contact='Ragnar Richter'), + 2000066=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='generalversammlung', holder='NP Richter, Ragnar', contact='Ragnar Richter'), + 2000067=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='members-announce', holder='NP Richter, Ragnar', contact='Ragnar Richter'), + 2000068=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='members-discussion', holder='NP Richter, Ragnar', contact='Ragnar Richter'), + 2000069=rel(anchor='?? Ragnar IT-Beratung', type='OPERATIONS_ALERT', holder='NP Henning, Eike', contact='Eike Henning'), + 2000070=rel(anchor='?? Ragnar IT-Beratung', type='OPERATIONS', holder='NP Henning, Eike', contact='Eike Henning'), + 2000071=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='operations-discussion', holder='NP Henning, Eike', contact='Eike Henning'), + 2000072=rel(anchor='?? Ragnar IT-Beratung', type='SUBSCRIBER', mark='operations-announce', holder='NP Henning, Eike', contact='Eike Henning'), + 2000073=rel(anchor='?? Ragnar IT-Beratung', type='OPERATIONS_ALERT', holder='NP Henning, Jan', contact='Jan Henning'), + 2000074=rel(anchor='?? Ragnar IT-Beratung', type='OPERATIONS', holder='NP Henning, Jan', contact='Jan Henning') } """); } -- 2.39.5 From ba3a5f80981cdd8b0c6cce197f0936a008547928 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Thu, 21 Nov 2024 10:06:16 +0100 Subject: [PATCH 28/28] drop unneeded import --- .../hostsharing/hsadminng/hs/migration/ImportOfficeData.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java index 8bb99cb8..5f632f88 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java @@ -8,8 +8,6 @@ import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; -import static org.assertj.core.api.Assertions.assertThat; - /* * This 'test' includes the complete legacy 'office' data import. * -- 2.39.5