Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

magic suggest integration and misc bug fixes #294

Merged
merged 15 commits into from
Aug 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
<property name="dist_envsetupdir" value="${build_distdir}/envsetup"/>
<property name="tokenized_conf" value="${builddir}/conf"/>

<property name="jQ_1_11_1_jsp" value="jq_1_11_1.jsp"/>

<!-- classes needed to compile the production code -->
<path id="buildlibs">
<path refid="component.tcs-dependencies"/>
Expand All @@ -104,6 +106,7 @@
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${tokenized_conf}" file="${webdir}/WEB-INF/includes/${jQ_1_11_1_jsp}" overwrite="true"/>
<replace replacefilterfile="token.properties" dir="${tokenized_conf}"/>
</target>

Expand Down Expand Up @@ -580,6 +583,7 @@
<include name="jboss-cache/jgroups.jar" />
</fileset>
</copy>
<copy todir="${jboss_deploy_dir}/${distfilename}.ear/${distfilename}.war/WEB-INF/includes" file="${tokenized_conf}/${jQ_1_11_1_jsp}"/>
</target>

<target name="first_deploy" depends="clean, deploy-jboss-files, deploy-static-files, deploy" description="setup the local clean jboss instance to run the direct application">
Expand Down
24 changes: 24 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
machine:
services:
- docker

dependencies:
pre:
- pip install --upgrade pip
- pip install awsebcli

test:
override:
- docker run -v $PWD:/root/direct appiriodevops/direct-app:build2 /root/scripts/build.sh

