- Introduction
- Java Atlassian Jira client
- Java Prod client
- Java Aphrodite client
- Nodejs client
- HTTP Request to get or create JIRA tickets
This project has been designed to investigate different technology able to manage the creation, update or deletion of the JIRA tickets as documented under the table of content. They could be used to automate Job's action or for your own personal needs to get a Jira issue, change the status, ...
REMARK: The Aphrodite project don t manage all the CRUD operations but a few and don`t support to create or clone an issue !
References:
-
https://developer.atlassian.com/server/jira/platform/java-apis/#java-api-policy-for-jira
-
https://bitbucket.org/atlassian/jira-rest-java-client/src/75a64c9d81aa?at=master
Instructions:
- Move to the atlassian folder and compile the java client
cd atlassian
mvn clean package java -jar target/uber-atlassian-1.0-SNAPSHOT.jar \
-user JIRA_USER \
-password JIRA_PWD \
-cfg etc/release.yaml \
-action create \
-url https://issues.redhat.comjava -jar target/uber-atlassian-1.0-SNAPSHOT.jar \
-user JIRA_USER \
-password JIRA_PWD \
-url https://issues.redhat.com \
-cfg etc/release.yaml \
-action get \
-issue ENTSBT-xxxjava -jar target/uber-atlassian-1.0-SNAPSHOT.jar \
-user JIRA_USER \
-password JIRA_PWD \
-url https://issues.redhat.com \
-cfg etc/release.yaml \
-action delete \
-issue ENTSBT-xxxjava -jar target/uber-atlassian-1.0-SNAPSHOT.jar \
-user JIRA_USER \
-password JIRA_PWD \
-url https://issues.redhat.com \
-cfg etc/release.yaml \
-action delete-bulk \
-issue ENTSBT-xxx ENTSBT-yyy ENTSBT-zzzInstructions:
- Move to the atlassian folder and compile the java client
cd atlassian-prod
mvn clean package To create a bulk of issues for a component/starter which are blocking a JIRA Issue release, use the following command:
java -jar target/uber-atlassian-prod-1.0-SNAPSHOT.jar \
-user JBOSS_JIRA_USER \
-password JBOSS_JIRA_PWD \
-cfg etc/release.yaml \
-action create-component \
-url https://issues.redhat.comIMPORTANT: If the release.yaml includes a jiraKey field, then the newly component issue created will be linked to the Release Issue !
To Link different issues to a JIRA issue using as relation type Is Blocked By, then execute the following command:
java -jar target/uber-atlassian-prod-1.0-SNAPSHOT.jar \
-user JBOSS_JIRA_USER \
-password JBOSS_JIRA_PWD \
-url https://issues.redhat.com \
-cfg etc/release.yaml \
-action link \
-issue ENTSBT-xxx \
-to_issue EAP-yyy The to_issue parameter represents the issue which currently blocks the release issue referenced by the parameter issue.
To clone a Release issue and their sub-tasks
java -jar target/uber-atlassian-prod-1.0-SNAPSHOT.jar \
-user JBOSS_JIRA_USER \
-password JBOSS_JIRA_PWD \
-url https://issues.redhat.com \
-cfg etc/release.yaml \
-action clone \
-issue ENTSBT-dddSee the Set Aphrodite project for more information
- Move to the
aphroditefolder and compile the java client
cd aphrodite
mvn clean compile - Create the
aphrodite.jsonfile containing your jira credentials
mkdir etc && touch etc/aphrodite.json- Launch it to get JIRA issues
mvn clean package
java -jar target/uber-aphrodite-1.0-SNAPSHOT.jar \
-cfg ./etc/aphrodite.json \
-url https://issues.redhat.com \
-issue ENTSBT-343- Create a
~/.jiracli.ymlfile with the following information
host:
name: JIRA_HOST // jira.jboss.org
user: JIRA_USER
pwd: JIRA_PASSWORD- Install the node packages/modules needed
cd nodejs
npm install && npm link- Execute this command to get a ticket
jira get SB-869
Key : SB-869
Title : Contact Atomist support
Status : New
Type : Task
Author : claprun
Description :
- Admin delegation
- Bug (?) on team admin: an invite is still pending even though a team member with that email has already been accepted. What happens if that invite is rescinded since the error message makes it sound like all references to that email would be deleted?
Sprint Name : SB-2018-09-14, state : CLOSED
Sprint Name : SB-2018-09-28, state : ACTIVE- Update the status
// To move a new ticket to status needed to Hand Over for Development
jira update SB-869 HandOver
// To move the ticket to the In Progress column of a sprint
jira update SB-869 InProgress
// To resolve/close it
jira update SB-869 ResolveIssue|CloseIssueAtlassian REST API v2 doc: https://docs.atlassian.com/software/jira/docs/api/REST/8.10.0/
http --verify=no --follow --auth user:pwd https://issues.jboss.org/rest/api/2/issue/SB-889http --verify=no --follow --auth user:pwd POST https://issues.jboss.org/rest/api/2/issue/ < jira.json