Hi,
I am doing some testing with the item revision list scripts and am experiencing some problems. I'd like to know whether there's a problem with the system or a problem with my script.
I've tried this on about 6 or 7 different items and they all seem to have the same issue. I'll give an example below.
I have an item that have 4 release versions as follows;
1 Superseeded
2 Superseeded
3 Released
4 Working
When I run a test script with 'item.descriptor.revisionList.length' it returns a value of "4.0".
When I run a test script with 'item.descriptor.revisionList' it returns the following;
"[Version: 4 Release: null Lifecycle: Working, Version: 3 Release: null Lifecycle: Released, Version: 2 Release: null Lifecycle: Superseded, Version: 1 Release: null Lifecycle: Superseded]"
When I run a test script with 'item.descriptor.revisionList[0]' it returns the following;
"Version: 4 Release: null Lifecycle: Working"
So far so good...However....
When I run a test script with 'item.descriptor.revisionList[0].lifecycleState.stateName' it returns the following;
"Released" [should be "Working"]?????
When I run a test script with 'item.descriptor.revisionList[0].release' it returns the following;
"null" [should be "4.0"]???
Any ideas?
Thanks,
David.
Thank you for reporting this problem. The issue has now been brought to the attention of our development team.
Hi David,
It turns out you need to use different API functions to achieve what you were looking for via scripting.
item.descriptor.revisionList[i].release will return the production release value only. If you need to return the version before production release, then you should call item.descriptor.revisionList[i].versionRelease. Note that this call will be null for the current working revision.
item.descriptor.revisionList[i].lifecycleState.stateName is the current state of the lifecycle, not the lifecycle for that revision number. To access the state name of a given revision, please use item.descriptor.revisionList[i].lifecycleStatus.
Please let me know if you have more questions.
Regards,
Can't find what you're looking for? Ask the community or share your knowledge.