Unable to remove any resources in MSP
search cancel

Unable to remove any resources in MSP

book

Article ID: 263341

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

You open a project in MSP and try to remove or replace a resource assigned to a task.  It appears to update correctly however when saving back to Clarity no changes are made.

Steps to reproduce

  1. Open a Project with tasks and assignments
  2. Open the Project with MSP
  3. Double-click a task
  4. Remove a resource
  5. Click the CA integration tab
  6. Click Save

Expected result - It saves correctly with that resource removed

Actual result- MSP said it was saved successfully however the change was not saved back to Clarity

Error in app-ca.log

ERROR 2023-02-22 14:25:16,401 [http-nio-80-exec-13] niku.schedulers (clarity::schedulers.getProject) Error during ProjectSnapshotHandler.saveSnapshot_Assignments

java.sql.SQLException: Exception on Query: INSERT INTO PRJ_EXPORT (PROJECT_ID,OBJECT_CODE,OBJECT_ID,OBJECT_LAST_MODIFIED_DATE,PARENT1_OBJECT_CODE,PARENT1_OBJECT_ID, PARENT2_OBJECT_CODE,PARENT2_OBJECT_ID) (select t.prprojectid AS PROJECT_ID,'ASSIGNMENT' AS OBJECT_CODE,a.prid AS OBJECT_ID, a.last_updated_date AS OBJECT_LAST_MODIFIED_DATE, 'TEAM' AS PARENT1_OBJECT_CODE,a.team_id AS PARENT1_OBJECT_ID, 'TASK' AS PARENT2_OBJECT_CODE,t.prid AS PARENT2_OBJECT_ID from prtask t,prassignment a where t.prid=a.prtaskid and t.prprojectid=<XXXXX>)

Caused by: java.sql.SQLIntegrityConstraintViolationException: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-01400: cannot insert NULL into ("NIKU"."PRJ_EXPORT"."PARENT1_OBJECT_ID")

Environment

Release : All supported releases

Cause

Team_ID is null

Resolution

Removed records from prassignment where team_id is null via database

 

  1. Run the following query to identify prassignment records that have TEAM_ID with a null value:
    • Select * from prassignment where team_id is null
  2. Find the PRID returned  in the query above.
  3. Run the update query to set TEAM_ID to same value as PRID in PRASSIGNMENT e.g. if the PRID returned was 5639057, the following query would be run to populated the TEAM_ID
                       Update prassignment
                          Set team_id = 5639057
                                Where prid = 5639057