Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide elegant licensing for Jira (possibly from command line) #3

Open
readysetagile opened this issue Jan 17, 2021 · 0 comments
Open

Comments

@readysetagile
Copy link
Owner

Licensing for Jira is currently applied by navigating throughout the Jira GUI and my.atlassian.com. A way should be provided to do this without the GUI. Perhaps a UNIX shell or batch file.

Here are some resources and commands that can be used:

https://confluence.atlassian.com/jirakb/how-to-retrieve-application-license-details-via-rest-api-in-jira-7+-934728265.html

https://confluence.atlassian.com/jirakb/how-to-access-upm-rest-api-for-license-details-777021716.html


curl -u jiraxray:jiraxray -X GET -H "Content-Type: application/json" http://localhost:8080/rest/plugins/applications/1.0/installed/jira-software/license

curl -u jiraxray:jiraxray -X GET -H "Content-Type: application/json" http://localhost:8080/rest/plugins/1.0/com.xpandit.plugins.xray-key/license
----

curl -u jiraxray:jiraxray -X POST -H "Content-Type: application/json" -d "{\"licenseKey\": \"\"}" http://localhost:8080/rest/plugins/applications/1.0/installed/jira-software/license

curl -u jiraxray:jiraxray -X POST -H "Content-Type: application/json" -d "{\"licenseKey\": \"\"}" http://localhost:8080/rest/plugins/1.0/com.xpandit.plugins.xray-key/license

Another way to do this is through the H2 console app

docker run -it -v /home/john/repos/jira-xray/jiraVolume:/var/atlassian/application-data/jira atlassian/jira-software /bin/bash

java -cp java -cp h2-1.4.199.jar org.h2.tools.Shell

URL: jdbc:h2:file:/var/atlassian/application-data/jira/database/h2db

SELECT * FROM productlicense;

update productlicense set license ='' where id = 10100;

select * from propertytext where propertyvalue like '<license key of xray';
 
update propertytext set propertyvalue = '' where propertyvalue like 'AAA%';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant