File tree Expand file tree Collapse file tree 1 file changed +8
-23
lines changed
src/main/java/com/topcoder/onlinereview/component/project/phase/handler Expand file tree Collapse file tree 1 file changed +8
-23
lines changed Original file line number Diff line number Diff line change @@ -357,43 +357,28 @@ private boolean allAppealsResolved(Phase phase) throws PhaseHandlingException {
357
357
358
358
// for each review
359
359
for (Review review : reviews ) {
360
- int appealCount = 0 ;
361
- int responseCount = 0 ;
362
-
363
- Comment [] comments = review .getAllComments ();
364
-
365
- for (Comment comment : comments ) {
366
- String commentType = comment .getCommentType ().getName ();
367
-
368
- if (Constants .COMMENT_TYPE_APPEAL .equals (commentType )) {
369
- appealCount ++;
370
- } else if (Constants .COMMENT_TYPE_APPEAL_RESPONSE .equals (commentType )) {
371
- responseCount ++;
372
- }
373
- }
374
360
375
361
Item [] items = review .getAllItems ();
376
362
377
363
for (Item item : items ) {
378
- comments = item .getAllComments ();
364
+ boolean appeal = false ;
365
+ boolean response = false ;
366
+ Comment [] comments = item .getAllComments ();
379
367
380
368
for (Comment comment : comments ) {
381
369
String commentType = comment .getCommentType ().getName ();
382
370
383
371
if (Constants .COMMENT_TYPE_APPEAL .equals (commentType )) {
384
- appealCount ++ ;
372
+ appeal = true ;
385
373
} else if (Constants .COMMENT_TYPE_APPEAL_RESPONSE .equals (commentType )) {
386
- responseCount ++ ;
374
+ response = true ;
387
375
}
388
376
}
389
- }
390
-
391
- // if appeals count does not match response count, return false.
392
- if (appealCount != responseCount ) {
393
- return false ;
377
+ if (appeal && !response ) {
378
+ return false ;
379
+ }
394
380
}
395
381
}
396
-
397
382
return true ;
398
383
}
399
384
}
You can’t perform that action at this time.
0 commit comments