XOG error when updating the username with ‘oldusername’ tag in the XOG XML
search cancel

XOG error when updating the username with ‘oldusername’ tag in the XOG XML

book

Article ID: 135309

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

It is possible to create a User/Resource in clarity, whose name ("User Name" field) contains the apostrophe character.

Example: ShaqO'Neal


It is also possible to modify that User Name via the UI.

Administration => Organization and Access => Resources

Click on the User's Last Name

Resource: Saq O'Neal- Properties


Modify the "User Name". Save it and it saves successfully.


However, it is not possible to modify such a user name via XOG. The old_user_name tab in the XOG xml file does not accept the apostrophe character.



STEPS TO REPRODUCE


1. Create a User in CA PPM whose User Name contains an apostrophe char. For instance, SaqO'Neal


2. XOG out(read) this user


<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">

    <Header version="6.0.11" action="read" objectType="user" externalSource="NIKU"/>

    <Query>

        <Filter name="userName" criteria="EQUALS">SaqO'Neal</Filter>   

    </Query>

</NikuDataBus>


3. Modify the XOG xml file in order to update the user's userName.

The oldUserName holds the previous configured "User Name", including the apostrophe character.


<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd">

  <Header action="write" externalSource="NIKU" objectType="user" version="15.6.0.320"/>

  <Users>

    <User externalId=" " isLDAP="false" oldUserName="SaqO'Neal" uiThemeDefaultPartitionCode=" " userLanguage="English" userLocale="en_US" userName="saq_oneil" userStatus="ACTIVE" userTimezone="America/Chicago" userType="INTERNAL" userUid="saq_oneil">

      <PersonalInformation emailAddress="@" firstName="Saq" lastName="O'Neal"/>

      <Resource resourceId="saq_oneil"/>

      <BusinessObjects/>

      <Company/>

      <General addedBy="admin" addedDate="2019-05-13"/>

      <OBSAssocs complete="false"/>

      <Groups>

       ...

      </Groups>

      <GlobalRights/>

      <InstanceRights>

        ...

      <InstanceOBSRights/>

    </User>

  </Users>

</NikuDataBus>


4. Xog back in (write) the XML file to update the user's userName.


Expected Results: The XOG write to work correctly and update the userName.

Actual Results: XOG fails with parsing error

...

This record has not been inserted

com.niku.xql2.eval.ParseException: Encountered "saq" at line 1, column 36.

Was expecting one of:

")" ...

"," ...

"?" ...

"+" ...

"-" ...

"*" ...

"/" ...

"=" ...

"!=" ...

"<>" ...

">" ...

">=" ...

"<" ...

"<=" ...

"or" ...

"and" ...

"not" ...

"is" ...

"like" ...


at com.niku.xql2.eval.XQLEvaluator.generateParseException(XQLEvaluator.

...


Environment

Release:


Component:

Cause

This has been investigated by SE as Defect DE49164

Resolution

The Defect DE49164 is resolved in 15.7.0