|
1 | 1 | /*
|
2 |
| - * Copyright (C) 2010 - 2016 TopCoder Inc., All Rights Reserved. |
| 2 | + * Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved. |
3 | 3 | */
|
4 | 4 | package com.topcoder.direct.services.view.action.contest.launch;
|
5 | 5 |
|
|
265 | 265 | * <li>Updated {@link #executeAction()}</li>
|
266 | 266 | * </ul>
|
267 | 267 | * </p>
|
268 |
| - * @author fabrizyo, FireIce, Veve, isv, GreatKevin, flexme, frozenfx, bugbuka, GreatKevin, Veve |
269 |
| - * @version 2.3 |
| 268 | + * |
| 269 | + * <p> |
| 270 | + * Version 2.4 (TOPCODER DIRECT - SUPPORT CHALLENGES WITH ZERO PRIZE): |
| 271 | + * <ul> |
| 272 | + * <li>Updated {@link #populateCompetition(SoftwareCompetition)} method to accept zero prize</li> |
| 273 | + * </ul> |
| 274 | + * </p> |
| 275 | + * |
| 276 | + * @author fabrizyo, FireIce, Veve, isv, GreatKevin, flexme, frozenfx, bugbuka, TCSCODER |
| 277 | + * @version 2.4 |
270 | 278 | */
|
271 | 279 | public class SaveDraftContestAction extends ContestAction {
|
272 | 280 | /**
|
@@ -964,7 +972,7 @@ public boolean evaluate(Object object) {
|
964 | 972 | List<Prize> newPrizes = new ArrayList<Prize>();
|
965 | 973 | if (prizes != null) {
|
966 | 974 | for (Prize prize : prizes) {
|
967 |
| - if (prize.getPrizeAmount() > 0) { |
| 975 | + if (prize.getPrizeAmount() >= 0) { |
968 | 976 | if (projectId > 0) {
|
969 | 977 | prize.setProjectId(projectId);
|
970 | 978 | } else {
|
@@ -1037,6 +1045,11 @@ public boolean evaluate(Object object) {
|
1037 | 1045 | }
|
1038 | 1046 | }
|
1039 | 1047 | }
|
| 1048 | + if ((softwareCompetition.getProjectHeader().getProperty(ProjectPropertyType.PRODUCT_SKU) == null || |
| 1049 | + "".equals(softwareCompetition.getProjectHeader().getProperty(ProjectPropertyType.PRODUCT_SKU))) && |
| 1050 | + softwareCompetition.getProjectHeader().getProperties().containsKey(ProjectPropertyType.PRODUCT_SKU)){ |
| 1051 | + softwareCompetition.getProjectHeader().getProperties().remove(ProjectPropertyType.PRODUCT_SKU); |
| 1052 | + } |
1040 | 1053 | }
|
1041 | 1054 |
|
1042 | 1055 | /**
|
|
0 commit comments