Rally Software

 View Only
  • 1.  How to Iterate Over Artifacts

    Posted Sep 12, 2017 05:59 PM

    I wanted to query all defects and stories that were blocked between a given time range.  


    Seeing that User Stories (AKA Hierarchical Requirements) and Defects are both descended from the proto-type Artifact, I had hoped I could query against Artifacts and get objects of either type that met the criteria.  Both Defects and User Stories have an Iteration field.  I hoped to ask for all Artifacts contained in particular Iteration.



    The query:

    (Iteration.Name = "Sprint 2 - Blocked Work Duration Summaries")

    ... works fine for both Defects and User Stories, but when I try to query at the Artifact level, I get this error:

    Could not read: could not read all instances of class com.f4tech.slm.domain.Artifact for class Artifact

    Can some wise soul propose a better approach to this?  I can imagine some tedious, messy approaches, but would love to learn if there is a well known idiomatic way of tackling this.


    Thanks, in advance, if you have some wisdom to share.



  • 2.  Re: How to Iterate Over Artifacts
    Best Answer

    Posted Sep 13, 2017 06:21 PM

    Hi Michael,


    Both Defect and HierarchicalRequirement inherit from SchedulableArtifact before Artifact and that is where the Iteration attribute is first introduced. So your query will work if run for SchedulableArtifact.


    Let me know if that helps.


    Sean Davis

  • 3.  Re: How to Iterate Over Artifacts

    Posted Sep 13, 2017 10:00 PM

    Awesome, Sean.  Thanks.  Didn't see that object in the pictorial model, but do when I manually walk the inheritance link chain upwards in the web services API docs.   Much appreciated.