Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to update user story in Rally via Java API

Tags:

java

rally

I have an user story in Rally which has a feature set as parent. I want to update the parent artifact via Java API to another user story. However I am getting a validation error while doing so i.e.

Validation error: HierarchicalRequirement.parentArtifact should not be set if HierarchicalRequirement.Parent is set and vice versa

I added following property to include in the UpdateRequest:

JsonObject obj = new JsonObject();
jsonObject.addProperty("Parent", "<Parent User story ref>");
UpdateRequest updateRequest = new UpdateRequest("<Child User story ref>", obj);
UpdateResponse updateResponse = rallyApi.update(updateRequest); 

How to override this validation, can anyone please help?

like image 897
Saikat Avatar asked Nov 08 '22 04:11

Saikat


1 Answers

A user story cannot have both a portfolio item parent and a story parent at the same time. Just set the PortfolioItem field to null and you should be good to go. You'll also probably want to make sure the PortfolioItem field on that new parent story is set correctly so your rollups still work as expected.

jsonObject.addProperty("PortfolioItem", null);
like image 151
Kyle Morse Avatar answered Nov 15 '22 11:11

Kyle Morse