How do I use the version one api to get project and sprint burndown charts? - api

I am trying to use the Version One api to get the project and sprint burndown charts.
I am reading this page but I am just getting confused.
Has anybody done something similar and have any tips for how to hit the api to get what I want?

The VersionOne api does not serve images or chart specific data. You can use the query language and the rest endpoint to produce the data that is needed for a burndown. You would need to be able to read/parse the data and produce a graph yourself.
With that being said, a burndown graph compares how much closed estimate versus how much open estimate and graphs that over time. So you need to know three pieces of data: open estimate, closed estimate, and time. You'll also want to limit it to a certain project (and it'd children).
This should get you close to the data you need for a project burndown:
http://<host>/VersionOne/rest-1.v1/Data/Timebox?where=Schedule.ScheduledScopes='Scope:1055'&sel=Name,BeginDate,EndDate,Workitems:Story[AssetState!='Closed'].Estimate.#Sum,Workitems:Story[AssetState='Closed'].Estimate.#Sum&sort=+EndDate
Be sure to change Scope:1055 to the project oid that you're interested in.
This is how I got there. First I was thinking "well you need to sum up a bunch of story estimates" so I thought I'd do a historical query of stories:
http://<host>/VersionOne.Web/rest-1.v1/Hist/Story?where=Scope.ParentMeAndUp='Scope:1055'
But quickly found that you cannot aggregate on your root. What that means is if I want to sum up estimate, I need to use something else like Project (scope) to get at the data:
http://<host>/VersionOne.Web/rest-1.v1/Hist/Scope/1055?sel=Workitems:Story[AssetState!='Closed'].Estimate.#Sum,Workitems:Story[AssetState='Closed'].Estimate.#Sum,ChangeDate
The problem with this query is is gives you what the closed versus open estimate looked like at weird intervals; namely whenever the project changed. So it wouldn't make a very nice looking graph.
But as you know VersionOne has a concept of Iterations and Schedules that are associated to a project, and stories are associated to iterations. So I used that as a root to query for and aggregate story estimates, and limit the data to projects that use that schedule.
The data that is produced is more regular (grouped by iteration) and contains correctly aggregated estimate data.
So what is left? You'll have to aggregate the aggregation of estimate data to get a total estimate number for your project. Then you'll need to produce a graph (maybe bar or line) where each data point is at the end of an iteration. You'll keep a running total of closed estimate and add that to the iteration's total to produce the data point.

You need to do multiple queries to produce a burndown. First find the date range for the burndown:
/Data/Timebox?sel=BeginDate,EndDate&where=Name='X'
Now for every day the date range, sum up the ToDo hours as of that point in history:
/Hist/Timebox?asof=2013-08-09T23:59:59&where=Name='X'&sel=Workitems[Team.Name='Y';AssetState!='Dead'].ToDo.#Sum
The API and documentation are excellent. If you are interested in seeing the code for some custom reports, check out https://github.com/timothypratley/vone/blob/master/src/vone/models/queries.clj (the code is in Clojure). There is a burndown, cumulative flow, and more :)

There is now a "recipe" to query for burndown data that works with the query.v1 API endpoint.

Related

Is there a way to access raw data stored in Youtrack?

In Youtrack reports, you can view the issues by two fields using creation date as y-axis and any other field as x-axis. But when you do that like in this graph you view number of issues that are currently in the state stated in x-axis. For example, if the x-axis is the state, then you will see the current states of the issues that are created in the date intervals of the y-axis. But I also want to see the number of issues in each state in a chronological way. I want to see the states (or some other field) of the issues in May 21, 2021 (not their current states but their states in May 21).
I know that Youtrack keeps the state changes and their dates and many other data like that because in different reports, I can see that the Youtrack uses past data but usually there is no way to download the data of those reports.
I want to access all those raw data. My plan is to create some reports that are not available in Youtrack Reports, using R or Python. Is there a way to access those raw data, or a guideline to access them?
The way to access raw data in YouTrack is through the REST API. For example, you can get the issue's activity data to retrieve the history of changes applied to the issue. This way you can identify how things have changed chronologically.
I can see that the Youtrack uses past data but usually there is no way to download the data of those reports.
Report's data can be accessed via API as well. The report's API endpoint is api/reports, however, it's not documented as it may be subject to change. In this case, we can't guarantee backward compatibility. If you are fine with it, you can still use it. To see the exact request, check the network requests in the browser when loading a report.

Is there a way to force Open Refine to extract all history changes into JSON

I was using Open Refine for a couple of days and noticed that I am allowed only to extract the last operations, probably only the ones made in the last execution of the project. The previous operations are in grey and won't let me select them. Is there any way to get the JSON associated with that operations?

