Thank you for Dan for the useful information.
I have executed all above mentioned things, but no luck.
I like share "Release" details of both the Workspace/Environments/Subscriptions (DEV and Sandbox).
I have also shared complete code. Please look into this.
DEV - Environments/WorkSpace: Release info
{
"Release":
{"_rallyAPIMajor": "2",
"_rallyAPIMinor": "0",
"_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/release/65248042552",
"_refObjectUUID": "752d2dbe-6ab0-4c40-aaf9-607d7d479189",
"_objectVersion": "2",
"_refObjectName": "Q3 - TEST Release DFS 2016",
"CreationDate": "2016-09-26T12:00:36.621Z",
"_CreatedAt": "Sep 26, 2016",
"ObjectID": 65248042552,
"ObjectUUID": "752d2dbe-6ab0-4c40-aaf9-607d7d479189",
"VersionId": "2",
"Subscription": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/subscription/16838490087", "_refObjectUUID": "63a79a0d-bf44-4c86-b896-5555632b30e3", "_refObjectName": "Discover Financial Services- IL", "_type": "Subscription"},
"Workspace": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/workspace/51208342371", "_refObjectUUID": "a5d4ad80-1664-47ab-9469-916c0f6333ba", "_refObjectName": "DFS Development Workspace", "_type": "Workspace"},
"Accepted": null, "GrossEstimateConversionRatio": 1.0, "Name": "Q3 - TEST Release DFS 2016", "Notes": "", "PlanEstimate": null, "PlannedVelocity": null,
"Project": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/project/51409689721", "_refObjectUUID": "2973c98a-9bf8-49db-a2b4-ec5fb1de509c", "_refObjectName": "Team EPMO - Development", "_type": "Project"},
"ReleaseDate": "2016-10-06T04:59:59.000Z", "ReleaseStartDate": "2016-09-27T05:00:00.000Z",
"RevisionHistory": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/revisionhistory/65248042560", "_refObjectUUID": "8d0f2d4d-6c85-4653-8e8c-6782ec3f69ef", "_type": "RevisionHistory"},
"State": "Planning", "TaskActualTotal": null, "TaskEstimateTotal": null, "TaskRemainingTotal": null, "Theme": "", "Version": null, "Errors": [], "Warnings": []}
}
Sandbox- Environments/WorkSpace: Release info
{
"Release":
{"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/release/128790471648", "_refObjectUUID": "f72251c8-ba02-4d94-8ce7-3b0ec52a2a06", "_objectVersion": "1", "_refObjectName": "July R Test", "CreationDate": "2017-06-22T13:55:53.283Z", "_CreatedAt": "Jun 22, 2017", "ObjectID": 128790471648, "ObjectUUID": "f72251c8-ba02-4d94-8ce7-3b0ec52a2a06", "VersionId": "1",
"Subscription": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/subscription/16838490087", "_refObjectUUID": "63a79a0d-bf44-4c86-b896-5555632b30e3", "_refObjectName": "Discover Financial Services- IL", "_type": "Subscription"},
"Workspace": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/workspace/17108262889", "_refObjectUUID": "e0ee91d7-73bb-4e9a-81f1-d7c08ba62c25", "_refObjectName": "DFS Sandbox", "_type": "Workspace"},
"Accepted": 13.0, "GrossEstimateConversionRatio": 1.0, "Name": "July R Test", "Notes": "", "PlanEstimate": 13.0, "PlannedVelocity": 40.0,
"Project": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/project/112250541604", "_refObjectUUID": "30751a63-ddfc-4129-b2e7-16bdedc33305", "_refObjectName": "CDS Team", "_type": "Project"},
"ReleaseDate": "2017-08-01T04:59:59.000Z", "ReleaseStartDate": "2017-07-01T05:00:00.000Z",
"RevisionHistory": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/revisionhistory/128790471656", "_refObjectUUID": "69b4338f-104d-4e73-b0f5-6657066b37c8", "_type": "RevisionHistory"},
"State": "Planning", "TaskActualTotal": 0.0, "TaskEstimateTotal": 0.0, "TaskRemainingTotal": 0.0, "Theme": "", "Version": null, "Errors": [], "Warnings": []}
}
Code:
internal StringBuilder DisplayFeatureInformation(QueryResult portfolioItems, RallyRestApi restApi)
{
// Feature
string featureID = null;
string featureName = null;
string rallyProjectName = null;
string featureOwner = null;
string initiativeID = null;
string initiativeName = null;
string State = null;
int preliminaryEstimate = 0;
string investmentCategory = null;
int valueScore = 0;
int riskScore = 0;
decimal WSJFScore = 0;
int refinedEstimate = 0;
string releaseName = null;
string releaseStartDate = null;
string releaseEndDate = null;
string plannedStartDate = null;
string plannedEndDate = null;
string actualStartDate = null;
string actualEndDate = null;
string deploymentDate = null;
int userStoryCount = 0;
var sbFeature = new StringBuilder();
sbFeature.AppendFormat
("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16}, {17} , {18}"
, "FeatureID", "Feature Name", "Project Name"
, "Feature Owner", "initiativeID", "initiative Name", "State"
, "Priliminary Estimate ", "Investment Category"
, "Value Score", "Risk Score"
, "WSJF Score", "Refined Estimate"
// , "Release Name", "Release start Date", "Release End Date"
, "Planned Start Date", "Planned End Date"
, "Actual Start Date", "Actual End Date"
, "Deployment Date", "# of Stories"
);
sbFeature.AppendLine();
Console.Write("\n------------------------------------------------------------------------------");
foreach (var feature in portfolioItems.Results)
{
// Feature Details
featureID = feature["FormattedID"];
featureName = feature["_refObjectName"];
if (featureName.Contains(','))
{
featureName = featureName.Replace(',', ' ');
}
//Rally Team/Project Name
if (feature["Project"] != null)
{
rallyProjectName = feature["Project"]["_refObjectName"];
}
if (feature["Owner"] != null)
{
featureOwner = feature["Owner"]["_refObjectName"];
}
//Initiave
if (feature["Parent"] != null)
{
initiativeID = feature["Parent"]["FormattedID"];
initiativeName = feature["Parent"]["_refObjectName"];
if (initiativeName.Contains(','))
{
initiativeName = initiativeName.Replace(',', ' ');
}
}
if (feature["State"] != null)
{
State = feature["State"]["_refObjectName"];
}
//preliminaryEstimate
if (feature["PreliminaryEstimateValue"] != null)
{
preliminaryEstimate = feature["PreliminaryEstimateValue"];
}
//investmentCategory
if (feature["InvestmentCategory"] != null)
{
investmentCategory = feature["InvestmentCategory"];
}
//valueScore
valueScore = feature["ValueScore"];
riskScore = feature["RiskScore"];
WSJFScore = feature["WSJFScore"];
//refinedEstimate RefinedEstimate
refinedEstimate = feature["RefinedEstimate"];
// if (feature["ActualEndDate"] != null)
// {
//actualEndDate = feature["ActualEndDate"];
if (feature["Release"] != null)
{
releaseName = feature["Release"]["_refObjectName"];
if (releaseName.Contains(','))
{
//releaseName = releaseName.Replace(',', ' ');
}
Request request = new Request("release");
request.Query = new Query("ObjectID", Query.Operator.Equals, "65248042552");
// Make request and process results
QueryResult queryResult = restApi.Query(request);
foreach (var releaseData in queryResult.Results)
{
releaseEndDate = releaseData["ReleaseDate"];
releaseStartDate = releaseData["ReleaseStartDate"];
}
}
// }
if (feature["PlannedStartDate"] != null)
{
plannedStartDate = feature["PlannedStartDate"];
}
if (feature["PlannedEndDate"] != null)
{
plannedEndDate = feature["PlannedEndDate"];
}
if (feature["ActualStartDate"] != null)
{
actualStartDate = feature["ActualStartDate"];
}
//deploymentDate
if (feature["c_DeploymentDate"] != null)
{
deploymentDate = feature["c_DeploymentDate"];
}
//userStoryCount
if (feature["UserStories"]["Count"] != null)
{
userStoryCount = feature["UserStories"]["Count"];
}
sbFeature.AppendFormat
("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16}, {17} , {18}"
, featureID, featureName, rallyProjectName
, featureOwner, initiativeID, initiativeName, State
, preliminaryEstimate, investmentCategory
, valueScore, riskScore, WSJFScore, refinedEstimate
//, releaseName, releaseStartDate, releaseEndDate
, plannedStartDate, plannedEndDate, actualStartDate, actualEndDate
, deploymentDate, userStoryCount
);
sbFeature.AppendLine();
}
return sbFeature;
}