#deployment:
# development:
# branch: ["dev", "group_ids_filtering"]
# commands:
# - .deploy/dockerhub_push.sh DEV $CIRCLE_BUILD_NUM
# - .deploy/ebs_deploy.sh ap-challenge DEV $CIRCLE_BUILD_NUM
# production:
# branch: master
# commands:
# - .deploy/dockerhub_push.sh PROD $CIRCLE_BUILD_NUM
# - .deploy/ebs_deploy.sh ap-challenge PROD $CIRCLE_BUILD_NUM
Original file line number Diff line number Diff line change
Expand Up @@ -4520,7 +4520,7 @@ public SoftwareCompetition updateSoftwareContest(TCSubject tcSubject, SoftwareCo
public SoftwareCompetition updateSoftwareContest(TCSubject tcSubject, SoftwareCompetition contest,
long tcDirectProjectId, Date multiRoundEndDate, Date endDate) throws ContestServiceException, PermissionServiceException {

return updateSoftwareContest(tcSubject, contest, tcDirectProjectId, null, null, null);
return updateSoftwareContest(tcSubject, contest, tcDirectProjectId, null, multiRoundEndDate, endDate);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ public String getContestConfigs() throws Exception {
configs.put("copilotFees", ConfigUtils.getCopilotFees());
configs.put("billingInfos", getBillingProjectInfos());
configs.put("groups", getAllProjectGroups());
configs.put("platforms", getReferenceDataBean().getPlatforms());
configs.put("technologies", getReferenceDataBean().getTechnologies());
setResult(configs);
return SUCCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,23 @@
* <ul>
* <li>Updated {@link #getMapResult(SoftwareCompetition)}include project groups of challenge</li>
* </ul>
*
* <p>
* Version 2.4 (Topcoder - Ability To Set End Date For Registration Phase and Submission Phase)
* <ul>
* <li>Added regEndDate in response</li>
* </ul>
* </p>
*
* <p>
* Version 2.4 (Topcoder - Ability To Set End Date For Registration Phase and Submission Phase)
* <ul>
* <li>Added regEndDate in response</li>
* </ul>
* </p>
*
* <p>
* Version 2.5 (TOPCODER - SUPPORT TYPEAHEAD FOR TASK ASSIGNEES IN DIRECT APP)
* <ul>
* <li>Refactor registrants response</li>
* </ul>
* </p>
*
* @author BeBetter, TCSDEVELOPER, morehappiness, bugbuka, GreatKevin, TCSCODER
* @version 2.4
* @version 2.5
* @since Direct - View/Edit/Activate Software Contests Assembly
*/
public class SoftwareCompetitionBeanProcessor implements JsonBeanProcessor {
Expand Down Expand Up @@ -251,7 +258,7 @@ private Object getMapResult(SoftwareCompetition bean) {
if(r.getResourceRole().getId() == ResourceRole.RESOURCE_ROLE_SUBMITTER) {
Map<String, String> user = new HashMap<String, String>();
user.put("id", String.valueOf(r.getUserId()));
user.put("handle", r.getProperty("Handle"));
user.put("name", r.getProperty("Handle"));
registrant.add(user);
}
// get reviewers
Expand Down Expand Up @@ -293,15 +300,15 @@ public Object transform(Object object) {
if (isTechnologyContest(bean)) {
result.put("technologyIds", CollectionUtils.collect(assetDTO.getTechnologies(), new Transformer() {
public Object transform(Object object) {
return ((Technology) object).getId() + "";
return ((Technology) object).getId();
}
}));
}

if(isPlatformContest(bean)) {
result.put("platformIds", CollectionUtils.collect(bean.getProjectHeader().getPlatforms(), new Transformer() {
public Object transform(Object object) {
return ((ProjectPlatform) object).getId() + "";
return ((ProjectPlatform) object).getId();
}
}));
}
Expand Down
10 changes: 5 additions & 5 deletions src/web/WEB-INF/contest-details2.jsp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%--
- Author: BeBetter, isv, GreatKevin, Ghost_141, Veve
- Author: BeBetter, isv, GreatKevin, Ghost_141, Veve, TCSCODER
- Version: 1.11
- Copyright (C) 2010 - 2016 TopCoder Inc., All Rights Reserved.
- Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved.
-
- Description: Contest Detail page
-
Expand Down Expand Up @@ -30,6 +30,8 @@
- - Update dashboard part to show the real time line graph.
- Version 1.11 (TOPCODER DIRECT - CLOSE PRIVATE CHALLENGE IMMEDIATELY):
- - Add CANCEL and CLOSE button on active private challenge
- Version 1.12 (TOPCODER - SUPPORT TYPEAHEAD FOR TASK ASSIGNEES IN DIRECT APP):
- - Split jquery import to other file
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/includes/taglibs.jsp" %>
Expand All @@ -41,9 +43,7 @@
<script type="text/javascript" src="/scripts/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="/scripts/magicsuggest.js"></script>
<script type="text/javascript">
var jQuery_1_11_1 = $.noConflict(true);
</script>
<jsp:include page="includes/jq_1_11_1.jsp"/>
<jsp:include page="includes/htmlhead.jsp"/>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" media="screen" href="/css/direct/dashboard-ie7.css" />
Expand Down
15 changes: 10 additions & 5 deletions src/web/WEB-INF/includes/contest/editTab.jsp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%--
- Version: 2.8
- Version: 2.9
- Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved.
-
- Description: Edit Tab for studio contest detail page
Expand Down Expand Up @@ -60,6 +60,9 @@
-
- Version 2.8 (TOPCODER - SUPPORT CUSTOM COPILOT FEE FOR CHALLENGE IN DIRECT APP):
- Add support for custom copilot fee
-
- Version 2.9 (TOPCODER - SUPPORT TYPEAHEAD FOR TASK ASSIGNEES IN DIRECT APP):
- - Move task assign member to use magicSuggest
--%>
<%@ include file="/WEB-INF/includes/taglibs.jsp" %>

Expand Down Expand Up @@ -320,12 +323,14 @@
</div>
<br />
<div id="preRegisterUsersEditDiv" class="hide">
<span class="name fixWidthName" title="Enter 1 or more members in a comma separated list. Member terms will be validated upon saving."><strong>Assign Member(s):</strong></span>
<span class="value"><input type="text" name="preRegisterUsers" class="bigin" id="preRegisterUsers"/></span>
<div class="ms-group-display">
<span class="name fixWidthName" title="Enter 1 or more members in a comma separated list. Member terms will be validated upon saving."><strong>Assign Member(s):</strong></span>
<div class="ms-group-div"><div id="preRegisterUsers"></div></div>
</div>
</div>
<div id="groupDisplay">
<div class="ms-group-display">
<span class="name fixWidthName" title="Enter challenge groups"><strong>Group(s):</strong></span>
<div id="groupDiv"><div id="groups"></div></div>
<div class="ms-group-div"><div id="groups"></div></div>
</div>
<br/><br/>
<span class="name fixWidthName"><strong>Created By</strong></span>
Expand Down
63 changes: 16 additions & 47 deletions src/web/WEB-INF/includes/contest/editTabSoftware.jsp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%--
- Version: 3.1
- Version: 3.2
- Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved.
-
- Description: This page fragment renders edit softeware contest page.
Expand Down Expand Up @@ -81,6 +81,9 @@
-
- Version 3.1 (TOPCODER - SUPPORT CUSTOM COPILOT FEE FOR CHALLENGE IN DIRECT APP):
- Add support for custom copilot fee
-
- Version 3.2 (TOPCODER - SUPPORT TYPEAHEAD FOR TASK ASSIGNEES IN DIRECT APP):
- - Move task assign member to use magicSuggest
--%>
<%@ include file="/WEB-INF/includes/taglibs.jsp" %>

Expand Down Expand Up @@ -343,14 +346,16 @@
<input type="checkbox" name="privateProject" id="privateProject"/>
</div>
<div id="preRegisterUsersEditDiv" class="hide">
<span class="name fixWidthName" title="Enter 1 or more members in a comma separated list. Member terms will be validated upon saving."><strong>Assign Member(s):</strong></span>
<span class="value"><input type="text" name="preRegisterUsers" class="bigin" id="preRegisterUsers"/></span>
<div class="ms-group-display">
<span class="name fixWidthName" title="Enter 1 or more members in a comma separated list. Member terms will be validated upon saving."><strong>Assign Member(s):</strong></span>
<div class="ms-group-div"><div id="preRegisterUsers"></div></div>
</div>
</div>
<div id="groupDisplay">
<div class="ms-group-display">
<span class="name fixWidthName" title="Enter challenge groups"><strong>Group(s):</strong></span>
<div id="groupDiv"><div id="groups"></div></div>
<div class="ms-group-div"><div id="groups"></div></div>
</div>
<br/><br/>
<br/>
<div>

<span class="name fixWidthName"><strong>Created By</strong></span>
Expand Down Expand Up @@ -894,53 +899,17 @@
<!-- end .guidelines -->

<s:if test='result.projectHeader.projectCategory.id != 29'>

<div class="prizes platform" id="swPlatformDiv">
<h3>Choose Your Platform:</h3>

<div class="prizesInner_tech">
<span class="head_font">Master Platforms&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span class="head_font_space">Your Project Platforms</span>
<br />
<select multiple id="masterPlatformsSelect">
<s:iterator value="referenceDataBean.platforms">
<option value='<s:property value="id" />'><s:property value="name" /></option>
</s:iterator>
</select>

<div id="button_platform">
<img src="/images/add_tech.png" alt="add" id="addPlatforms" />
<br /><br />
<img src="/images/remove_tech.png" alt="remove" id="removePlatforms" />
</div>

<select multiple id="masterPlatformsChoosenSelect">
</select>
<div class="techPlatformDiv">
<div id="platforms"></div>
</div>
</div>


<div class="prizes technology" id="swTechnologyDiv">
<div class="prizes technology" id="swTechnologyDiv">
<h3>Choose Your Technology:</h3>

<div class="prizesInner_tech">
<span class="head_font">Master Technologies</span>
<span class="head_font_space">Your Project Technologies</span>
<br />
<select multiple id="masterTechnologiesSelect">
<s:iterator value="referenceDataBean.technologies">
<option value='<s:property value="id" />'><s:property value="name" /></option>
</s:iterator>
</select>

<div id="button_tech">
<img src="/images/add_tech.png" alt="add" id="addTechnologies" />
<br /><br />
<img src="/images/remove_tech.png" alt="remove" id="removeTechnologies" />
</div>

<select multiple id="masterTechnologiesChoosenSelect">
</select>
<div class="techPlatformDiv">
<div id="technologies"></div>
</div>
</div>

Expand Down
10 changes: 10 additions & 0 deletions src/web/WEB-INF/includes/jq_1_11_1.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<%--
- Version: 1.0
- Copyright (C) 2017 TopCoder Inc., All Rights Reserved.
-
- Description: Html fragment to import jquery 1.11.1 and setup other variable
--%>
<script type="text/javascript">
var jQuery_1_11_1 = $.noConflict(true);
var member_api_url = "@memberSearchApiUrl@";
</script>
29 changes: 17 additions & 12 deletions src/web/WEB-INF/includes/launch/contestSelection.jsp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%--
- Author: GreatKevin, bugbuka, GreatKevin, TCSCODER
- Version: 2.6
- Copyright (C) 2010 - 2016 TopCoder Inc., All Rights Reserved.
- Version: 2.7
- Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved.
-
- Description: Contest selection page.

Expand Down Expand Up @@ -45,11 +45,14 @@
- - Add review type radios to choose 'community' or 'internal' review
- Version 2.2 (Provide Way To Pre_register members When Launching Challenge)
- - Add support pre-register member
-
- Version 2.6 (Topcoder - Ability To Set End Date For Registration Phase and Submission Phase)
- Added registration and submission end date/time for design F2F
- Added registration length for studio contests (excluding design F2F)
- All software contests support modification of registration and submission end date/time
-
- Version 2.6 (Topcoder - Ability To Set End Date For Registration Phase and Submission Phase)
- Added registration and submission end date/time for design F2F
- Added registration length for studio contests (excluding design F2F)
- All software contests support modification of registration and submission end date/time
-
- Version 2.7 (TOPCODER - SUPPORT TYPEAHEAD FOR TASK ASSIGNEES IN DIRECT APP):
- - Move task assign member to use magicSuggest
--%>
<%@ include file="/WEB-INF/includes/taglibs.jsp" %>

Expand Down Expand Up @@ -202,13 +205,15 @@
<input type="checkbox" name="privateProject" title="Is this challenge private?">
</div>

<div class="row preRegisterUsersRow hide">
<div class="ms-row preRegisterUsersRow hide">
<label>Assign Member(s):</label>
<input name="preRegisterUsers" type="text" class="text"/>
<div class="ms-group-div">
<div id="preRegisterUsers"></div>
</div>
</div>
<div class="row">
<div class="ms-row">
<label>Group(s):</label>
<div id="groupDiv">
<div class="ms-group-div">
<div id="groups"></div>
</div>
</div>
Expand Down Expand Up @@ -267,7 +272,7 @@
pattern="z" timeZone="${defaultTimeZone}"/></span>
</div>


<div id="subEndDateDiv" class="row software designF2F">
<label>Submission End:</label>
<input id="subEndDate" name="subEndDate" type="text" class="text date-pick" readonly="true"/>
Expand Down
2 changes: 1 addition & 1 deletion src/web/WEB-INF/includes/launch/orderReviewSoftware.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</tr>
</table>

<tablec lass="total">
<table lass="total">
<tr>
<p class="note">
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
Expand Down
Loading