API-1019 error received when creating an idea from a template if the template contains a cost plan and the Start and Finish dates are blank
STEPS TO REPRODUCE:
1. Create an idea and add a Start date and Finish dates
2. Financially enable the idea
3. Create a cost plan
4. Set the idea as a template
5. On the idea grid > New from Template > Select the template above
6. Fill the required data
7. The idea is created successfully using the template
8. On the idea template blank the Start and Finish dates
9. On the idea grid > New from Template > Select the template above
10. Fill the required data
Expected Results: The idea is created successfully using the template
Actual Results: API-1019 : Could not process the request due to internal error.
A different scenario has also been found where the idea conversion will fail if the idea contains a financial plan and the idea dates are blank.
STEPS TO REPRODUCE:
1. Create an idea and financially enable it.
2. Ensure that the Start and Finish dates are blank
3. Create a cost plan
4. Approve the idea and convert it to a project.
5. Ensure the Copy Financial Properties and Financial Plans option is selected
Expected Results: Idea gets converted to a project
Actual Results: Project conversion fails
Clarity 16.2.X
This is caused by DE116024
This is being analyzed by Engineering
app-ca.log shows following errors in 16.2.X:
Caused by: com.niku.union.service.ServiceException: Service Exception
at com.ca.clarity.financial.planning.copy.TemplatePlanProcessingService.copy(TemplatePlanProcessingService.java:163)
at com.niku.projmgr.api.CopyObjectUtil.copyFinancialPlan(CopyObjectUtil.java:52)
at com.niku.projmgr.api.CopyProjectAPI.copyProjectFromTemplate(CopyProjectAPI.java:151)
at com.niku.projmgr.xql2.handlers.CopyProjectHandler.preProcess(CopyProjectHandler.java:83)
....
Caused by: java.lang.NullPointerException: Cannot invoke "com.niku.xmlserver.core.NkDate.toDate(int)" because "calNewDate" is null
at com.ca.clarity.financial.planning.copy.TemplatePlanCopyHelper.calculateDateShift(TemplatePlanCopyHelper.java:237)
at com.ca.clarity.financial.planning.copy.TemplatePlanProcessingService.copyPlans(TemplatePlanProcessingService.java:280)
at com.ca.clarity.financial.planning.copy.TemplatePlanProcessingService.copy(TemplatePlanProcessingService.java:143)
... 117 more
app-ca.log shows following errors in 16.0.X:
Caused by: com.niku.union.service.ServiceException: Service Exception
at com.ca.clarity.financial.planning.copy.IdeaPlanProcessingService.copy(IdeaPlanProcessingService.java:151)
at com.ca.clarity.financial.planning.copy.CopyIdeaPlansHandler.postProcess(CopyIdeaPlansHandler.java:78)
at com.niku.xql2.XQLVisitor.postProcess(XQLVisitor.java:1423)
Caused by: java.lang.NullPointerException
at com.ca.clarity.financial.planning.copy.TemplatePlanCopyHelper.calculateDateShift(TemplatePlanCopyHelper.java:229)
at com.ca.clarity.financial.planning.copy.IdeaPlanProcessingService.copyPlans(IdeaPlanProcessingService.java:268)
at com.ca.clarity.financial.planning.copy.IdeaPlanProcessingService.copy(Id