简体   繁体   中英

HP ALM REST API Java - How to handle UserLists or any other type of List except LookUp?

I'm trying to update existing defects using REST in HP ALM. Updating LookUpLists is easy, and i succeded in doing so. But there are UserLists type lists, which i can't update in the same way i update lookuplists, it always returns internal server error, so there must be a different way to handle them. Did anyone manage to handle updating userlists with rest?If so, can you please help me?

Just checked with UserLists for defect entity on ALM 12.20. I used the the field 'assigned to' on ALM client.In the REST uses another name of this field - 'owner'.

I performed the next REST API call:

Method: PUT

URL: http://{your_domain}/qcbin/rest/domains/{your_domain}/projects/{your_proj}/defects/{your_defect_id}

Header: Content-Type=application/xml

Body:

<Entity Type="defect">
<Fields>
<Field Name="owner">
<Value>kevin</Value>
</Field>
</Fields>
</Entity>

And I could get this response:

<Entity Type="defect">
<ChildrenCount>
<Value>0</Value>
</ChildrenCount>
<Fields>
<Field Name="owner">
<Value>kevin</Value>
</Field>
......
</Fields>
<RelatedEntities/>
</Entity>

So just check again all what you request to ALM server attentively. By the way, check that you have appropriate permissions to change values for concrete UserLists fields which you're going to do.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM