How do I get User details other than name from Test Plan Owner with RPE?
I am currently trying to be able to get the full user details that are stored on the JTS server for an owner to a Test plan in an RPE template.
Exposed under testplan/owner i get a user id and resource URI
feeding this resource URI into a new QM Schema returns no results and when I try and use a QM Feed on contributor I get a list of URIs that have the jts unique ID which is not the same as the user id in QM.
I have also tried feeding this resource URI into a new RTC Schema and it is unable to resolve.
The reason I need to do this is within our system the User Id that comes out under testplan/owner reflects the system login id and in the case of some users this is justa series of letters and numbers. However their fullname is stored on the server and interestingly when I pull out owner from an RTC schema I get the fullname.
Exposed under testplan/owner i get a user id and resource URI
feeding this resource URI into a new QM Schema returns no results and when I try and use a QM Feed on contributor I get a list of URIs that have the jts unique ID which is not the same as the user id in QM.
I have also tried feeding this resource URI into a new RTC Schema and it is unable to resolve.
The reason I need to do this is within our system the User Id that comes out under testplan/owner reflects the system login id and in the case of some users this is justa series of letters and numbers. However their fullname is stored on the server and interestingly when I pull out owner from an RTC schema I get the fullname.
Accepted answer
Please use "'" so that the URI becomes
https://localhost:9443/qm/.service......./resources/Project Alias/contributor?fields=feed/content/contributor[userid='U2377']/name
or
https://localhost:9443/qm/.service......./resources/Project Alias/contributor?fields=feed/content/contributor[userid='U2377']/*
https://localhost:9443/qm/.service......./resources/Project Alias/contributor?fields=feed/content/contributor[userid='U2377']/name
or
https://localhost:9443/qm/.service......./resources/Project Alias/contributor?fields=feed/content/contributor[userid='U2377']/*
One other answer
You can get user details (name or email) from contributor feed. Once you get the userid (from testplan or executionworkitem feed), use a Data Source Configuration element and set its URI using Script Expression.
One example:
var pos=TestPlanURL.indexOf(/testplan/);
var conURI=TestPlanURL.substring(0,pos);
conURI=conURI + "/contributor?fields=feed/entry/content/contributor[userid='" + _value + "']/name";
conURI;
From the new data source(feed schema), use feed/entry/content/contributor/name to get the user's name.
One example:
var pos=TestPlanURL.indexOf(/testplan/);
var conURI=TestPlanURL.substring(0,pos);
conURI=conURI + "/contributor?fields=feed/entry/content/contributor[userid='" + _value + "']/name";
conURI;
From the new data source(feed schema), use feed/entry/content/contributor/name to get the user's name.