From a62e32f97c25d84d4c3178b24ffb97de91327c03 Mon Sep 17 00:00:00 2001 From: elgekko Date: Mon, 16 May 2022 11:15:37 +0200 Subject: [PATCH] Kisbetu, nagybetu eliras javitva parentstoryid kezelesben --- .../server/steps/ImportStatisticsStep.java | 3 --- .../server/steps/shared/OctopusDataMiner.java | 13 +++++-------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/ImportStatisticsStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/ImportStatisticsStep.java index dae22abf..7a34a4df 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/ImportStatisticsStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/ImportStatisticsStep.java @@ -150,15 +150,12 @@ public class ImportStatisticsStep extends JobStep { try { rundownID = NoSQLUtils.asLong(rundown, IOctopusAPI.ID); String name = NoSQLUtils.asString(NoSQLUtils.asDBObject(rundown, IOctopusAPI.RUNDOWN_TYPE), IOctopusAPI.NAME); - logger.info(marker, "stage1 {}", name); String channel = NoSQLUtils.asString(NoSQLUtils.asDBObject(rundown, IOctopusAPI.CHANNEL), IOctopusAPI.NAME); Date scheduledStart = rundown.getDate(IOctopusAPI.SCHEDULED_START); String start = CalendarUtils.toString(CalendarUtils.createCalendar(scheduledStart), SCHEDULED_FORMAT); - logger.info(marker, "stage2"); // String rundownName = NoSQLUtils.asString(rundown, IOctopusAPI.NAME); rundownName = String.format("%s %s %s", start, name, channel); List stories = octopusAPI.getRundownStories(rundownID, createFieldsObject()); - logger.info(marker, "stage3"); if (stories != null) result.putAll(processStories(stories, null)); } catch (Exception e) { diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/shared/OctopusDataMiner.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/shared/OctopusDataMiner.java index 0a5e40de..e01b4613 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/shared/OctopusDataMiner.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/shared/OctopusDataMiner.java @@ -118,8 +118,7 @@ public class OctopusDataMiner { references = new BasicDBList(); result.put(storyId, references); } - references - .add(new BasicDBObject(IOctopusAPI.ID, storyFolderId).append(IOctopusAPI.POSITION, position++)); + references.add(new BasicDBObject(IOctopusAPI.ID, storyFolderId).append(IOctopusAPI.POSITION, position++)); } } return result; @@ -263,7 +262,7 @@ public class OctopusDataMiner { /*** * Get all custom columns label/non-null-value pair as map - * + * * @param story * @return */ @@ -319,8 +318,7 @@ public class OctopusDataMiner { // logger.info("MOS ID: {}", objId); MetadataType metadataType = MetadataTypeDetector.GuessMetadataType(objId); - if (!MetadataType.OctopusPlaceholder.equals(metadataType) - && !MetadataType.OctopusStory.equals(metadataType)) + if (!MetadataType.OctopusPlaceholder.equals(metadataType) && !MetadataType.OctopusStory.equals(metadataType)) continue; if (result == null) result = new BasicDBList(); @@ -503,8 +501,7 @@ public class OctopusDataMiner { Builder query = query(RUNDOWN, FIELDS_RUNDOWN); Response response = null; if (includeArchived) { - response = query.post(Entity.entity(new BasicDBObject(FILTER, new BasicDBObject(ARCHIVED, true)).toString(), - MediaType.APPLICATION_JSON)); + response = query.post(Entity.entity(new BasicDBObject(FILTER, new BasicDBObject(ARCHIVED, true)).toString(), MediaType.APPLICATION_JSON)); } else response = query.get(); @@ -669,7 +666,7 @@ public class OctopusDataMiner { BasicDBObject customColumns = getCustomColumns(story); // logger.info(customColumns.toPrettyString("")); - String parentStoryId = NoSQLUtils.asString(customColumns, IOctopusAPI.PARENT_STORY_ID); + String parentStoryId = NoSQLUtils.asString(customColumns, "ParentStoryID"); if (parentStoryId == null) { parentStoryId = story.getString(IOctopusAPI.ID); } -- 2.54.0