API-1019 error creating project from template
search cancel

API-1019 error creating project from template

book

Article ID: 377710

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

The project creation from a template fails with API-1019 error when a preselected lookup field value is inactive and this is on the template modal

STEPS TO REPRODUCE

1. Administration > Studio > Objects > Project object
2. Create a lookup type attribute called Direct Manager linked to the SCH_BROWSE_RESOURCE system lookup
3. Create a project and populate the field with a given resource, ie ResMan1
4. Set the project as a template
5. Go to the resource profile ResMan1 and inactivate him
6. Create a project object blueprint.
7. Go to the Create from Template tab and add the Firect Manager field to the same
8. Link the template project to the blueprint
9. Create a new project from the template. You can see the Direct Manager field with ResMan1 preselected
10. Click on the Create button

Expected Results: The toast message is meaningful: CMN-0016: Attribute 'Direct Manager' has an invalid value
Actual results: API-1019: Could not process the request due to internal error

Environment

Clarity 16.2.X

Cause

This is caused by DE154069

Resolution

This is fixed in Clarity 16.3.0

In 16.3.0 the toast message has been enhanced and you will receive the following error:

CMN-0016: Attribute 'DirectManager' has an invalid value

Workaround: Ensure the inactive resource assigned to the Direct Manager field is active or null 

Additional Information

app-ca.log shows the following error on the trace

ERROR 2024-09-19 06:49:12,424 [http-nio-1623-exec-813] ppm.rest (clarity:myuser:mysession:PPM_REST_API) (5517730f-58b5-45be-9623-0d92515633f7) AbstractInvestmentTemplateCopier ::  Exception occured while executing 'Required Attribute' rule while creating instance from template.
ERROR 2024-09-19 06:49:12,425 [http-nio-1623-exec-813] ppm.rest (clarity:myuser:mysession:PPM_REST_API) (5517730f-58b5-45be-9623-0d92515633f7) 
com.ca.ppm.rest.exception.APISystemException: API-1019 : Could not process the request due to internal error.
at com.ca.clarity.projmgr.template.AbstractInvestmentTemplateCopier.validateRuleBasedRequiredAttributes(AbstractInvestmentTemplateCopier.java:238)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)