Targetprocess

The Targetprocess Developer Hub

Welcome to the Targetprocess developer hub. Here you'll find comprehensive guides and documentation to help you start working with Targetprocess as quickly as possible and support you if you get stuck. Let's jump right in!

Docs

Questions

Ask A Question
2
ANSWERED

Querying and updating Assignable substates

We are using SubEntityStates in our workflow that looks something like this (substates in brackets): Backlog -> Ready -> Development [In Dev -> Code Review -> Dev Done] -> Testing [...] -> Done [Accepted, LIVE, ...] I'm building internal integration that uses the targetprocess REST API v1 to (among other things) query and update entity states. I can already achieve these for the parent states, but I can't find the current substate of an Assignable in the API response and trying to update the EntityState to a substate returns with an error. For example, I have a UserStory that shows on the web interface to be in "In Dev" state, but the EntityState returned by the API is "Development" (the parent state). When I try to update EntityState to "Code Review" this is what I get: ``` POST /Assignable/60091 {"EntityState": {"Id": 2961}} { "Status": "BadRequest", "Message": "Invalid entity state 'Code Review' for UserStory.", "Type": "Presentational", "Details": { "Items": [ { "Type": "BrokenRule", "FieldPath": { "EntityKind": "UserStory", "Column": "EntityState" }, "Message": { "Token": "Invalid entity state '{entityStateName}' for {entityKind}.", "Data": { "entityStateName": "Code Review", "entityKind": "UserStory" }, "Value": "Invalid entity state 'Code Review' for UserStory." }, "Details": null, "Resolution": null } ] }, "ErrorId": "067dd05f-9adf-42db-94e6-d999bdd90cc0" } ``` Am I missing something or is this not supported by the current APIs?

Posted by László Bácsi about a month ago