Skip to content

Commit 088f8b1

Browse files
committed
update logs
1 parent 6a9a514 commit 088f8b1

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/main/java/com/cronos/onlinereview/actions/project/ListProjectsAction.java

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,6 @@ public String execute() throws BaseException {
333333
{
334334
Deliverable[] allMyDeliverables = getDeliverables(
335335
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-
}
344336

345337
// Group the deliverables per projects in list
346338
for (int i = 0; i < projects.length; ++i) {
@@ -351,11 +343,9 @@ public String execute() throws BaseException {
351343
} catch (NumberFormatException nfe) {
352344
winnerId = null;
353345
}
354-
346+
log.info("project:"+String.valueOf(projects[i].getId()));
355347
myDeliverables[i] = getMyDeliverablesForPhases(
356348
this, allMyDeliverables, phases[i], myResources[i], winnerId);
357-
log.info(String.valueOf(i));
358-
log.info(myDeliverables[i]);
359349

360350
}
361351
}
@@ -569,6 +559,7 @@ private static String getMyDeliverablesForPhases(TextProvider textProvider,
569559
if (deliverables == null || deliverables.length == 0 ||
570560
phases == null || phases.length == 0 ||
571561
resources == null || resources.length == 0) {
562+
log.info("no deliverables");
572563
return null; // No deliverables
573564
}
574565

@@ -582,26 +573,30 @@ private static String getMyDeliverablesForPhases(TextProvider textProvider,
582573

583574
for (; j < phases.length; ++j) {
584575
if (deliverable.getPhase() == phases[j].getId()) {
576+
log.info(String.valueOf(deliverable.getPhase()));
585577
break;
586578
}
587579
}
588580

589581
// If this deliverable is not for any of the phases, continue the search
590582
if (j == phases.length) {
583+
log.info("phase not found");
591584
continue;
592585
}
593586

594587
for (j = 0; j < resources.length; ++j) {
595588
if (deliverable.getResource() == resources[j].getId()) {
589+
log.info(String.valueOf(deliverable.getResource()));
596590
break;
597591
}
598592
}
599593

600594
// If this deliverable is not for any of the resources, continue the search
601595
if (j == resources.length) {
596+
log.info("resource not found");
602597
continue;
603598
}
604-
599+
log.info(String.valueOf(deliverable.getName()));
605600
// Get a resource this deliverable is for
606601
final Resource forResource = resources[j];
607602

@@ -612,6 +607,7 @@ private static String getMyDeliverablesForPhases(TextProvider textProvider,
612607
Constants.ACTIVE_SUBMISSION_STATUS_NAME, false);
613608
if (submissions != null && submissions.length > 0 &&
614609
submissions[0].getUpload().getOwner() != deliverable.getResource()) {
610+
log.info("spec check");
615611
continue;
616612
}
617613
}
@@ -620,6 +616,7 @@ private static String getMyDeliverablesForPhases(TextProvider textProvider,
620616
if (winnerUserId != null) {
621617
if (forResource.getResourceRole().getName().equalsIgnoreCase(Constants.SUBMITTER_ROLE_NAME) &&
622618
!winnerUserId.equals(resources[j].getUserId())) {
619+
log.info("winner check");
623620
continue;
624621
}
625622
}
@@ -628,14 +625,18 @@ private static String getMyDeliverablesForPhases(TextProvider textProvider,
628625
String deliverableName = deliverable.getName();
629626
// Do not add the same deliverable twice
630627
if (deliverablesSet.contains(deliverableName)) {
628+
log.info("duplicate check");
631629
continue;
632630
}
633631

634632
// If this is not the first deliverable, add line-breaking tag
635633
if (buffer.length() != 0) {
636634
buffer.append("<br />");
637635
}
636+
log.info(deliverableName);
638637
buffer.append(textProvider.getText("Deliverable." + deliverableName.replaceAll(" ", "")));
638+
log.info("Deliverable." + deliverableName.replaceAll(" ", ""));
639+
log.info(buffer.toString());
639640
deliverablesSet.add(deliverableName);
640641
}
641642

0 commit comments

Comments
 (0)