1

I am trying to get all defects and stories that are associated with a request in VersionOne. I am able to get a request which has a DEFECT associated with it.,in the following manner:

https:///Data/Request?sel=Request.ID.Number,Request.Status.Name,PrimaryWorkitems:Defect.ID.Number&where=ChangeDateUTC>='10-8-2014';Request.Source.Name="External";Request.Status.Name="Completed";Request.Status.Name!="Approved";Request.Status.Name!="";Request.Status.Name!="Reviewed";Request.Status.Name!="Accepted";Request.Category.Name="Defect";PrimaryWorkitems:Defect.Status.Name!="Accepted"

Now,I only change the Category to "Story",and I get a blank response. Not sure whether the Request.Category.Name ="Story" is correct or not. Here is the REST call I am making:

https://www11.v1host.com/VentyxSandbox4/rest-1.oauth.v1/Data/Request?sel=Request.ID.Number,Request.Status.Name,PrimaryWorkitems:Story.ID.Number,PrimaryWorkitems:Story.Name&where=ChangeDateUTC>='10-8-2014';Request.Source.Name="External";Request.Status.Name="Completed";Request.Status.Name!="Approved";Request.Status.Name!="";Request.Status.Name!="Reviewed";Request.Status.Name!="Accepted";Request.Category.Name="Enhancement";PrimaryWorkitems:Story.Status.Name!="Accepted"

Any help would be appreciated.

Thanks.

ApJo
  • 157
  • 1
  • 2
  • 9
  • never mind guys.got it! I jst queried directly on the story.Here is what the query will look like https:///Data/Story?sel=Requests.ID.Number,Requests.Owner,Requests.Owner.NotifyViaEmail,Requests.Owner.Email&where=Requests[ChangeDateUTC%3E=%2710-8-2014%27;Source.Name=%22External%22;Status.Name=%22Completed%22];Status.Name!=%22Accepted%22 thank you . – ApJo Oct 10 '14 at 19:39

1 Answers1

3

Glad you found the answer that works for you.

To provide an alternative, here's how you can do this using YAML with the query.v1 endpoint:

from: Request
select:
  - Name
  - Number
  - Status.Name
  - from: PrimaryWorkitems
    select:
      - AssetType
      - Name

I left off the where clause, but this shows how you can use YAML syntax to shape the query with nested selects, effectively getting all Defects and Stories associated with Requests.

acey.bunch
  • 355
  • 1
  • 5