Here is the API verison I am using:
script type="text/javascript" src="/apps/1.33/sdk.js?apiVersion=1.43"></script>
The goal is to display a portfolio item/feature and all the child user stories of the feature in a grid. Then based on the US fields value, update the value of the field of the portfolio item/feature.
I am able to update the release field of a UserStory using rallydatasource.update
command, but the same command doesn't work for updating fields of portfolio item/feature
Here are the fields I am trying to update for Feature
. These do not work
rallyDataSource.update({_ref:ref, GroomingState: nfGroomingState},onUpdateComplete,onError);
rallyDataSource.update({_ref:ref, c_GroomingState: nfGroomingState},onUpdateComplete,onError);
rallyDataSource.update({_ref:ref, Ready: true},onUpdateComplete,onError);
rallyDataSource.update({_ref:ref, Notes: "This is test"},onUpdateComplete,onError);
rallyDataSource.update({_ref:ref, Architect: "XYZ ABC"},onUpdateComplete,onError);
Here are the fields I am trying to update for UserStory
. This does work.
rallyDataSource.update({
"_ref":sRef,
"Release": [
{
ref:relRef
}
]},
onUpdateComplete,onError);
Can someone please help me understand if there is something I am doing wrong? Is update to portfolio item not supported in v 1.43?
You are using a trick
?apiVersion=1.43
to set the WS API version to the version the legacy AppSDK1 predates and does not support, and it works to the extent but not enough to get the updates working.I suggest AppSDK2 Also, since State of PI types is a full object (unlike State or ScheduleState of Defects or UserStories) a _ref has to be used in this code:
GroomingState: nfGroomingState
You may be using the reference, it was not clear from the code fragment. There is a Ruby example here that works with PI states. Rally Ruby toolkit sits on the same WS API model, so that example is not entirely irrelevant.Here are the details of what I tried with AppSDK1 set to use version 1.43 of WS API. Regardless how I set the version either using
src="/apps/1.33/sdk.js?apiVersion=1.43"
orrallyDataSource.setApiVersion("1.43");
I have to use parent type:PortfolioItem
instead of concrete
PortfolioItem/Feature
type when I query:This works fine, and all children of PortfolioItem/Initiative I8, which are of type PortfolioItem/Feature are returned successfully, and if all I want to do is to build a grid, it works:
Two features are returned, one that has State already set, the other with no State:
However if I try to add the update function:
"Requested type name "feature" is unknown
error is returned:AppSDK1 works with WS API that is no longer supported. Last supported date for 1.43 was June 20 of this year. AppSDK1 stopped at 1.32 of WS API. That is the reason for the trick to set WS API version because PortfolioItems were introduced in 1.37 of WS API. Particularly when you use features introduced after AppSDK1 was no longer updated (see WS API versioning) there is no guarantee that the
rallyDataSource.setApiVersion("1.43");
trick will work in all scenarios.