@@ -126,9 +126,7 @@ public String execute() throws BaseException {
126
126
long projectId = project .getId ();
127
127
long forumId = -1 ;
128
128
String tempStr ;
129
- if (projectId == 30301920 ) {
130
- LoggingHelper .logError ("1" );
131
- }
129
+
132
130
tempStr = (String ) project .getProperty ("Developer Forum ID" );
133
131
if (tempStr != null && tempStr .trim ().length () != 0 ) {
134
132
forumId = Long .parseLong (tempStr , 10 );
@@ -163,9 +161,7 @@ public String execute() throws BaseException {
163
161
}
164
162
request .setAttribute ("projectDRP" , drpoint );
165
163
}
166
- if (projectId == 30301920 ) {
167
- LoggingHelper .logError ("2" );
168
- }
164
+
169
165
// since Online Review Update - Add Project Dropdown v1.0
170
166
// Retrieve the billing project id from property.
171
167
// And retrieve the list of all client projects, find billing project name by
@@ -197,9 +193,7 @@ public String execute() throws BaseException {
197
193
request .setAttribute ("cockpitProjectLink" ,
198
194
ConfigHelper .getDirectProjectBaseURL () + project .getTcDirectProjectId ());
199
195
}
200
- if (projectId == 30301920 ) {
201
- LoggingHelper .logError ("3" );
202
- }
196
+
203
197
// Place a string that represents "my" current role(s) into the request
204
198
ActionsHelper .retrieveAndStoreMyRole (request , this );
205
199
// Obtain an array of "my" resources
@@ -232,9 +226,7 @@ public String execute() throws BaseException {
232
226
resourcePaymentsAmount .put (payment .getResourceId (), oldPayment + payment .getAmount ().doubleValue ());
233
227
}
234
228
request .setAttribute ("resourcePaymentsAmount" , resourcePaymentsAmount );
235
- if (projectId == 30301920 ) {
236
- LoggingHelper .logError ("4" );
237
- }
229
+
238
230
// Retrieve late records for the current user.
239
231
LateDeliverableManager lateDeliverableManager = ActionsHelper .createLateDeliverableManager ();
240
232
if (myResources .length > 0 ) {
@@ -271,9 +263,7 @@ public String execute() throws BaseException {
271
263
}
272
264
request .setAttribute ("paymentPenaltyPercentage" , paymentPenaltyPercentage );
273
265
}
274
- if (projectId == 30301920 ) {
275
- LoggingHelper .logError ("5" );
276
- }
266
+
277
267
// Get an array of all resources for the project
278
268
Resource [] allProjectResources = ActionsHelper .getAllResourcesForProject (project );
279
269
ActionsHelper .populateEmailProperty (request , allProjectResources );
@@ -299,9 +289,7 @@ public String execute() throws BaseException {
299
289
request .setAttribute ("phases" , phases );
300
290
301
291
Deliverable [] deliverables = ActionsHelper .getAllDeliverablesForPhases (activePhases , allProjectResources );
302
- if (projectId == 30301920 ) {
303
- LoggingHelper .logError ("6" );
304
- }
292
+
305
293
// removing upload link by implementing Submission API endpoint
306
294
Deliverable [] myDeliverables = ActionsHelper .getMyDeliverables (deliverables , myResources );
307
295
Deliverable [] outstandingDeliverables = ActionsHelper .getOutstandingDeliverables (deliverables );
@@ -329,9 +317,7 @@ public String execute() throws BaseException {
329
317
}
330
318
331
319
long currentTime = (new Date ()).getTime ();
332
- if (projectId == 30301920 ) {
333
- LoggingHelper .logError ("7" );
334
- }
320
+
335
321
// These two arrays will contain Deadline near / Late / Completed codes for
336
322
// deliverables
337
323
int [] myDeliverableStatuses = getDeliverableStatusCodes (myDeliverables , activePhases , currentTime );
@@ -350,9 +336,7 @@ public String execute() throws BaseException {
350
336
myDeliverableDates [i ] = phase .getScheduledEndDate ();
351
337
}
352
338
}
353
- if (projectId == 30301920 ) {
354
- LoggingHelper .logError ("8" );
355
- }
339
+
356
340
for (int i = 0 ; i < outstandingDeliverables .length ; ++i ) {
357
341
Deliverable deliverable = outstandingDeliverables [i ];
358
342
if (deliverable .isComplete ()) {
@@ -366,9 +350,7 @@ public String execute() throws BaseException {
366
350
String [] myDeliverableLinks = generateDeliverableLinks (request , myDeliverables , phases );
367
351
Long [] outstandingDeliverableUserIds = getDeliverableUserIds (outstandingDeliverables , allProjectResources );
368
352
Long [] outstandingDeliverableSubmissionUserIds = getDeliverableSubmissionUserIds (outstandingDeliverables );
369
- if (projectId == 30301920 ) {
370
- LoggingHelper .logError ("9" );
371
- }
353
+
372
354
request .setAttribute ("myDeliverableDates" , myDeliverableDates );
373
355
request .setAttribute ("outstandingDeliverableDates" , outstandingDeliverableDates );
374
356
request .setAttribute ("myDeliverableStatuses" , myDeliverableStatuses );
@@ -385,9 +367,7 @@ public String execute() throws BaseException {
385
367
// The following two arrays are used to display Gantt chart
386
368
long [] ganttOffsets = new long [phases .length ];
387
369
long [] ganttLengths = new long [phases .length ];
388
- if (projectId == 30301920 ) {
389
- LoggingHelper .logError ("10" );
390
- }
370
+
391
371
// List of scorecard templates used for this project
392
372
Map <String , Scorecard > phaseScorecardTemplates = new LinkedHashMap <String , Scorecard >();
393
373
Map <String , String > phaseScorecardLinks = new LinkedHashMap <String , String >();
@@ -426,9 +406,7 @@ public String execute() throws BaseException {
426
406
phaseScorecardLinks .put (phaseTypeName , "ViewScorecard?scid=" + scorecardTemplate .getId ());
427
407
}
428
408
}
429
- if (projectId == 30301920 ) {
430
- LoggingHelper .logError ("11" );
431
- }
409
+
432
410
long currentTimeInMinutes = (new Date ()).getTime () / (60 * 1000 );
433
411
if (currentTimeInMinutes >= projectStartTime && currentTimeInMinutes <= projectEndTime ) {
434
412
request .setAttribute ("ganttCurrentTime" , currentTimeInMinutes - projectStartTime );
@@ -443,9 +421,7 @@ public String execute() throws BaseException {
443
421
*/
444
422
445
423
// Place phases' start/end dates
446
- if (projectId == 30301920 ) {
447
- LoggingHelper .logError ("12" );
448
- }
424
+
449
425
request .setAttribute ("originalStart" , originalStart );
450
426
request .setAttribute ("originalEnd" , originalEnd );
451
427
request .setAttribute ("phaseStatuseCodes" , phaseStatuseCodes );
@@ -470,9 +446,7 @@ public String execute() throws BaseException {
470
446
request .setAttribute ("resources" , allProjectResources );
471
447
request .setAttribute ("users" , allProjectExtUsers );
472
448
}
473
- if (projectId == 30301920 ) {
474
- LoggingHelper .logError ("13" );
475
- }
449
+
476
450
// Project Prizes
477
451
List <Prize > contestPrizes = new ArrayList <Prize >();
478
452
List <Prize > checkpointPrizes = new ArrayList <Prize >();
@@ -501,9 +475,7 @@ public String execute() throws BaseException {
501
475
request .setAttribute ("activeTabIdx" , phasesDetails .getActiveTabIndex ());
502
476
503
477
boolean sendTLNotifications = false ;
504
- if (projectId == 30301920 ) {
505
- LoggingHelper .logError ("14" );
506
- }
478
+
507
479
if (AuthorizationHelper .isUserLoggedIn (request )) {
508
480
Filter filterTNproject = NotificationFilterBuilder .createProjectIdFilter (project .getId ());
509
481
Filter filterTNuser = NotificationFilterBuilder
@@ -520,9 +492,7 @@ public String execute() throws BaseException {
520
492
// Check resource roles
521
493
request .setAttribute ("isManager" , AuthorizationHelper .hasUserRole (request , Constants .MANAGER_ROLE_NAMES ));
522
494
request .setAttribute ("isSubmitter" , AuthorizationHelper .hasUserRole (request , Constants .SUBMITTER_ROLE_NAME ));
523
- if (projectId == 30301920 ) {
524
- LoggingHelper .logError ("15" );
525
- }
495
+
526
496
// check if registration phase is open
527
497
boolean registrationOpen = false ;
528
498
for (int i = 0 ; i < activePhases .length && !registrationOpen ; i ++) {
@@ -555,9 +525,7 @@ public String execute() throws BaseException {
555
525
appealsCompletedFlag = true ;
556
526
}
557
527
}
558
- if (projectId == 30301920 ) {
559
- LoggingHelper .logError ("16" );
560
- }
528
+
561
529
long winnerExtUserId = Long .MIN_VALUE ;
562
530
String winnerExtRefId = (String ) project .getProperty ("Winner External Reference ID" );
563
531
@@ -605,9 +573,7 @@ public String execute() throws BaseException {
605
573
AuthorizationHelper .hasUserPermission (request , Constants .ADVANCE_SUBMISSION_FAILED_SCREENING_PERM_NAME )
606
574
&& project .getProjectStatus ().getName ().equals ("Active" ) && reviewPhase != null
607
575
&& !ActionsHelper .isPhaseClosed (reviewPhase .getPhaseStatus ()));
608
- if (projectId == 30301920 ) {
609
- LoggingHelper .logError ("17" );
610
- }
576
+
611
577
request .setAttribute ("isAllowedToPerformCheckpointScreening" ,
612
578
AuthorizationHelper .hasUserPermission (request , Constants .PERFORM_CHECKPOINT_SCREENING_PERM_NAME )
613
579
&& ActionsHelper .getPhase (phases , true , Constants .CHECKPOINT_SCREENING_PHASE_NAME ) != null );
@@ -663,9 +629,7 @@ public String execute() throws BaseException {
663
629
&& !AuthorizationHelper .hasUserPermission (request , Constants .PERFORM_AGGREGATION_PERM_NAME )) {
664
630
allowedToReviewAggregation = true ;
665
631
}
666
- if (projectId == 30301920 ) {
667
- LoggingHelper .logError ("18" );
668
- }
632
+
669
633
if (allowedToReviewAggregation && AuthorizationHelper .hasUserRole (request , Constants .SUBMITTER_ROLE_NAME )) {
670
634
Long winnerId ;
671
635
try {
@@ -707,9 +671,7 @@ public String execute() throws BaseException {
707
671
ProjectLinkManager linkManager = ActionsHelper .createProjectLinkManager ();
708
672
request .setAttribute ("destProjectLinks" , linkManager .getDestProjectLinks (project .getId ()));
709
673
request .setAttribute ("srcProjectLinks" , linkManager .getSourceProjectLinks (project .getId ()));
710
- if (projectId == 30301920 ) {
711
- LoggingHelper .logError ("19" );
712
- }
674
+
713
675
return Constants .SUCCESS_FORWARD_NAME ;
714
676
}
715
677
0 commit comments