Podio Calculation field issue

We have an issue with a calculation field not always working. (We have about 5 calculation fields that are similar so same applies to all).
See in the attached example.
The Textbook item has a calc field 'Set Text'. One of the values in there is showing 'Null'.
Most of the time this works fine but in about 8% of the cases it has this null error.
See the other screenshot of the Aggregator item. The field that is being referenced there is correct.
To fix it we have to manually remove the relationship between the two items and then put it back again, to force the calculation to recalculate. This fixes the issue. So the problem does not seem to be the formula but rather the calculation being performed incorrectly.
The Aggregator items are created and joined to the Textbook item through the API.
This is a big issue for us as we use this value to post to our website so the manual fix is not a practical solution.
Podio support please advice what the issue is here
Aggregator
Null error
Without knowing too many details about your specific workflow and structure, let me offer some ideas:
Podio calculation fields can begin to act in strange ways if the original field is being referenced by calculation fields too many levels deep. What I mean by this is that if the original field that shows the Paper Code (or whatever that int showing null is) is being referenced through too many calculation fields, it can begin to cause problems in cases of updating and adding new items. This is most definitely a bug I've encountered with large-scale systems, but there are workarounds.
First off, I see that you have all of the pertinent non-concatenated fields at the bottom of your Aggregator app. Try manually concatenating those fields in the Textbooks app (where you're doing the result.push) instead of referencing the Web course text calc field exclusively.
If that doesn't work and you're proficient with the API, a longer workaround could be that after the automation runs, you wait a sufficient time (say 30 seconds) until the calculation field updates, have the API check for the text "null" in the calculation field, and refreshes the relationship fields if null is found.

Pulling Burndown Charts From Visual Studio Online API

I'm trying to pull burndown charts for sprints from VSO to display alongside other project data. I'd assume that there is no way to pull an actual image or URL to the burndown, although that would be ideal. If this is not possible, is there some way to pull values that I could use to re-create a chart? I've been digging through the API for a few days with no luck so far.
So basically, I need to pull SOMETHING from VSO that will allow me to display the burndown for the current sprint of a project, in some way.
This is a pretty late answer, but it is possible as of now to get the image of burndown chart directly from Azure DevOps using Chartimages - Get Iteration Chart Image API:
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/work/iterations/{iterationId}/chartimages/{name}?width={width}&height={height}&showDetails={showDetails}&title={title}&api-version=5.1-preview.1
For burndown chart, {name} = Burndown.
Reference:
https://learn.microsoft.com/en-us/rest/api/azure/devops/work/chartimages/get%20iteration%20chart%20image?view=azure-devops-rest-5.1
The data for the burn down is calculated by using a standard query with an 'as of' Param.
The as of param is only available in the API and returns the results as it would have on that date. If you count the work within the scope that you want for each day you will have the data.
I would recommend caching the results.

How to access results of Sonar metrics for use with applications like PowerPivot

I'm trying to run a number of applications with known failure rates through Sonar, with hopes of deciding which metrics are most valuable in determining whether a particular application will fail. Ultimately I'll be making some sort of algorithm that will look at the outputs of whatever metrics I'm using and generate a score from 1 - 100. I've got about 21 applications put through Sonar, and the results have been stored in a MySQL database. I originally planned to use PowerPivot to find relationships in the data, but it seems like the formatting of the tables doesn't lend itself well to that. Other questions on stackoverflow have told me that Sonar's tables are unformatted, and I should instead use the Web Service API to get the information. I'm unfamiliar with API and was unsuccessful in trying to do what I wanted by looking at Sonar's documentation for API.
From an answer to another question:
http://nemo.sonarsource.org/api/timemachine?resource=org.apache.cxf:cxf&format=csv&metrics=ncloc,violations_density,comment_lines_density,public_documented_api_density,duplicated_lines_density,blocker_violations,critical_violations,major_violations,minor_violations
This looks very similar to what I'd like to have, except I'm only looking at each application once (I'm analyzing a sample of all the live applications on a grid), which means Timemachine isn't really what I'm looking for. Would it be possible to generate a similar table, except instead of the stats for a particular application per date, it showed the statistics for an application and all of its classes, etc?
If you're not familiar with the WS API, you can also create your own Sonar plugin to achieve whatever you want: it is written in Java and it will execute on every analysis you run. This way, in the code ot this custom plugin, you can do whatever you want: flush the metrics you need in an output file, push them into a third party system, ... etc.
Just take a look on how to write a plugin (most probably you will create a Decorator). You have concrete examples also to get started faster.