Skip to content

Issue with the listIntervals method in fogbugz API #8

Description

@mase857

So I have been using the fogbugz API to call methods to retrieve data and everything works fine , except that there's something that I do not understand, When I see what is contained in the XML file, I have this time of format for listintervals for a particular user , the ixinterval tag contains a very big number like the first one has 5430 and I was expecting it to be hours , like 2 or 2.5, etc .. Can someone explain what that interval number means because on the fogbugz API documentation , the numbers are much smaller and represent hours and I'm pretty sure I didn't work that many hours on these projects. .. I'd really appreciate your help in this.

<interval>
<ixInterval>5430</ixInterval>
<ixPerson>96</ixPerson>
<ixBug>12250</ixBug>
<dtStart>2014-12-31T18:00:00Z</dtStart>
<dtEnd>2014-12-31T23:00:00Z</dtEnd>
<fDeleted>false</fDeleted>
<sTitle>
<![CDATA[
 err page when login to facebook account from upload photo
]]>
</sTitle>
</interval>
<interval>
<ixInterval>5462</ixInterval>
<ixPerson>96</ixPerson>
<ixBug>12479</ixBug>
<dtStart>2015-01-02T18:00:00Z</dtStart>
<dtEnd>2015-01-02T21:14:00Z</dtEnd>
<fDeleted>false</fDeleted>
<sTitle>
<![CDATA[
 Cannot See the Front of an Easel in My Orders
]]>
</sTitle>
</interval>

Activity

  1. craig-davis commented on Jan 14, 2015

    @craig-davis
    Contributor

    I believe that the ixInterval is actually an interval ID rather than a time.

  2. mase857 commented on Jan 14, 2015

    @mase857
    Author

    then how can I get the time .. the hours spent working on ixbug ? in the API documentation, it seems to be the time ... take a look http://help.fogcreek.com/8202/xml-api#Time_Tracking ... The api says that this method returns the time interval .. when you look at the samply provided in the API , you will understand what I mean .. thanks a lot for taking the time to help.

  3. mase857 commented on Jan 14, 2015

    @mase857
    Author

    @craig-davis You may actually be right ... it is an interval id, but see , I am getting this after using the method listIntervals , which the API states that it should return all TimeIntervals for a user. How could I get the time spent on bug 12479 ( this is a sample from the xml sample data returned by the API)

  4. craig-davis commented on Jan 14, 2015

    @craig-davis
    Contributor

    I believe that the case entity will have an hrsElapsed set on it that is the sum of the intervals plus the value of hrsElapsedExtra.

  5. mase857 commented on Jan 14, 2015

    @mase857
    Author

    @craig-davis Thanks for your response. So what method in the xml documentation are you referring to when you talk about the case entity ? I would like to pass in the ixbug for example as shown in the same xml data above so I can get the hrsElapsed, etc ... just like shown below

    <cases count="1"> -- count is included in the cases attribute
      <case ixBug="123" operations="edit,assign,resolve,reactivate,close,reopen,reply,forward,email,move,spam,remind">
        -- note: currently move, spam, and remind are not supported actions. Older version of the API which call the deprecated cmd=list (instead of cmd=search&q=) will not see reply, forward, or email operations in the case listing
      <ixBug>123</ixBug> -- case number
        <ixBugParent>234</ixBugParent> -- parent case number
        <ixBugChildren>456,876</ixBugChildren> -- subcase numbers
        <tags> -- tags
          <tag><![CDATA[first]]></tag>
          <tag><![CDATA[second]]></tag>
          <tag><![CDATA[third]]></tag>
        </tags>
        <fOpen>true</fOpen> -- true if open, false if closed
        <sTitle>Duck, Duck... but No Goose!</sTitle> -- title
        <sOriginalTitle>Problem finding the goose...</sTitle> -- original title for a case opened by an incoming email or a public case submission
        <sLatestTextSummary>I searched the docs, but no goose!</sLatestTextSummary> -- short string with case's latest comment
        <ixBugEventLatestText>1151</ixBugEventLatestText> -- ixBugEvent for latest event with actual text comment
        <ixProject>22</ixProject> -- project id
        <sProject>The Farm</sProject> -- project name
        <ixArea>35</ixArea> -- area id
        <sArea>Pond</sArea> -- area name
        <ixGroup>6</ixGroup> -- group id (deprecated as of FogBugz 8--will always return 0)
        <ixPersonAssignedTo>1</ixPersonAssignedTo> -- person case is assigned to (id)
        <sPersonAssignedTo>Old MacDonald</sPersonAssignedTo> -- person case is assigned to (name)
        <sEmailAssignedTo>grandpa@oldmacdonald.com</sEmailAssignedTo> -- email of person case is assigned to
        <ixPersonOpenedBy>2</ixPersonOpenedBy> -- person case was opened by (id)
        <ixPersonResolvedBy>2</ixPersonResolvedBy> -- person case was resolved by (id)
        <ixPersonClosedBy></ixPersonClosedBy> -- person case was closed by (id)
        <ixPersonLastEditedBy>0</ixPersonLastEditedBy> -- person case was last edited by (id)
        <ixStatus>2</ixStatus> -- status (id)
        <ixBugDuplicates>321</ixBugDuplicates> -- cases that are closed as duplicates of this one (id)
        <ixBugOriginal>654</ixBugOriginal> -- the case which this one was a duplicate of (id)
        <sStatus>Geschlossen (Fixed)</sStatus> -- status (name)
        <ixPriority>3</ixPriority> -- priority (id)
        <sPriority>Must Fix</sPriority> -- priority (name)
        <ixFixFor>3</ixFixFor> -- fixfor (id)
        <sFixFor>Test</sFixFor> -- fixfor (name)
        <dtFixFor>2007-05-06T22:47:59Z</dtFixFor> -- date of fixfor (date)
        <sVersion></sVersion> -- version field (custom field #1)
        <sComputer></sComputer> -- computer field (custom field #2)
        <hrsOrigEst>0</hrsOrigEst> -- hours of original estimate (0 if no estimate)
        <hrsCurrEst>0</hrsCurrEst> -- hours of current estimate
        <hrsElapsed>0</hrsElapsed> -- total elapsed hours -- includes all time from time intervals PLUS hrsElapsedExtra
  6. mase857 commented on Jan 14, 2015

    @mase857
    Author

    @craig-davis i ACTUALLY figured it out by doing this

    cmd=search&q=12999&cols=sPersonAssignedTo,sEmailAssignedTo,ixPersonResolvedBy,sVersion,hrsOrigEst,hrsCurrEst,hrsElapsed,ixBug&token=' . $this->_token;

    how can I get the list of custom fields that we added to fogbugz ?

  7. craig-davis commented on Jan 15, 2015

    @craig-davis
    Contributor

    I don't have a good answer for that. That might be a good one to ask their developer support people.

    Fwiw, if you're looking for some other examples, a fair bit of the API is exercised by the FogBugz CLI client.

  8. mase857 commented on Jan 15, 2015

    @mase857
    Author

    @craig-davis do you know where I can open a support ticket ?

  9. craig-davis commented on Jan 15, 2015

    @craig-davis
    Contributor

    I'm not - I believe you should start however with https://developers.fogbugz.com/.

  10. BarakPokerCraftWW commented on Apr 21, 2015

    @BarakPokerCraftWW

    The interval is the difference between dtStart and dtEnd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions