XOG allows for inserting duplicate unique_name in srm_resources

book

Article ID: 225747

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

XOG should not allow for inserting duplicate unique_name in srm_resources when updating in Oracle and Postgres. This is restricted in the UI and in REST therefore is not allowed there. 

Steps to Reproduce: 


1. Create a xog import file with the following contents

<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_role.xsd">
<Header action="write" externalSource="NIKU" objectType="role" version="15.9.3.740"/>
<Roles>
<Role active="true" availability="8" name="Administrative Assistant" resourceId="ADMIN" resourceType="LABOR"><General addedBy="admin" addedDate="20
21-08-09"/>
<OBSAssocs complete="false"/>
<OBSBookingManagerMappings/>
<SkillAssocs/>
<CustomInformation>
<ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
<ColumnValue name="boe_port_count">1</ColumnValue>
<ColumnValue name="obj_anonymize_pii">false</ColumnValue>
</CustomInformation>
</Role>
</Roles>
<XOGOutput>
<Object type="Roles"/>
<Records>
<Record>
<KeyInformation><column name="object_code">resource</column>
</KeyInformation>
</Record>
</Records>
</XOGOutput>
</NikuDataBus>

2. XOG in the file

3. Run the following query against the database (postgres version):

select * from srm_resources where unique_name ilike 'admin';
-- multiple rows are returned

Expected Results: XOG should not allow duplicate values for unique_name (resourceId) on the resource/role object. 

Actual Results:  XOG permits duplicate unique_name/resourceId values. 

Cause

DE62844  

Workaround: Use REST or validate the data. 

Environment

Release : 15.9.3

Component : CLARITY XML OPEN GATEWAY (XOG)

Resolution

Fixed in Release 16.0.0