Skip to content

Commit 492c3a0

Browse files
committed
Revert "add logs"
This reverts commit d6aa875.
1 parent d6aa875 commit 492c3a0

File tree

1 file changed

+19
-57
lines changed

1 file changed

+19
-57
lines changed

src/main/java/com/cronos/onlinereview/actions/projectdetails/ViewProjectDetailsAction.java

Lines changed: 19 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ public String execute() throws BaseException {
126126
long projectId = project.getId();
127127
long forumId = -1;
128128
String tempStr;
129-
if(projectId == 30301920) {
130-
LoggingHelper.logError("1");
131-
}
129+
132130
tempStr = (String) project.getProperty("Developer Forum ID");
133131
if (tempStr != null && tempStr.trim().length() != 0) {
134132
forumId = Long.parseLong(tempStr, 10);
@@ -163,9 +161,7 @@ public String execute() throws BaseException {
163161
}
164162
request.setAttribute("projectDRP", drpoint);
165163
}
166-
if(projectId == 30301920) {
167-
LoggingHelper.logError("2");
168-
}
164+
169165
// since Online Review Update - Add Project Dropdown v1.0
170166
// Retrieve the billing project id from property.
171167
// And retrieve the list of all client projects, find billing project name by
@@ -197,9 +193,7 @@ public String execute() throws BaseException {
197193
request.setAttribute("cockpitProjectLink",
198194
ConfigHelper.getDirectProjectBaseURL() + project.getTcDirectProjectId());
199195
}
200-
if(projectId == 30301920) {
201-
LoggingHelper.logError("3");
202-
}
196+
203197
// Place a string that represents "my" current role(s) into the request
204198
ActionsHelper.retrieveAndStoreMyRole(request, this);
205199
// Obtain an array of "my" resources
@@ -232,9 +226,7 @@ public String execute() throws BaseException {
232226
resourcePaymentsAmount.put(payment.getResourceId(), oldPayment + payment.getAmount().doubleValue());
233227
}
234228
request.setAttribute("resourcePaymentsAmount", resourcePaymentsAmount);
235-
if(projectId == 30301920) {
236-
LoggingHelper.logError("4");
237-
}
229+
238230
// Retrieve late records for the current user.
239231
LateDeliverableManager lateDeliverableManager = ActionsHelper.createLateDeliverableManager();
240232
if (myResources.length > 0) {
@@ -271,9 +263,7 @@ public String execute() throws BaseException {
271263
}
272264
request.setAttribute("paymentPenaltyPercentage", paymentPenaltyPercentage);
273265
}
274-
if(projectId == 30301920) {
275-
LoggingHelper.logError("5");
276-
}
266+
277267
// Get an array of all resources for the project
278268
Resource[] allProjectResources = ActionsHelper.getAllResourcesForProject(project);
279269
ActionsHelper.populateEmailProperty(request, allProjectResources);
@@ -299,9 +289,7 @@ public String execute() throws BaseException {
299289
request.setAttribute("phases", phases);
300290

301291
Deliverable[] deliverables = ActionsHelper.getAllDeliverablesForPhases(activePhases, allProjectResources);
302-
if(projectId == 30301920) {
303-
LoggingHelper.logError("6");
304-
}
292+
305293
// removing upload link by implementing Submission API endpoint
306294
Deliverable[] myDeliverables = ActionsHelper.getMyDeliverables(deliverables, myResources);
307295
Deliverable[] outstandingDeliverables = ActionsHelper.getOutstandingDeliverables(deliverables);
@@ -329,9 +317,7 @@ public String execute() throws BaseException {
329317
}
330318

331319
long currentTime = (new Date()).getTime();
332-
if(projectId == 30301920) {
333-
LoggingHelper.logError("7");
334-
}
320+
335321
// These two arrays will contain Deadline near / Late / Completed codes for
336322
// deliverables
337323
int[] myDeliverableStatuses = getDeliverableStatusCodes(myDeliverables, activePhases, currentTime);
@@ -350,9 +336,7 @@ public String execute() throws BaseException {
350336
myDeliverableDates[i] = phase.getScheduledEndDate();
351337
}
352338
}
353-
if(projectId == 30301920) {
354-
LoggingHelper.logError("8");
355-
}
339+
356340
for (int i = 0; i < outstandingDeliverables.length; ++i) {
357341
Deliverable deliverable = outstandingDeliverables[i];
358342
if (deliverable.isComplete()) {
@@ -366,9 +350,7 @@ public String execute() throws BaseException {
366350
String[] myDeliverableLinks = generateDeliverableLinks(request, myDeliverables, phases);
367351
Long[] outstandingDeliverableUserIds = getDeliverableUserIds(outstandingDeliverables, allProjectResources);
368352
Long[] outstandingDeliverableSubmissionUserIds = getDeliverableSubmissionUserIds(outstandingDeliverables);
369-
if(projectId == 30301920) {
370-
LoggingHelper.logError("9");
371-
}
353+
372354
request.setAttribute("myDeliverableDates", myDeliverableDates);
373355
request.setAttribute("outstandingDeliverableDates", outstandingDeliverableDates);
374356
request.setAttribute("myDeliverableStatuses", myDeliverableStatuses);
@@ -385,9 +367,7 @@ public String execute() throws BaseException {
385367
// The following two arrays are used to display Gantt chart
386368
long[] ganttOffsets = new long[phases.length];
387369
long[] ganttLengths = new long[phases.length];
388-
if(projectId == 30301920) {
389-
LoggingHelper.logError("10");
390-
}
370+
391371
// List of scorecard templates used for this project
392372
Map<String, Scorecard> phaseScorecardTemplates = new LinkedHashMap<String, Scorecard>();
393373
Map<String, String> phaseScorecardLinks = new LinkedHashMap<String, String>();
@@ -426,9 +406,7 @@ public String execute() throws BaseException {
426406
phaseScorecardLinks.put(phaseTypeName, "ViewScorecard?scid=" + scorecardTemplate.getId());
427407
}
428408
}
429-
if(projectId == 30301920) {
430-
LoggingHelper.logError("11");
431-
}
409+
432410
long currentTimeInMinutes = (new Date()).getTime() / (60 * 1000);
433411
if (currentTimeInMinutes >= projectStartTime && currentTimeInMinutes <= projectEndTime) {
434412
request.setAttribute("ganttCurrentTime", currentTimeInMinutes - projectStartTime);
@@ -443,9 +421,7 @@ public String execute() throws BaseException {
443421
*/
444422

445423
// Place phases' start/end dates
446-
if(projectId == 30301920) {
447-
LoggingHelper.logError("12");
448-
}
424+
449425
request.setAttribute("originalStart", originalStart);
450426
request.setAttribute("originalEnd", originalEnd);
451427
request.setAttribute("phaseStatuseCodes", phaseStatuseCodes);
@@ -470,9 +446,7 @@ public String execute() throws BaseException {
470446
request.setAttribute("resources", allProjectResources);
471447
request.setAttribute("users", allProjectExtUsers);
472448
}
473-
if(projectId == 30301920) {
474-
LoggingHelper.logError("13");
475-
}
449+
476450
// Project Prizes
477451
List<Prize> contestPrizes = new ArrayList<Prize>();
478452
List<Prize> checkpointPrizes = new ArrayList<Prize>();
@@ -501,9 +475,7 @@ public String execute() throws BaseException {
501475
request.setAttribute("activeTabIdx", phasesDetails.getActiveTabIndex());
502476

503477
boolean sendTLNotifications = false;
504-
if(projectId == 30301920) {
505-
LoggingHelper.logError("14");
506-
}
478+
507479
if (AuthorizationHelper.isUserLoggedIn(request)) {
508480
Filter filterTNproject = NotificationFilterBuilder.createProjectIdFilter(project.getId());
509481
Filter filterTNuser = NotificationFilterBuilder
@@ -520,9 +492,7 @@ public String execute() throws BaseException {
520492
// Check resource roles
521493
request.setAttribute("isManager", AuthorizationHelper.hasUserRole(request, Constants.MANAGER_ROLE_NAMES));
522494
request.setAttribute("isSubmitter", AuthorizationHelper.hasUserRole(request, Constants.SUBMITTER_ROLE_NAME));
523-
if(projectId == 30301920) {
524-
LoggingHelper.logError("15");
525-
}
495+
526496
// check if registration phase is open
527497
boolean registrationOpen = false;
528498
for (int i = 0; i < activePhases.length && !registrationOpen; i++) {
@@ -555,9 +525,7 @@ public String execute() throws BaseException {
555525
appealsCompletedFlag = true;
556526
}
557527
}
558-
if(projectId == 30301920) {
559-
LoggingHelper.logError("16");
560-
}
528+
561529
long winnerExtUserId = Long.MIN_VALUE;
562530
String winnerExtRefId = (String) project.getProperty("Winner External Reference ID");
563531

@@ -605,9 +573,7 @@ public String execute() throws BaseException {
605573
AuthorizationHelper.hasUserPermission(request, Constants.ADVANCE_SUBMISSION_FAILED_SCREENING_PERM_NAME)
606574
&& project.getProjectStatus().getName().equals("Active") && reviewPhase != null
607575
&& !ActionsHelper.isPhaseClosed(reviewPhase.getPhaseStatus()));
608-
if(projectId == 30301920) {
609-
LoggingHelper.logError("17");
610-
}
576+
611577
request.setAttribute("isAllowedToPerformCheckpointScreening",
612578
AuthorizationHelper.hasUserPermission(request, Constants.PERFORM_CHECKPOINT_SCREENING_PERM_NAME)
613579
&& ActionsHelper.getPhase(phases, true, Constants.CHECKPOINT_SCREENING_PHASE_NAME) != null);
@@ -663,9 +629,7 @@ public String execute() throws BaseException {
663629
&& !AuthorizationHelper.hasUserPermission(request, Constants.PERFORM_AGGREGATION_PERM_NAME)) {
664630
allowedToReviewAggregation = true;
665631
}
666-
if(projectId == 30301920) {
667-
LoggingHelper.logError("18");
668-
}
632+
669633
if (allowedToReviewAggregation && AuthorizationHelper.hasUserRole(request, Constants.SUBMITTER_ROLE_NAME)) {
670634
Long winnerId;
671635
try {
@@ -707,9 +671,7 @@ public String execute() throws BaseException {
707671
ProjectLinkManager linkManager = ActionsHelper.createProjectLinkManager();
708672
request.setAttribute("destProjectLinks", linkManager.getDestProjectLinks(project.getId()));
709673
request.setAttribute("srcProjectLinks", linkManager.getSourceProjectLinks(project.getId()));
710-
if(projectId == 30301920) {
711-
LoggingHelper.logError("19");
712-
}
674+
713675
return Constants.SUCCESS_FORWARD_NAME;
714676
}
715677

0 commit comments

Comments
 (0)