search cancel

Task Gantt Not Displaying Tasks in Classic UI

book

Article ID: 228147

calendar_today

Updated On:

Products

Clarity PPM SaaS

Issue/Introduction

When accessing Task > Gantt , it brings up blank

Note: Modern UX > Project > Task > Timeline view shows up fine

The APP logs show:

ERROR 2021-11-11 15:52:04,735 [http-nio-80-exec-19] service.WBSService (clarity:admin:session:odata.WBSService.loadFast) 
com.niku.union.persistence.PersistenceException: 
SQL error code: 0
Error message: ERROR: duplicate key value violates unique constraint "temp_wbs_global_session_u1"
  Detail: Key (taskid)=(5128905) already exists.
Executed:
 insert into TEMP_WBS_GLOBAL_SESSION( taskid, projectid, wbssequence, wbslevel, origwbslevel,origwbssequence, par_seq, nnb_seq, origpartask, orignnbtask )
           (
            SELECT task.prid, task.prprojectid, task.prwbssequence, task.prwbslevel, task.prwbslevel, task.prwbssequence, task.wbs_parseq, task.wbs_nnbseq
                   , PARENTTASK.PRID, NNBTASK.PRID
              FROM PRTASK TASK
                   LEFT OUTER JOIN PRTASK PARENTTASK ON PARENTTASK.PRWBSSEQUENCE = TASK.WBS_PARSEQ AND PARENTTASK.PRPROJECTID = TASK.PRPROJECTID
                   LEFT OUTER JOIN PRTASK NNBTASK ON NNBTASK.PRWBSSEQUENCE = TASK.WBS_NNBSEQ AND NNBTASK.PRPROJECTID = TASK.PRPROJECTID
             WHERE TASK.PRPROJECTID = ?
            ) 
Derived from statement:
<?xml version="1.0" encoding="UTF-8"?>
<statement batchable="true" sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" inputSource="map" xmlns="http://schemas.niku.com/2002/pmd">
  <sql dbVendor="all" tsvTemplateAttrCode="">
    <text>
          insert into @[email protected]( taskid, projectid, wbssequence, wbslevel, origwbslevel,origwbssequence, par_seq, nnb_seq, origpartask, orignnbtask )
           (
            SELECT task.prid, task.prprojectid, task.prwbssequence, task.prwbslevel, task.prwbslevel, task.prwbssequence, task.wbs_parseq, task.wbs_nnbseq
                   , PARENTTASK.PRID, NNBTASK.PRID
              FROM PRTASK TASK
                   LEFT OUTER JOIN PRTASK PARENTTASK ON PARENTTASK.PRWBSSEQUENCE = TASK.WBS_PARSEQ AND PARENTTASK.PRPROJECTID = TASK.PRPROJECTID
                   LEFT OUTER JOIN PRTASK NNBTASK ON NNBTASK.PRWBSSEQUENCE = TASK.WBS_NNBSEQ AND NNBTASK.PRPROJECTID = TASK.PRPROJECTID
             WHERE TASK.PRPROJECTID = ?
            )
        </text>
    <param name="projectId" type="int" direction="IN" expressionListDelimiter=","/>
    <param name="temporary" direction="IN" dynamicReplacement="@[email protected]" expressionListDelimiter=","/>
  </sql>
</statement>

Referenced by:
<?xml version="1.0" encoding="UTF-8"?>
<statementRef id="projmgr.wbsInsertProjectTemp_nested_0" inputSource="map" inputMapIndex="0" sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" defaultSliceSize="20" ignoreIfError="false" hideResultSets="false" xmlns="http://schemas.niku.com/2002/pmd"/>

Using input: 
{@[email protected]=TEMP_WBS_GLOBAL_SESSION, projectId=5034066}

Cause

There is task duplication.

In the example error above, run the SQL to and confirm there is duplication.

SELECT task.prid, task.prprojectid, task.prwbssequence, task.prwbslevel, task.prwbslevel, task.prwbssequence, task.wbs_parseq, task.wbs_nnbseq,
PARENTTASK.PRID, NNBTASK.PRID 
FROM PRTASK TASK
LEFT OUTER JOIN PRTASK PARENTTASK ON PARENTTASK.PRWBSSEQUENCE = TASK.WBS_PARSEQ AND PARENTTASK.PRPROJECTID = TASK.PRPROJECTID
LEFT OUTER JOIN PRTASK NNBTASK ON NNBTASK.PRWBSSEQUENCE = TASK.WBS_NNBSEQ AND NNBTASK.PRPROJECTID = TASK.PRPROJECTID
WHERE TASK.PRPROJECTID = 5034066
and task.prid=5128905

Resolution

The problem is with the particular project mentioned in the logs. 

Go to the project > tasks and configure the 'WBS Sort' column to show in ascending order.
Look for duplication of the WBS sort number and remove the duplication.

 

 

 

Attachments