search cancel

Populate from Allocation in cost plan not possible

book

Article ID: 229452

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

We receive the following error when we try to use "Populate from Allocation" in a Cost Plan, in the Modern UX:

Error while Populating Cost Plan from Allocations

The following corresponding error in the app-ca.log is noticeable:

ERROR 2021-31-31 25:06:08,273 [https-jsse-nio2-8444-exec-1903] services.CostPlanDetailInsertService (clarity:admin:130__06F1-A231-4CA3-B51D-D5AF29E6374B:PPM_REST_API) Exception while inserting cost plan detail 
com.niku.union.persistence.PersistenceApplicationException: java.sql.SQLIntegrityConstraintViolationException: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (NIKU.FIN_COST_PLAN_DETAILS_U1) violated

Cause

The FIN_COST_PLAN_DETAILS_U1 defines that the data in following set of columns be unique. When a duplicate is attempted to be inserted, an error is raised.

    "PLAN_ID",
    "TRANSACTION_CLASS_ID",
    "ROLE_ID",
    "CHARGE_CODE_ID",
    "LOV1_ID",
    "LOV2_ID",
    "INPUT_TYPE_CODE_ID",
    "LOCATION_ID",
    "RESOURCE_ID",
    "RESOURCE_CLASS_ID",
    "DEPARTMENT_ID",
    "COST_TYPE_ID"

Environment

Version: 15.X,16.X

Resolution

The Cost Plan was being grouped by Resource, Role, Cost Type and Charge Code. One of the resources in the Project Team did not have a Primary Role. Assigning a Primary Role to that team member resolved this issue.