query.v1 get story with tasks?

123 views
Skip to first unread message

Geoff Hudik

unread,
Sep 30, 2014, 5:59:25 PM9/30/14
to version...@googlegroups.com

What's the YAML syntax for getting a story with it's child tasks? I don't quite see an example for that. Based on http://stackoverflow.com/questions/18389234/versionone-report-on-backlog-items-tasks-defects-with-attachments-in-c-sharp I tried the below but I get a 500 error. The query works with children clause removed.

from: Story
where:
  Number: {{number}}
select:
  - Category.Name
  - ChangedBy.Name	
  - ChangeDate
  - CreateDate
  - CreatedBy.Name
  - Customer.Name
  - Description
  - Estimate
  - Name
  - Number
  - OriginalEstimate
  - Priority.Name
  - Owners.Name
  - Risk.Name
  - Source.Name
  - Status.Name
  - Super.Name
  - Timebox.Name
  - ToDo
  - from: Children:Task
  select:
    - Description
    - Name
    - Number



Geoff Hudik

unread,
Sep 30, 2014, 7:19:19 PM9/30/14
to version...@googlegroups.com
I did get task coming back using multiple queries in one request as below ("{{number}}" gets replaced at runtime). That could get me by but ideally it'd be nested to avoid having to glue them together afterwards.

from: Story
where:
  Number: {{number}}
select:
  - Category.Name
  - ChangedBy.Name
  - ChangeDate
  - CreateDate
  - CreatedBy.Name
  - Customer.Name
  - Description
  - Estimate
  - Name
  - Number
  - OriginalEstimate
  - Priority.Name
  - Owners.Name
  - Risk.Name
  - Source.Name
  - Status.Name
  - Super.Name
  - Timebox.Name
  - ToDo

---

from: Task
where:
  Parent.Number: {{number}}
select:
  - Description
  - Name
  - Number

Acey Bunch

unread,
Oct 1, 2014, 7:09:06 AM10/1/14
to version...@googlegroups.com

Your first query was close, you just need to fix the indentation. Indentation in YAML matters, and it can be a bit tricky.

 

Try this:

 

from: Story

where:

  Number: {asset number}

Note that the select for Tasks is indented.

--
You received this message because you are subscribed to the Google Groups "VersionOne-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to versionone-de...@googlegroups.com.
To post to this group, send email to version...@googlegroups.com.
Visit this group at http://groups.google.com/group/versionone-dev.
For more options, visit https://groups.google.com/d/optout.

Geoff

unread,
Oct 1, 2014, 11:57:00 AM10/1/14
to version...@googlegroups.com
Thanks, that did it. It'd be really helpful if there was a way to view the error that happened. Syntax error vs "field X is invalid" vs other errors are hard to troubleshoot when you have no context on the problem.

--
You received this message because you are subscribed to a topic in the Google Groups "VersionOne-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/versionone-dev/CnqmJOEnoE8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to versionone-de...@googlegroups.com.

To post to this group, send email to version...@googlegroups.com.
Visit this group at http://groups.google.com/group/versionone-dev.
For more options, visit https://groups.google.com/d/optout.



--
Geoff
Reply all
Reply to author
Forward
0 new messages