Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Adding Version attributes via webservice

web-app

Hi

I have a fragment of code that attempts to add version attribute to a freshly created project.

_aWSProxyHelper= new ProxyHelper(WebServicesConstants.GEMINIWSURL)
...
// Add a project using _aWSProxyHelper.ProjectsProxy.CreateProject(project);
...
VersionAttributeValueEN releaseDateAttrib = new VersionAttributeValueEN();
 releaseDateAttrib.AttributeName = "ReleaseDate";
 releaseDateAttrib.AttributeValue = System.DateTime.Now.ToString();
 releaseDateAttrib.ProjectID = _projID;
 releaseDateAttrib.AttributeID = 0;
 releaseDateAttrib.VersionID = 0;
 releaseDateAttrib.AttributeValueID = 0;

_aWSProxyHelper.VersionsProxy.CreateVersionAttributeValue(releaseDateAttrib);
...

Unfortunately the last line results in the following exception:

System.Web.Services.Protocols.SoapException was unhandled
  Message="Server was unable to process request. --> You do not have the privileges to create version attributes for this project"
  Source="System.Web.Services"
  Actor=""
  Lang=""
  Node=""
  Role=""
  StackTrace:
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
...

Prior to calling the above fragment I have made a call to _aWSProxyHelper.SetAuthenticationTokenOnAllServices(userName, password)

Any pointers would be appreciated.

Richard

RichardGilday
· 1
RichardGilday
Replies (4)
helpful
0
not helpful

The error indicates that the user you have used does not have the permissions to create a project version attribute. It needs to be either an admin or project admin.

Does your user have these permissions?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Hi Saar

I have used the example "admin" username and "admin" password to call

 SetAuthenticationTokenOnAllServices("admin", "admin")

and .AuthenticateProxy.LogIn("admin", WebServicesConstants.GEMINIWINACCESSCODE)

as per the webservices example.

The "jon smith" admin example account can create a version attribute from a browser.

Cheers

Richard


RichardGilday
· 1
RichardGilday
helpful
0
not helpful

Hi Richard,

I can confirm that this is a BUG in the versions web service. At the moment you can do this only if you are an admin AND a project admin. You can give your user project admin via the "User Security" page -> click on the project in question, select "Project Administrator" and the user.

Also, make sure that your version & attribute IDs are populated.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Cheers.  I'll look into this tomorrow.

Richard


RichardGilday
· 1
RichardGilday