@@ -110,6 +110,7 @@ public List<Mapping> getTableRows(final LocalDate currentReportDate, final List<
110110 String heimatNotes = "" ;
111111 long heimatTimeSeconds = 0 ;
112112 boolean isMappedInHeimat = false ;
113+ String bookingHint = "" ;
113114 final Optional <ExternalProjectMapping > optHeimatMapping = mappedProjects .stream ()
114115 .filter (mp -> mp .getProject ().getId ()
115116 == project .getId ())
@@ -118,6 +119,11 @@ public List<Mapping> getTableRows(final LocalDate currentReportDate, final List<
118119 Optional <Mapping > optionalExistingMapping = Optional .empty ();
119120 if (optHeimatMapping .isPresent ()) {
120121 isMappedInHeimat = true ;
122+ bookingHint = heimatTasks .stream ()
123+ .filter (ht -> ht .id () == optHeimatMapping .get ().getExternalTaskId ())
124+ .map (HeimatTask ::bookingHint )
125+ .findAny ()
126+ .orElseGet (String ::new );
121127 optionalExistingMapping = list .stream ()
122128 .filter (mapping -> mapping .heimatTaskId == optHeimatMapping .get ()
123129 .getExternalTaskId ())
@@ -161,12 +167,6 @@ public List<Mapping> getTableRows(final LocalDate currentReportDate, final List<
161167 new StyledMessage .TextSegment ("\n (" + externalProjectMapping .getExternalProjectName () + ")" ));
162168 }
163169
164- final String bookingHint = heimatTasks .stream ()
165- .filter (ht -> ht .id () == optHeimatMapping .get ().getExternalTaskId ())
166- .map (HeimatTask ::bookingHint )
167- .findAny ()
168- .orElseGet (String ::new );
169-
170170 if (optionalExistingMapping .isPresent ()) {
171171 final Mapping existingMapping = optionalExistingMapping .get ();
172172 final ArrayList <Project > projects = new ArrayList <>(existingMapping .projects ());
@@ -212,8 +212,7 @@ public List<Mapping> getTableRows(final LocalDate currentReportDate, final List<
212212 }
213213
214214 final Mapping mapping = new Mapping (id , true , false ,
215- StyledMessage .of (new StyledMessage .TextSegment ("Not mapped in KeepTime\n \n " + taskName )), "" ,
216- times ,
215+ StyledMessage .of (new StyledMessage .TextSegment ("Not mapped in KeepTime\n \n " + taskName )), "" , times ,
217216
218217 new ArrayList <>(0 ), heimatNotes , "" , heimatTimeSeconds , 0 );
219218 list .add (mapping );
0 commit comments