restchange-management

Is it possible to change/modify properties of a CR using OSLC_CM?


Is it possible to modify a property of a change request by using the OSLC-CM REST API of a change management system. The system that I'm trying to achieve that is Rational Change. I can browse and query via the REST API, but to modify anything I need to resort to command line which is rather slow. Is there a way?

BR, Pawel


Solution

  • So I've finally got it working with some help from googlegroups

    To recap what I've done so that someone else might benefit too (I really have searched for it and the IBM documentation is as in most of the cases not helping):

    So to modify PR/CR' implement_actual_effort attribute on the Rational Change server the following procedure was successful (using Firefox REST plugin): 1. In Headers set: Accept to application/xml, Content-Type to application/xml

    1. Put the oslc address of the cr i URL in my case it was: http://[IP:PORT]/change/oslc/db/[DB hex ID]/role/User/cr/[web_encoded_name_of_the_CR]?oslc_cm.properties=change:implement_actual_effort (note in browser http://[IP:PORT]/change/oslc/db/[DB hex ID]/role/User/cr/[web_encoded_name_of_the_CR] will open change page of the CR/PR)
    2. In REST client set Method to GET and press SEND
    3. Click on the Response Body (RAW), copy xml Body
    4. Change Method to PUT, change the value of the attribute (in the xml in Body window)
    5. Press SEND
    6. Attribute should have been changed right now, and the response should be similiar to what you've sent, with the attribute showing the change.

    Note that to change an attribute (called property from oslc point of view) one has to provide ?oslc_cm.properties=[properties delimited with comma] and in the request body xml the same properties have to be present, if I remember correctly if the property isn't mentioned in the xml it will be set to default

    I hope this helps someone

    BR,

    Pawel