Repository navigation
Issue with the listIntervals method in fogbugz API #8
Description
Activity
I believe that the
ixIntervalis actually an interval ID rather than a time.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.
@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)
I believe that the case entity will have an
hrsElapsedset on it that is the sum of the intervals plus the value ofhrsElapsedExtra.@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
@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 ?
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.
@craig-davis do you know where I can open a support ticket ?
I'm not - I believe you should start however with https://developers.fogbugz.com/.
The interval is the difference between dtStart and dtEnd.
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.