Check-in Monday: Excel updates, Baytril, delivery date, drafts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# 2017-10-27
|
||||
- Vermerke im Excel nachziehen
|
||||
- Vermerke im Excel nachziehen [erledigt]
|
||||
- Brand Baytril existiert für CAP und FAP!! [erledigt]
|
||||
- CAP.Baytril scheint defekt (zeigt Motives an). Martin klärt via Megan.
|
||||
- evtl. Check einbauen für Widerspruch Brand <-> Business Unit
|
||||
@@ -7,7 +7,7 @@
|
||||
- Status 4 (Created) und 5 (Assigned) auf Status "Draft" setzen [erledigt]
|
||||
- Problem:
|
||||
{"exceptionMessage":"The collection already contains an item with the specified key."
|
||||
72 mal im Log, bspw. 63701, 63711, 43182
|
||||
72 mal im Log, bspw. 63701, 43182
|
||||
- File upload
|
||||
- Selections
|
||||
- Bilder hochladen für Assets von Claudias Liste
|
||||
@@ -16,6 +16,8 @@
|
||||
- Definitions anpassen
|
||||
- Check: Hotfix nötig auf PROD?
|
||||
- Go-Live AH 15. November
|
||||
- Fragen:
|
||||
- s. Excel
|
||||
|
||||
|
||||
|
||||
|
||||
+128
-128
@@ -302,25 +302,25 @@ classify;BusinessUnit.CAP,Brand.Seresto;;;;Seresto;;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Veraflox;;;;Veraflox;;;;;
|
||||
classify;BusinessUnit.General,Brand.General;;;Video Library;;-> alles was nicht brand-related ist, bitte unter Space General;;;;Wenn möglich, Brand zuordnen, sonst General/unassigned
|
||||
keyword;;;;;Events;;;;;
|
||||
brand;;;;;;CVBD;;;;
|
||||
classify;BusinessUnit.CAP,Brand.CVBD;;;;;CVBD;;;;
|
||||
skip;;;;;Films by Brand;;;;;
|
||||
brand;;;;;;Advantage;;;;
|
||||
classify;Brand.Advantix;;;;;Advantix / K9 Advantix;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Advantage;;;;;Advantage;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Advantix;;;;;Advantix / K9 Advantix;;;;
|
||||
skip;;;;;;;No Bite;;;
|
||||
skip;;;;;;;Repel & Kill - 2014;;;
|
||||
classify;Brand.Advocate,Brand.Advantage;;;;;Advocate/Advantage Multi;;;;
|
||||
brand;;;;;;Baycox;;;;
|
||||
keyword;;;;;;Bayer Parasite Solutions;;;;
|
||||
brand;;;;;;Catosal;;;;
|
||||
brand;;;;;;Drontal;;;;
|
||||
brand;;;;;;Polyvar;;;;
|
||||
brand;;;;;;Procox;;;;
|
||||
classify;Brand.Profender;;;;;Profender Cat;;;;
|
||||
classify;Brand.Profender;;;;;Profender Dog;;;;
|
||||
brand;;;;;;Seresto;;;;
|
||||
brand;;;;;;Veraflox;;;;
|
||||
brand;;;;;;Victrio;;;;
|
||||
brand;;;;;;Zelnate;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Advocate,Brand.Advantage;;;;;Advocate/Advantage Multi;;;;
|
||||
classify;BusinessUnit.FAP,Brand.Baycox;;;;;Baycox;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Miscellaneous;;;;;Bayer Parasite Solutions;;;;
|
||||
classify;BusinessUnit.FAP,Brand.Catosal;;;;;Catosal;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Drontal;;;;;Drontal;;;;
|
||||
classify;BusinessUnit.FAP,Brand.Polyvar;;;;;Polyvar;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Procox;;;;;Procox;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Profender;;;;;Profender Cat;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Profender;;;;;Profender Dog;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Seresto;;;;;Seresto;;;;
|
||||
classify;BusinessUnit.CAP,Brand.Veraflox;;;;;Veraflox;;;;
|
||||
classify;BusinessUnit.FAP,Brand.Victrio;;;;;Victrio;;;;
|
||||
classify;BusinessUnit.FAP,Brand.Zelnate;;;;;Zelnate;;;;
|
||||
skip;;;;;Films by Indication;;;;;
|
||||
keyword;;;;;;Flea;;;;
|
||||
keyword;;;;;;Giardia;;;;
|
||||
@@ -380,9 +380,9 @@ skip;;;;Veterinary Parasitology;;;;;;
|
||||
skip;;;;WAAVP Congress ;;;;;;
|
||||
skip;;;;WBC Congress;;;;;;
|
||||
skip;;;;Watches ;;;;;;
|
||||
not migrated;Status.Archived;;BAH archive;;;;;;;
|
||||
classify;Status.Archived;;BAH archive;;;;;;;
|
||||
skip;;;;Advertising Media;;;;;;
|
||||
classify;BusinessUnit.CAP;;;;CAP;;;;;
|
||||
classify;BusinessUnit.CAP,Brand.CAP.Others;;;;CAP;;;;;
|
||||
keyword;;;;;;Acticam;;;;
|
||||
brand;;;;;;Advantage;;;;
|
||||
brand;;;;;;Advantix;;;;
|
||||
@@ -422,24 +422,24 @@ keyword;;;;;;;Seresto Profender;;;
|
||||
keyword;;;;;;;Seresto e-detailer;;;
|
||||
keyword;;;;;;;Vet/Nurse Material;;;
|
||||
brand;;;;;;Veraflox;;;;
|
||||
classify;BusinessUnit.FAP;;;;FAP;;;;;
|
||||
classify;BusinessUnit.FAP,Brand.FAP.Others;;;;FAP;;;;;
|
||||
brand;;;;;;Baycox;;;;
|
||||
keyword;;;;;;;Baycox Bovis Toolkit (Old);;;
|
||||
skip;;;;;;;;Awareness Campaign;;
|
||||
skip;;;;;;;;Images Baycox bovis Toolkit;;
|
||||
skip;;;;;;;;Launch Campaign;;
|
||||
keyword;;;;;;;;Awareness Campaign;;
|
||||
keyword;;;;;;;;Images Baycox bovis Toolkit;;
|
||||
keyword;;;;;;;;Launch Campaign;;
|
||||
keyword;;;;;;;Baycox Brand Communication 2009;;;
|
||||
skip;;;;;;;;Key Visuals;;
|
||||
skip;;;;;;;;Logos;;
|
||||
keyword;;;;;;;;Key Visuals;;
|
||||
keyword;;;;;;;;Logos;;
|
||||
keyword;;;;;;;Baycox Lamb Toolkit;;;
|
||||
skip;;;;;;;;Images Baycox Lamb Toolkit;;
|
||||
keyword;;;;;;;;Images Baycox Lamb Toolkit;;
|
||||
keyword;;;;;;;Baycox Piglet Launch Campaign - Toolkit;;;
|
||||
skip;;;;;;;;Baycox Piglet Images;;
|
||||
keyword;;;;;;;;Baycox Piglet Images;;
|
||||
keyword;;;;;;;Baycox Poultry;;;
|
||||
skip;;;;;;;;Images Baycox Poultry;;
|
||||
keyword;;;;;;;;Images Baycox Poultry;;
|
||||
keyword;;;;;;;The European Campaigns;;;
|
||||
skip;;;;;;;;Awareness;;
|
||||
skip;;;;;;;;Launch;;
|
||||
keyword;;;;;;;;Awareness;;
|
||||
keyword;;;;;;;;Launch;;
|
||||
brand;;;;;;Bayticol;;;;
|
||||
skip;;;;;;;Images;;;
|
||||
classify;Brand.FAP.Baytril;;;;;Baytril;;;;
|
||||
@@ -479,107 +479,107 @@ brand;;;;;;Polyvar;;;;
|
||||
keyword;;;;;;Prolongal;;;;
|
||||
brand;;;;;;Transforming Livestock Production;;;;
|
||||
skip;;;;;;;Images;;;
|
||||
not migrated;;;;Give Aways;;;;;;
|
||||
classify;;;;Graphics/tables;;;--> General;;;
|
||||
not migrated;;;;Guidelines;;;--> wie oben;;;
|
||||
;;;;;Advocate Guideline 2009;;;;;
|
||||
;;;;;CAP Brand Design;;;;;
|
||||
;;;;;;Advantage family;;;;
|
||||
;;;;;;Drontal Plus;;;;
|
||||
;;;;;;HOB 2000;;;;
|
||||
;;;;;;Kiltix;;;;
|
||||
;;;;;;Packaging Design 1996;--> CAP.Other;;;
|
||||
;;;;;;Pet Care Products (OTC);;;;
|
||||
;;;;;;Profender;;;;
|
||||
;;;;;;Seresto;;;;
|
||||
;;;;;;;Packaging Images;;;
|
||||
;;;;;FAP Brand Design;;;;;
|
||||
;;;;;;Farm Animal Products;;;;
|
||||
;;;;;;Farmhygiene Products;;;;
|
||||
;;;;;Packaging;;;;;
|
||||
;;;;;;Absolut;;;;
|
||||
;;;;;;Advantage;;;;
|
||||
;;;;;;Advantix;;;;
|
||||
;;;;;Training Tools MA;;;;;
|
||||
;;;;;eDetailer Template;;;;;
|
||||
not migrated;;;;Illustrations;;;--> General;;;
|
||||
not migrated;;;;Images;;;--> General;;;
|
||||
motives;;;;;Animals;;;;;
|
||||
motives;;;;;;Bees;;;;
|
||||
motives;;;;;;Benelux Images black/white;;;;
|
||||
motives;;;;;;Cats;;;;
|
||||
motives;;;;;;Cattle;;;;
|
||||
motives;;;;;;Dogs;;;;
|
||||
motives;;;;;;Ectoparasites in pictures;;;;
|
||||
motives;;;;;;Horses;;;;
|
||||
motives;;;;;;Images from Mexico;;;;
|
||||
motives;;;;;;Insects and arachnids;;;;
|
||||
motives;;;;;;;Red bird mite;;;
|
||||
motives;;;;;;Poultry;;;;
|
||||
motives;;;;;;Sheep ticks and control;;;;
|
||||
motives;;;;;;Sheeps;;;;
|
||||
motives;;;;;;Small furry animals;;;;
|
||||
motives;;;;;;Swine;;;;
|
||||
motives;;;;;;Ticks and tickborne;;;;
|
||||
motives;;;;;;Worms;;;;
|
||||
motives;;;;;Application;;;;;
|
||||
motives;;;;;Different animals together;;;;;
|
||||
motives;;;;;Disease symptoms;;;;;
|
||||
motives;;;;;;Myiases;;;;
|
||||
motives;;;;;Events;;;;;
|
||||
motives;;;;;;CVBD symposium, Billesley 2006;;;;
|
||||
motives;;;;;;WSAVA 2006, Prag;;;;
|
||||
motives;;;;;Microorganisms;;;;;
|
||||
motives;;;;;Microscope images;;;;;
|
||||
motives;;;;;;LM images;;;;
|
||||
motives;;;;;;SEM images;;;;
|
||||
motives;;;;;People;;;;;
|
||||
motives;;;;;People and animals;;;;;
|
||||
motives;;;;;;Advantix, 2003 - Free the dog Toolkit;;;;
|
||||
not migrated;;;;Logos;;;--> General;;;
|
||||
not migrated;;;;PR & Congresses;;;--> General;;;
|
||||
;;;;;Congresses;;;;;
|
||||
;;;;;;Angio Forum;;;;
|
||||
;;;;;;CVBD;;;;
|
||||
;;;;;;ECVIM;;;;
|
||||
;;;;;;ESFM;;;;
|
||||
;;;;;;ESVD;;;;
|
||||
;;;;;;IPVS, WBC;;;;
|
||||
;;;;;Public Relations;;;;;
|
||||
;;;;;;Brand PR;;;;
|
||||
;;;;;;Press Releases;;;;
|
||||
not migrated;;;;Packshots;;;--> General;;;
|
||||
not migrated;;;;Videos;;;--> wie oben;;;
|
||||
;;;;;CAP;;;;;
|
||||
;;;;;;Advantage;;;;
|
||||
;;;;;;Advantix;;;;
|
||||
;;;;;;Advocate;;;;
|
||||
;;;;;;BPS;;;;
|
||||
classify;BusinessUnit.General,Brand.General;;;Give Aways;;;;;;
|
||||
classify;BusinessUnit.General,Brand.General;;;Graphics/tables;;;--> General;;;
|
||||
classify;BusinessUnit.General,Brand.General,MediaType.Guideline;;;Guidelines;;;--> wie oben;;;
|
||||
classify;BusinessUnit.CAP,Brand.Advocate;;;;Advocate Guideline 2009;;;;;
|
||||
classify;BusinessUnit.CAP,Brand.CAP.Others;;;;CAP Brand Design;;;;;
|
||||
classify;Brand.Advantage;;;;;Advantage family;;;;
|
||||
classify;Brand.Drontal;;;;;Drontal Plus;;;;
|
||||
skip;;;;;;HOB 2000;;;;
|
||||
skip;;;;;;Kiltix;;;;
|
||||
skip;;;;;;Packaging Design 1996;--> CAP.Other;;;
|
||||
skip;;;;;;Pet Care Products (OTC);;;;
|
||||
classify;Brand.Profender;;;;;Profender;;;;
|
||||
classify;Brand.Seresto;;;;;Seresto;;;;
|
||||
keyword;;;;;;;Packaging Images;;;
|
||||
classify;BusinessUnit.FAP,Brand.FAP.Others;;;;FAP Brand Design;;;;;
|
||||
skip;;;;;;Farm Animal Products;;;;
|
||||
skip;;;;;;Farmhygiene Products;;;;
|
||||
classify;;;;;Packaging;;;;;
|
||||
classify;;;;;;Absolut;;;;
|
||||
classify;Brand.Advantage;;;;;Advantage;;;;
|
||||
classify;Brand.Advantix;;;;;Advantix;;;;
|
||||
skip;;;;;Training Tools MA;;;;;
|
||||
skip;;;;;eDetailer Template;;;;;
|
||||
classify;BusinessUnit.General,Brand.General;;;Illustrations;;;--> General;;;
|
||||
classify;BusinessUnit.General,Brand.General;;;Images;;;--> General;;Hier evtl. eine zusätzliche Classification?;
|
||||
keyword;;;;;Animals;;;;;
|
||||
keyword;;;;;;Bees;;;;
|
||||
keyword;;;;;;Benelux Images black/white;;;;
|
||||
keyword;;;;;;Cats;;;;
|
||||
keyword;;;;;;Cattle;;;;
|
||||
keyword;;;;;;Dogs;;;;
|
||||
keyword;;;;;;Ectoparasites in pictures;;;;
|
||||
keyword;;;;;;Horses;;;;
|
||||
keyword;;;;;;Images from Mexico;;;;
|
||||
keyword;;;;;;Insects and arachnids;;;;
|
||||
keyword;;;;;;;Red bird mite;;;
|
||||
keyword;;;;;;Poultry;;;;
|
||||
keyword;;;;;;Sheep ticks and control;;;;
|
||||
keyword;;;;;;Sheeps;;;;
|
||||
keyword;;;;;;Small furry animals;;;;
|
||||
keyword;;;;;;Swine;;;;
|
||||
keyword;;;;;;Ticks and tickborne;;;;
|
||||
keyword;;;;;;Worms;;;;
|
||||
keyword;;;;;Application;;;;;
|
||||
keyword;;;;;Different animals together;;;;;
|
||||
keyword;;;;;Disease symptoms;;;;;
|
||||
keyword;;;;;;Myiases;;;;
|
||||
keyword;;;;;Events;;;;;
|
||||
keyword;;;;;;CVBD symposium, Billesley 2006;;;;
|
||||
keyword;;;;;;WSAVA 2006, Prag;;;;
|
||||
keyword;;;;;Microorganisms;;;;;
|
||||
keyword;;;;;Microscope images;;;;;
|
||||
keyword;;;;;;LM images;;;;
|
||||
keyword;;;;;;SEM images;;;;
|
||||
skip;;;;;People;;;;;
|
||||
skip;;;;;People and animals;;;;;
|
||||
keyword;;;;;;Advantix, 2003 - Free the dog Toolkit;;;;
|
||||
classify;BusinessUnit.General,Brand.General;;;Logos;;;--> General;;;
|
||||
classify;BusinessUnit.General,Brand.General;;;PR & Congresses;;;--> General;;;
|
||||
keyword;;;;;Congresses;;;;;
|
||||
keyword;;;;;;Angio Forum;;;;
|
||||
keyword;;;;;;CVBD;;;;
|
||||
keyword;;;;;;ECVIM;;;;
|
||||
keyword;;;;;;ESFM;;;;
|
||||
keyword;;;;;;ESVD;;;;
|
||||
keyword;;;;;;IPVS, WBC;;;;
|
||||
keyword;;;;;Public Relations;;;;;
|
||||
keyword;;;;;;Brand PR;;;;
|
||||
keyword;;;;;;Press Releases;;;;
|
||||
classify;BusinessUnit.General,Brand.General;;;Packshots;;;--> General;;;
|
||||
classify;BusinessUnit.General,Brand.General;;;Videos;;;--> wie oben;;;
|
||||
classify;BusinessUnit.CAP,Brand.CAP.Others;;;;CAP;;;;;
|
||||
brand;;;;;;Advantage;;;;
|
||||
brand;;;;;;Advantix;;;;
|
||||
brand;;;;;;Advocate;;;;
|
||||
keyword;;;;;;BPS;;;;
|
||||
classify;Brand.CAP.Baytril;;;;;Baytril;;;;
|
||||
;;;;;;Drontal;;;;
|
||||
;;;;;;Profender;;;;
|
||||
;;;;;;Renalzin;;;;
|
||||
;;;;;;Rompun;;;;
|
||||
;;;;;;Seresto;;;;
|
||||
;;;;;;Worms;;;;
|
||||
;;;;;Events;;;;;
|
||||
;;;;;;Baytril Symposium 2009 Florence;;;;
|
||||
;;;;;;CVBD / Zoonosis;;;;
|
||||
;;;;;;GM Workshop 2011, Krefeld;;;;
|
||||
;;;;;;IPVS 2010;;;;
|
||||
;;;;;;Parasite Exhibition Museum;;;;
|
||||
;;;;;;WBC;;;;
|
||||
;;;;;FAP;;;;;
|
||||
;;;;;;Baycox;;;;
|
||||
brand;;;;;;Drontal;;;;
|
||||
brand;;;;;;Profender;;;;
|
||||
keyword;;;;;;Renalzin;;;;
|
||||
keyword;;;;;;Rompun;;;;
|
||||
brand;;;;;;Seresto;;;;
|
||||
keyword;;;;;;Worms;;;;
|
||||
skip;;;;;Events;;;;;
|
||||
keyword;;;;;;Baytril Symposium 2009 Florence;;;;
|
||||
keyword;;;;;;CVBD / Zoonosis;;;;
|
||||
keyword;;;;;;GM Workshop 2011, Krefeld;;;;
|
||||
keyword;;;;;;IPVS 2010;;;;
|
||||
keyword;;;;;;Parasite Exhibition Museum;;;;
|
||||
keyword;;;;;;WBC;;;;
|
||||
classify;BusinessUnit.FAP,Brand.FAP.Others;;;;FAP;;;;;
|
||||
brand;;;;;;Baycox;;;;
|
||||
classify;Brand.FAP.Baytril;;;;;Baytril;;;;
|
||||
;;;;;;Bye Mite;;;;
|
||||
;;;;;Historical films;;;;;
|
||||
;;;;;Marketing Excellence;;;;;
|
||||
;;;;;TV Spots;;;;;
|
||||
;;;;;Webinars;;;;;
|
||||
not migrated;;;;Webshop;;;--> General;;;
|
||||
;;;;;Clothes;;;;;
|
||||
;;;;;Special Edition;;;;;
|
||||
skip;;;;;;Bye Mite;;;;
|
||||
keyword;;;;;Historical films;;;;;
|
||||
keyword;;;;;Marketing Excellence;;;;;
|
||||
keyword;;;;;TV Spots;;;;;
|
||||
keyword;;;;;Webinars;;;;;
|
||||
classify;BusinessUnit.General,Brand.General;;;Webshop;;;--> General;;;
|
||||
skip;;;;;Clothes;;;;;
|
||||
skip;;;;;Special Edition;;;;;
|
||||
not migrated;;;M-CAP-Links;;;;;;;
|
||||
skip;;;;AI Symposia;;;;;;
|
||||
skip;;;;Advocate D repens SEM '16;;;;;;
|
||||
|
||||
|
BIN
Binary file not shown.
@@ -29,8 +29,6 @@ public class Definitions {
|
||||
|
||||
classifications.put("Migration", new WriteClassification("2bd24882-b7d8-4d30-8e6f-a7ef00eb33e7", 1));
|
||||
classifications.put("Migration.Logos", new WriteClassification("de96f8db1de44cc6841ba81c00b9db8e", 1));
|
||||
classifications.put("Test-GEXCE", new WriteClassification("f1d058987a3043d5b021a819007ff3c0", 1));
|
||||
|
||||
|
||||
classifications.put("Country.Global", new WriteClassification("dff7666b-326b-4e1c-912c-a7b4006c8500", 1)); // /Definitions/Animal Health/Country
|
||||
classifications.put("Agencies.Bayer AH", new WriteClassification("8de5ef0e-3c6d-451c-b82b-a7b4006c954c", 1)); // /Definitions/Agencies/Bayer
|
||||
|
||||
@@ -57,8 +57,7 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
static final String categoryJson = "resources/2017-10-19_categories.json";
|
||||
static final String categoryMapping = "resources/Media_Assistant_Categories_131017_EDITED_without_archive.csv";
|
||||
|
||||
static final File entryLog = new File("C:\\Temp\\Migration AH\\files\\entry.log");
|
||||
static final File problemLog = new File("C:\\Temp\\Migration AH\\files\\problem.log");
|
||||
static final File entryLog = new File("entry.log");
|
||||
|
||||
static final String fieldSeparator = "|~|";
|
||||
static final String lineSeparator = "\r\n";
|
||||
@@ -88,9 +87,7 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
// readEntryIDsFromFile();
|
||||
|
||||
log.info("Write log headers for " + entryLog.getAbsolutePath());
|
||||
FileUtils.writeStringToFile(entryLog, "Location" + fieldSeparator + "Entry" + lineSeparator, Charset.forName("utf-8"));
|
||||
log.info("Write log headers for " + problemLog.getAbsolutePath());
|
||||
FileUtils.writeStringToFile(problemLog, "entryId" + fieldSeparator + "Entry" + lineSeparator, Charset.forName("utf-8"));
|
||||
FileUtils.writeStringToFile(entryLog, "entryId" + fieldSeparator + "Location" + fieldSeparator + "Entry" + lineSeparator, Charset.forName("utf-8"));
|
||||
|
||||
log.info("Read categories");
|
||||
mamCategoryTree = new CategoryTree(categoryJson, categoryMapping);
|
||||
@@ -210,7 +207,7 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
// Status "Released" is weaker than the other statuses
|
||||
if (p.startsWith("Status.")) {
|
||||
if (p.equals("Status.Released") && record.hasClassificationStartingWith("Status.")) {
|
||||
log.warn("Classification Status.Released not added, different status already set");
|
||||
log.warn("Classification " + p + " not added, different status already set");
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
@@ -221,7 +218,7 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
// Business unit "General" is weaker than the other business units
|
||||
if (p.startsWith("BusinessUnit.")) {
|
||||
if (p.equals("BusinessUnit.General") && record.hasClassificationStartingWith("BusinessUnit.")) {
|
||||
log.warn("Classification BusinessUnit.General not added, different business unit already set");
|
||||
log.warn("Classification " + p + " not added, different business unit already set");
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
@@ -229,10 +226,10 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
}
|
||||
}
|
||||
|
||||
// Brand "General" is weaker than the other brands
|
||||
// Brands "General" and "Others" are weaker than the other brands
|
||||
if (p.startsWith("Brand.")) {
|
||||
if (p.equals("Brand.General") && record.hasClassificationStartingWith("Brand.")) {
|
||||
log.warn("Classification Brand.General not added, different brand already set");
|
||||
if ((p.equals("Brand.General") || p.equals("Brand.CAP.Others") || p.equals("Brand.FAP.Others"))&& record.hasClassificationStartingWith("Brand.")) {
|
||||
log.warn("Classification " + p + " not added, different brand already set");
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
@@ -244,10 +241,15 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
record.removeClassification("MediaType.");
|
||||
}
|
||||
|
||||
if (p.startsWith("Motive.")) {
|
||||
record.removeClassification("Motive.");
|
||||
}
|
||||
|
||||
record.addClassification(p);
|
||||
}
|
||||
}
|
||||
else if (n.action.equals("brand")) {
|
||||
record.removeClassificationsStartingWith("Brand.");
|
||||
String brandClassificationId = "Brand." + n.name.trim();
|
||||
record.addClassification(brandClassificationId);
|
||||
}
|
||||
@@ -348,7 +350,8 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
record.addField("byr_Title", "No title");
|
||||
}
|
||||
|
||||
record.addField("byr_ah_deliveryDate", isoDate.format(entry.creationDate));
|
||||
if (entry.creationDate != null)
|
||||
record.addField("byr_ah_deliveryDate", isoDate.format(entry.creationDate));
|
||||
|
||||
// Project lead
|
||||
if (entry.user != null && entry.user.get("id") != null) {
|
||||
@@ -382,6 +385,15 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
if (entry.creationDate != null)
|
||||
migrationDescription += "\nDate of Issue: " + stringDate.format(entry.creationDate);
|
||||
|
||||
if (entry.categories.size() == 1)
|
||||
migrationDescription += "\nCategory:";
|
||||
else
|
||||
migrationDescription += "\nCategories:";
|
||||
for (int categoryId : entry.categories) {
|
||||
migrationDescription += "\n" + mamCategoryTree.getNode(categoryId).toString();
|
||||
}
|
||||
|
||||
|
||||
description += migrationDescription;
|
||||
record.addField("byr_ah_description", description);
|
||||
|
||||
@@ -422,13 +434,12 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
URI location = restTemplate.postForLocation(adamHost + "/records", httpEntity, UploadRecord.class);
|
||||
log.info("RESULT Entry " + entry.id + " migrated to record " + location);
|
||||
|
||||
FileUtils.writeStringToFile(entryLog, location.toString() + fieldSeparator + entryJson + lineSeparator,
|
||||
FileUtils.writeStringToFile(entryLog, entry.id + fieldSeparator + location.toString() + fieldSeparator + entryJson + lineSeparator,
|
||||
Charset.forName("utf-8"), true);
|
||||
}
|
||||
catch (HttpStatusCodeException hsce) {
|
||||
log.error("RESULT Skipping entry " + entry.id + ": Error while creating record " + hsce.getStatusCode().toString());
|
||||
log.error(hsce.getResponseBodyAsString());
|
||||
FileUtils.writeStringToFile(problemLog, entry.id + fieldSeparator + entryJson + lineSeparator, Charset.forName("utf-8"), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user