Can we assign license to users in JKE Banking application from command line?
Accepted answer
repotools-jts.bat -createUser
Reference:
https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.jazz.install.doc/topics/r_repotools_createuser.html&scope=null
Use the createUser command to create a new user and assign a license, or update an existing user.
Purpose
The createUser command creates a new user and assigns a license. If a user with the specified user ID exists, that user will be updated with the name, email address, and license provided.Reference:
https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.jazz.install.doc/topics/r_repotools_createuser.html&scope=null
2 other answers
https://jazz.net/help-dev/clm/topic/com.ibm.jazz.install.doc/topics/t_config_sample_proj.html mentions that this could be done with a script, but I am not aware of an example.
I think repotools-jts can export the users and import them with licenses. You can try that.
I usually do this in the JTS (or other application) user administration.
I think repotools-jts can export the users and import them with licenses. You can try that.
I usually do this in the JTS (or other application) user administration.
Nice, so summarizing, here a script that would do it:
If you want to peek into an existing setup
echo on set SERVERFOLDER="C:\CLM2015\6.0.1\JazzTeamServer\server" set REPOSITORY="https://clm.example.com:9443/jts" set USERID="the_admin_userid" set PASSWORD="the_admin_password" rem primary users call %SERVERFOLDER%\repotools-jts -createUser userId=bob licenseId=com.ibm.team.rrc.author repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% call %SERVERFOLDER%\repotools-jts -createUser userId=marco licenseId=com.ibm.rqm.tester repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% call %SERVERFOLDER%\repotools-jts -createUser userId=marco licenseId=com.ibm.team.rtc.developer repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% call %SERVERFOLDER%\repotools-jts -createUser userId=deb licenseId=com.ibm.team.rtc.developer repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% call %SERVERFOLDER%\repotools-jts -createUser userId=tanuj licenseId=com.ibm.rqm.tester repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% call %SERVERFOLDER%\repotools-jts -createUser userId=rebecca licenseId=com.ibm.team.rtc.developer repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% rem Build user call %SERVERFOLDER%\repotools-jts -createUser userId=build licenseId=com.ibm.team.rtc.buildsystem repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% rem secondary users call %SERVERFOLDER%\repotools-jts -createUser userId=ursula licenseId=com.ibm.team.rrc.author repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% call %SERVERFOLDER%\repotools-jts -createUser userId=curtis licenseId=com.ibm.rqm.viewer repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% call %SERVERFOLDER%\repotools-jts -createUser userId=tammy licenseId=com.ibm.rqm.tester repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% call %SERVERFOLDER%\repotools-jts -createUser userId=sally licenseId=com.ibm.team.rrc.author repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% rem Design Manager License rem %SERVERFOLDER%\repotools-jts -createUser userId=al licenseId=repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD% pause
If you want to peek into an existing setup
repotools-jts -exportUsers toFile=users.csv repositoryURL=https://clm.example.com:9443/jts adminUserId=the_admin_userid adminPassword=the_admin_passwordGet the installed Licenses
repotools-jts -listLicenses repositoryURL=https://clm.example.com:9443/jts adminUserId=the_admin_userid adminPassword=the_admin_password
Comments
Hi Ralph,
I tried your approach and it did work to assign a license to a specific user. However, if I want to assign "multiple" licenses to a specific user by using -createUser, it always updates the user with the last assigned license.
For instance, in your case, the user "marco" is only assigned with RTC Developer license but without RQM Tester license.
Could you please tell me if it's possible to assign "multiple" licenses to a specific user by using -createUser or there's other way to do that. Thanks.
My requirement was only one license. Multiple licenses could be avoided by using CLM licenses. If createUser only allows just one license the other option is the CSV import.
Use exportUsers to see the formats for one or more licenses
echo on set SERVERFOLDER="C:\CLM2015\6.0\JazzTeamServer\server" set REPOSITORY="https://clm.example.com:9443/jts" set USERID="" set PASSWORD=""rem primary users call %SERVERFOLDER%\repotools-jts -exportUsers toFile=./users.csv repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
then modify the csv file e.g. using a script language and import the file
echo on set SERVERFOLDER="C:\CLM2015\6.0\JazzTeamServer\server" set REPOSITORY="https://clm.example.com:9443/jts" set USERID="*" set PASSWORD="*" rem primary users call %SERVERFOLDER%\repotools-jts -importUsers fromFile="./SampleUsers.csv" repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
Finally the API: https://rsjazz.wordpress.com/2017/03/29/managing-contributor-licenses-using-the-plain-java-client-libraries/