Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with the listIntervals method in fogbugz API #8

Open
mase857 opened this issue Jan 14, 2015 · 10 comments
Open

Issue with the listIntervals method in fogbugz API #8

mase857 opened this issue Jan 14, 2015 · 10 comments

Comments

@mase857
Copy link

mase857 commented Jan 14, 2015

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>
@craig-davis
Copy link
Contributor

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

@mase857
Copy link
Author

mase857 commented Jan 14, 2015

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.

@mase857
Copy link
Author

mase857 commented Jan 14, 2015

@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)

@craig-davis
Copy link
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.

@mase857
Copy link
Author

mase857 commented Jan 14, 2015

@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

@mase857
Copy link
Author

mase857 commented Jan 14, 2015

@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 ?

@craig-davis
Copy link
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.

@mase857
Copy link
Author

mase857 commented Jan 15, 2015

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

@craig-davis
Copy link
Contributor

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

@BarakPokerCraftWW
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants