Need to view older updates too as it works in journal updates

Hi,

I have created  a field where HPOO is passing its journal updates in that text field in CM module. This integration is through Webservices SOAP. Now the issue is current update is visible but the older entries are overwritten with the new entries.

Please guide me how can i have both the new and old endtries visible to the user.

Appreciate your guidance. Its somewhat urgent.

  • @prath,

    I just tried following SOAP request by curl, it will append the updates instead of replace:

    curl -XPOST -H "Content-Type: text/xml;charset=UTF-8" -H "SOAPAction: "Update"" -H "Authorization: Basic ZmFsY29uOjE=" -d "<soapenv:Envelope xmlns:soapenv='schemas.xmlsoap.org/.../' xmlns:ns='schemas.hp.com/.../7'>    <soapenv:Header/>    <soapenv:Body>       <ns:UpdateIncidentRequest attachmentInfo='false' attachmentData='false' ignoreEmptyElements='true'>          <ns:model>             <ns:keys>   		<ns:IncidentID>IM10002</ns:IncidentID> 	   </ns:keys>             <ns:instance>              <Urgency type='String'>2</Urgency> 	      <ns:JournalUpdates>   		  <ns:JournalUpdates>Another update to the activity log, but    reassigning back to the raising group</ns:JournalUpdates>                </ns:JournalUpdates> 	    </ns:instance>          </ns:model>       </ns:UpdateIncidentRequest>    </soapenv:Body> </soapenv:Envelope>" "">http://localhost:13951/SM/7/"

    You may check the difference compare to your request.

    Let me know if it helps,

    Ling-Yan

     

     

  • Hi Ling,

     

    Thankyou for the reply, but I need to see if this works in Change Mnagement. I am aware that Journal Update is in IM and we do not have Journal update in CM.

    Hence i introduced a new text field where HPOO cn opulate their journal updates into the field, But as below mentioned the updates get overwirtten with new updates and the old ones are not visible any more.

    I need both the previous and new entries .

  • Then you need to check how the Journal Update works in Incident module. 

    Genernally, you have to have code in the webservice configuration for Change, and include expressions like below:

    which stores the updates in the temp and copy back and combine old and new.

    Ling-Yan

  • Consider playing around with the "Expressions" on the ExtAccess record for Change Management. These expressions are execute before the incoming record is parsed to the view engine, so you might be able to merge the data from the incoming record with the target record - or at least combine the two into another field.

  • Hello Ling and Josh,

    Thanks for the reply,

    I tried writing the code similair to IM under expression tab but i am unable to figure it out for what i need to write for

    1. $G.pm.global.environment

    2.$pmc.details

    3.journal.pm 

     


    IM-Webservice
    cleanup($apm.activity);cleanup($pmc.actions);if same(update.action in $L.file, update.action in $L.file.save) then ($L.need.to.update=true)
    if journal.pm in $G.pm.global.environment then (journal.pm.order in $G.pm.global.environment=nullsub(journal.pm.order in $G.pm.global.environment, 1);$pmc.details=nullsub(action in $L.file.save, {}) {"*** Past Updates ***"} nullsub(update.action in $L.file.save, {});$pmc.actions=nullsub(update.action in $L.file)) else ($pmc.details=nullsub(action in $L.file.save, {""});$pmc.actions=nullsub(update.action in $L.file, {""}))
    if ($pmc.details={}) then ($pmc.details={""});if ($pmc.actions={}) then ($pmc.actions={"no update provided"})
    update.action in $L.file=update.action in $L.file.save
    if (status in $L.file.save~="closed" and status in $L.file.save~="resolved") then ($apm.activity="external update")
    if ($L.need.to.update=true) then ($pmc.actions=NULL)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    CM-webservice
    cleanup($cm.activity);cleanup($cm.update);if same(X.journal in $L.file, X.journal in $L.file.save) then ($L.need.to.update=true)
    if journal.pm in $G.pm.global.environment then (journal.pm.order in $G.pm.global.environment=nullsub(journal.pm.order in $G.pm.global.environment, 1);$pmc.details=nullsub(action in $L.file.save, {}) {"*** Past Updates ***"} nullsub(X.journal in $L.file.save, {});$cm.update=nullsub(X.journal in$L.file)) else ($pmc.details=nullsub(action in $L.file.save, {""})$cm.update=nullsub(X.journal in $L.file, {""}))
    if ($pmc.details={}) then ($pmc.details={""});if ($cm.update={}) then ($cm.update={"no update provided"})
    X.journal in $L.file=X.journal in $L.file.save
    if (status in $L.file.save~="closed" and status in $L.file.save~="resolved") then ($cm.activity="external update")
    if ($L.need.to.update=true) then ($cm.update=NULL)
    ---------------------------------------------------------------------------------------------------------

     

    if you can help/advise me with the correct code.

    Thanks,

    Somali Dutta

     

  • Can anyone provide me with some input on the above issue. This is quiet urgent for me to have the journal update working in CM as it works in IM module.

     

    Thanks,

    Somali Dutta