@@ -163,14 +163,17 @@ public List<Mapping> getTableRows(final LocalDate currentReportDate, final List<
163163 projects .add (project );
164164 final long keepTimeSeconds = existingMapping .keeptimeSeconds () + projectWorkSeconds ;
165165 final long heimatSeconds = existingMapping .heimatSeconds ();
166- final boolean shouldBeSynced = isMappedInHeimat && differenceGreaterOrEqual15Minutes (heimatSeconds , keepTimeSeconds );
166+ final boolean shouldBeSynced =
167+ isMappedInHeimat && differenceGreaterOrEqual15Minutes (heimatSeconds , keepTimeSeconds );
167168 final Mapping mapping = new Mapping (isMappedInHeimat ? optHeimatMapping .get ().getExternalTaskId () : -1 ,
168169 isMappedInHeimat , shouldBeSynced , canBeSyncedMessage , existingMapping .existingTimes (), projects ,
169- existingMapping .heimatNotes (), existingMapping .keeptimeNotes () + ". " + keeptimeNotes , heimatSeconds , keepTimeSeconds );
170+ existingMapping .heimatNotes (), existingMapping .keeptimeNotes () + ". " + keeptimeNotes , heimatSeconds ,
171+ keepTimeSeconds );
170172 list .remove (existingMapping );
171173 list .add (mapping );
172174 } else {
173- final boolean shouldBeSynced = isMappedInHeimat && differenceGreaterOrEqual15Minutes (heimatTimeSeconds , projectWorkSeconds );
175+ final boolean shouldBeSynced =
176+ isMappedInHeimat && differenceGreaterOrEqual15Minutes (heimatTimeSeconds , projectWorkSeconds );
174177 final List <Project > projects = Collections .singletonList (project );
175178 final Mapping mapping = new Mapping (isMappedInHeimat ? optHeimatMapping .get ().getExternalTaskId () : -1 ,
176179 isMappedInHeimat , shouldBeSynced , canBeSyncedMessage , optionalAlreadyBookedTimes , projects ,
@@ -219,21 +222,22 @@ public List<Mapping> getTableRows(final LocalDate currentReportDate, final List<
219222 long heimatTimeSeconds = addHeimatTimes (times );
220223
221224 final Mapping mapping2 = new Mapping (id , true , false ,
222- "Present in HEIMAT but not KeepTime\n \n " + externalProjectMapping .getExternalTaskName () + "\n "
223- + externalProjectMapping .getExternalProjectName (), times , mappedProjects .stream ()
224- .filter (
225- mp -> mp .getExternalTaskId ()
226- == id )
227- .map (ExternalProjectMapping ::getProject )
228- .toList (), heimatNotes , "" ,
229- heimatTimeSeconds , 0 );
225+ "Present in HEIMAT but not KeepTime\n \n Sync to " + externalProjectMapping .getExternalTaskName () + "\n ( "
226+ + externalProjectMapping .getExternalProjectName () + ")" , times , mappedProjects .stream ()
227+ .filter (
228+ mp -> mp .getExternalTaskId ()
229+ == id )
230+ .map (ExternalProjectMapping ::getProject )
231+ .toList (),
232+ heimatNotes , "" , heimatTimeSeconds , 0 );
230233 list .add (mapping2 );
231234 });
232235
233236 return list ;
234237 }
235238
236- private static boolean differenceGreaterOrEqual15Minutes (final long heimatTimeSeconds , final long projectWorkSeconds ) {
239+ private static boolean differenceGreaterOrEqual15Minutes (final long heimatTimeSeconds ,
240+ final long projectWorkSeconds ) {
237241 return heimatTimeSeconds == 0L || Math .abs (heimatTimeSeconds - projectWorkSeconds ) >= 15 * 60L ;
238242 }
239243
0 commit comments