Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
@Sum doesn't seem to be correct via Rest API
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chad Peterson  
View profile  
 More options Jul 18 2012, 9:08 pm
From: Chad Peterson <chad.m.peter...@gmail.com>
Date: Wed, 18 Jul 2012 18:08:51 -0700 (PDT)
Local: Wed, Jul 18 2012 9:08 pm
Subject: @Sum doesn't seem to be correct via Rest API

Given this query:

rest-1.v1\Data\Story?sel=Children.ID,Children.Actuals.Value,Children:Task.@ Count,Children.Actuals.Val...@Sum.Value&where=Number='B-02833'


I received the following in response:

<Assets total="1" pageSize="2147483647" pageStart="0">
   <Asset href="/IST/rest-1.v1/Data/Story/13195" id="Story:13195">
      <Relation name="Children.ID">
         <Asset href="/IST/rest-1.v1/Data/Task/34505" idref="Task:34505"/>
         <Asset href="/IST/rest-1.v1/Data/Task/34506" idref="Task:34506"/>
         <Asset href="/IST/rest-1.v1/Data/Task/34507" idref="Task:34507"/>
      </Relation>
      <Attribute name="Children.Actuals.Value.@Sum">97.2</Attribute>
      <Attribute name="Children.Actuals.Value">
         <Value>1</Value>
         <Value>2</Value>
      </Attribute>
      <Attribute name="Children:Task.@Count">6</Attribute>
   </Asset>
</Assets>

Can someone explain why the values returned total to 3, but the .@Sum shows
97.2.

I imagine this hasw something to do with the task count of 6, but I simply
cannot find 6 tasks associated with this story.  Via V1 web, it should 3.
The listed IDs of all children seem to indicate only 3 items.

Where are the other 3?  Once I find them, I'm assuming they'll have values
that are being included by the @Sum calculation.

Thoughts?
-Chad


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ibuchanan  
View profile  
 More options Jul 25 2012, 8:53 am
From: ibuchanan <ian.bucha...@versionone.com>
Date: Wed, 25 Jul 2012 05:53:57 -0700 (PDT)
Local: Wed, Jul 25 2012 8:53 am
Subject: Re: @Sum doesn't seem to be correct via Rest API

Chad,

There is a subtle difference between the results of a simple multi-value
query and an aggregation (like @Sum). In the simple multi-value query,
there is an "auto-filter" applied that strips deleted and dead assets. The
same is not applied to aggregation. Therefore the discrepancy you noticed
is most likely caused by deleted tasks.

The following should adjust for this API quirk:
rest-1.v1\Data\Story?sel=Children.ID,Children.Actuals.Value,Children:Task[A ssetState!='Dead'].@Count,Children[AssetState!='Dead'].Actuals.Val...@Sum.Value&where=Number='B-02833'
Does that return what you expect?

Ian Buchanan
Product Manager for Platform and Integrations


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »