Register
Submit a solution
The challenge is finished.

Challenge Overview

Recently, we have made some upgrades for direct app
1. Upgrade the struts version to 2.3.31 (https://github.com/appirio-tech/direct-app/commit/39255ba8945d4bf07480458b29f833484683fd05)
2. Update the regex pattern for excluding parameters (https://github.com/appirio-tech/direct-app/commit/d162526264d4af11130a5244e91ae06e1fa797cb)

After upgrading, most actions are working properly, except some, like 

1. Challenges I created  (https://cockpit.cloud.topcoder.com/direct/my/createdChallenges.action)
2. All Challenges (https://cockpit.cloud.topcoder.com/direct/my/challenges.action)

When debugging a bit, looks like the problem is mainly because the parameters are not properly set into the action, so when the backend calling the direct api service, it is not passing the proper parameters.

For Reference, please check 

1. js code trigger the ajax call - https://github.com/appirio-tech/direct-app/blob/dev/src/web/scripts/search.js#L921-L1064, if you check in network call, you can see the parameters are properly passed.
2. actions related 
https://github.com/appirio-tech/direct-app/blob/dev/src/java/main/com/topcoder/direct/services/view/action/my/MyCreatedChallengesAction.java
https://github.com/appirio-tech/direct-app/blob/dev/src/java/main/com/topcoder/direct/services/view/action/my/MyChallengesAction.java
https://github.com/appirio-tech/direct-app/blob/dev/src/java/main/com/topcoder/direct/services/view/action/ServiceBackendDataTablesAction.java


For Debugging, you can enable the struts dev mode, like update the following line in struts.xml
<constant name="struts.devMode" value="false"/>
You can also look at the server.log of jboss beside the console log.

The goal of this challenge, is to analyze the root cause and fix it. Since the direct api service is not available in local setup, you just need to demonstrate that the action can properly build the service url properly in 
buildServiceEndPoint(params)
Setup Direct App Locally

- Please use the dev branch of https://github.com/appirio-tech/direct-app for development.
- Please check https://github.com/appirio-tech/tc-common-tutorials/blob/master/docker/direct-app/ for how to setup and run locally.

Final Submission Guidelines

- Explanation of the root cause
- Code Changes for fixing the problem
- Verification Steps

ELIGIBLE EVENTS:

2017 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30056100