How to get the build requstor from the build result by server side API?
I am creating the follow up action for build result event handling. I can get the build result and then I want to get the requester.
I use the following code to get requester, but the return always null.
IContributorHandle requester = buildResult.getModifiedBy();
The javadoc said these:
"Returns the contributor responsible for creating this state of the item.
A newly-created item may or may not carry the contributor's id. The initial state of an item bears the item id of the contributor that created the item; other states bear the item id of the contributor that made the change that resulted in that state. "
Any one can help?
I use the following code to get requester, but the return always null.
IContributorHandle requester = buildResult.getModifiedBy();
The javadoc said these:
"Returns the contributor responsible for creating this state of the item.
A newly-created item may or may not carry the contributor's id. The initial state of an item bears the item id of the contributor that created the item; other states bear the item id of the contributor that made the change that resulted in that state. "
Any one can help?
One answer
This is the contributor that changed or modified the build result, at best, but not the one that requested the build.
I would try com.ibm.team.build.common.model.IBuildResult.getBuildRequests() and from the IBuildRequest try
com.ibm.team.build.common.model.IBuildRequest.getInitiatingContributor() . I haven't tried this.
I would try com.ibm.team.build.common.model.IBuildResult.getBuildRequests() and from the IBuildRequest try
com.ibm.team.build.common.model.IBuildRequest.getInitiatingContributor() . I haven't tried this.