API-1019 error converting an idea to a project if a benefit plan exists and the billing currency is not the same as the home currency
STEPS TO REPRODUCE:
1. Admin > Finance > Processing
2. Enable Use Multi-Currency
3. Admin > Finance > Setup > Entities
4. Ensure an Entity exists and check the Home Currency, let's say USD
5. Admin > Finance > Setup > Currency
6. Enable a different currency, let's say EUR
7. Admin > Finance > Setup > Foreign Exchange Rates
8. Ensure Average type Exchange Rates exist from EUR to USD and USD to EUR, effective date can be set to 1/1/24
9. Create an idea with dates after 1/1/24 and financially enable it
10. Set the Billing Currency Code to EUR
11. Under Financials create a Benefit Plan
12. On the Benefit Plan details add a value let's say 20
13. Approve the idea
14. On the idea grid, right click > Convert To Project
15. Choose any given template
16. Ensure the Copy Financials option is checked
Expected Results: The Idea to get converted to Project
Actual Results: API-1019: Could not process the request due to internal error.
The following scenario has also been identified and is caused by the same defect
Copy Failed - idea: com.niku.union.service.ServiceException: Service Exception received when copying an idea if a benefit plan exists and the billing currency is not the same as the home currency
STEPS TO REPRODUCE:
1. Admin > Finance > Processing
2. Enable Use Multi-Currency
3. Admin > Finance > Setup > Entities
4. Ensure an Entity exists and check the Home Currency, let's say USD
5. Admin > Finance > Setup > Currency
6. Enable a different currency, let's say EUR
7. Admin > Finance > Setup > Foreign Exchange Rates
8. Ensure Average type Exchange Rates exist from EUR to USD and USD to EUR, the effective date can be set to 1/1/24
9. Create an idea with dates after 1/1/24 and financially enable it
10. Set the Billing Currency Code to EUR
11. Under Financials create a Benefit Plan
12. On the Benefit Plan details add a value let's say 20
13. Approve the idea
14. On the idea grid, select the idea and copy it
Expected Results: The Idea to get copied
Actual Results: Copy Failed - idea: com.niku.union.service.ServiceException: Service Exception
app-ca.log log files state:
ERROR 2024-03-07 05:14:19,831 [pool-7-thread-1] plan.BillingCurrencyConversionUtils (clarity:user:session:none) () BillingCurrencyConversionUtils::no rows
ERROR 2024-03-07 05:14:19,831 [pool-7-thread-1] plan.BillingCurrencyConversionUtils (clarity:user:session:none) () BillingCurrencyConversionUtils::curveStartDate::Thu Feb 01 00:00:00 EST 2024
ERROR 2024-03-07 05:14:19,832 [pool-7-thread-1] ppm.rest (clarity:user:session:none) () Failed to copy financial plans from source investment idea
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.ca.clarity.projmgr.rest.InvestmentCopyEngine.postProcess(InvestmentCopyEngine.java:329)
at com.niku.odf.object.copyengine.CopyEngine.copySameType(CopyEngine.java:757)
at com.niku.odf.object.copyengine.CopyEngine.copy(CopyEngine.java:462)
at com.ca.clarity.projmgr.rest.InvestmentCopyEngine.copy(InvestmentCopyEngine.java:114)
at com.ppm.rest.IdeaCopyEngine.copy(IdeaCopyEngine.java:41)
at com.niku.odf.object.copyengine.CopyEngine.copy(CopyEngine.java:324)
at com.ca.platform.osf.object.rest.provider.ODFResourceProvider.copyEntity(ODFResourceProvider.java:755)
at com.ca.platform.osf.object.rest.provider.ODFResourceProvider.doCopyEntityAsync(ODFResourceProvider.java:400)
at com.ca.platform.osf.object.rest.provider.ODFResourceProvider.lambda$copyEntity$0(ODFResourceProvider.java:323)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException: Cannot invoke "com.niku.union.odf.object.Attribute.getInternalName()" because the return value of "com.niku.union.odf.exception.ODFValidationException.getAttribute()" is null
at com.ca.clarity.financial.planning.copy.PlanCopyEngine.copyAndProcessDetailTSVAttributes(PlanCopyEngine.java:159)
at com.ca.clarity.financial.planning.copy.TemplatePlanProcessingService.copyPlans(TemplatePlanProcessingService.java:321)
at com.ca.clarity.financial.planning.copy.TemplatePlanProcessingService.copy(TemplatePlanProcessingService.java:143)
... 13 more
16.2.0, 16.2.1
This is caused by DE79905
This is fixed in 16.2.3
This only happens when the home currency and the billing currency are different
This only happens when a template is used
This happens in both Classic and MUX
This only happens if the benefit plan contains a non-zero value