@@ -333,14 +333,6 @@ public String execute() throws BaseException {
333
333
{
334
334
Deliverable [] allMyDeliverables = getDeliverables (
335
335
ActionsHelper .createDeliverableManager (), projects , phases , myResources );
336
- for (Deliverable d : allMyDeliverables ) {
337
- log .info (String .valueOf (d .getProject ()));
338
- log .info (String .valueOf (d .getPhase ()));
339
- log .info (String .valueOf (d .getResource ()));
340
- log .info (String .valueOf (d .getName ()));
341
- log .info (String .valueOf (d .getCompletionDate ()));
342
- log .info (String .valueOf (d .isComplete ()));
343
- }
344
336
345
337
// Group the deliverables per projects in list
346
338
for (int i = 0 ; i < projects .length ; ++i ) {
@@ -351,11 +343,9 @@ public String execute() throws BaseException {
351
343
} catch (NumberFormatException nfe ) {
352
344
winnerId = null ;
353
345
}
354
-
346
+ log . info ( "project:" + String . valueOf ( projects [ i ]. getId ()));
355
347
myDeliverables [i ] = getMyDeliverablesForPhases (
356
348
this , allMyDeliverables , phases [i ], myResources [i ], winnerId );
357
- log .info (String .valueOf (i ));
358
- log .info (myDeliverables [i ]);
359
349
360
350
}
361
351
}
@@ -569,6 +559,7 @@ private static String getMyDeliverablesForPhases(TextProvider textProvider,
569
559
if (deliverables == null || deliverables .length == 0 ||
570
560
phases == null || phases .length == 0 ||
571
561
resources == null || resources .length == 0 ) {
562
+ log .info ("no deliverables" );
572
563
return null ; // No deliverables
573
564
}
574
565
@@ -582,26 +573,30 @@ private static String getMyDeliverablesForPhases(TextProvider textProvider,
582
573
583
574
for (; j < phases .length ; ++j ) {
584
575
if (deliverable .getPhase () == phases [j ].getId ()) {
576
+ log .info (String .valueOf (deliverable .getPhase ()));
585
577
break ;
586
578
}
587
579
}
588
580
589
581
// If this deliverable is not for any of the phases, continue the search
590
582
if (j == phases .length ) {
583
+ log .info ("phase not found" );
591
584
continue ;
592
585
}
593
586
594
587
for (j = 0 ; j < resources .length ; ++j ) {
595
588
if (deliverable .getResource () == resources [j ].getId ()) {
589
+ log .info (String .valueOf (deliverable .getResource ()));
596
590
break ;
597
591
}
598
592
}
599
593
600
594
// If this deliverable is not for any of the resources, continue the search
601
595
if (j == resources .length ) {
596
+ log .info ("resource not found" );
602
597
continue ;
603
598
}
604
-
599
+ log . info ( String . valueOf ( deliverable . getName ()));
605
600
// Get a resource this deliverable is for
606
601
final Resource forResource = resources [j ];
607
602
@@ -612,6 +607,7 @@ private static String getMyDeliverablesForPhases(TextProvider textProvider,
612
607
Constants .ACTIVE_SUBMISSION_STATUS_NAME , false );
613
608
if (submissions != null && submissions .length > 0 &&
614
609
submissions [0 ].getUpload ().getOwner () != deliverable .getResource ()) {
610
+ log .info ("spec check" );
615
611
continue ;
616
612
}
617
613
}
@@ -620,6 +616,7 @@ private static String getMyDeliverablesForPhases(TextProvider textProvider,
620
616
if (winnerUserId != null ) {
621
617
if (forResource .getResourceRole ().getName ().equalsIgnoreCase (Constants .SUBMITTER_ROLE_NAME ) &&
622
618
!winnerUserId .equals (resources [j ].getUserId ())) {
619
+ log .info ("winner check" );
623
620
continue ;
624
621
}
625
622
}
@@ -628,14 +625,18 @@ private static String getMyDeliverablesForPhases(TextProvider textProvider,
628
625
String deliverableName = deliverable .getName ();
629
626
// Do not add the same deliverable twice
630
627
if (deliverablesSet .contains (deliverableName )) {
628
+ log .info ("duplicate check" );
631
629
continue ;
632
630
}
633
631
634
632
// If this is not the first deliverable, add line-breaking tag
635
633
if (buffer .length () != 0 ) {
636
634
buffer .append ("<br />" );
637
635
}
636
+ log .info (deliverableName );
638
637
buffer .append (textProvider .getText ("Deliverable." + deliverableName .replaceAll (" " , "" )));
638
+ log .info ("Deliverable." + deliverableName .replaceAll (" " , "" ));
639
+ log .info (buffer .toString ());
639
640
deliverablesSet .add (deliverableName );
640
641
}
641
642
0 commit comments