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?
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With