Objective: Release a projects' version using Jira Cloud Script Runner (groovy). Ideally, when a ticket is transitioned to a certain workflow status, the script runner will release the version associated with the ticket.
Problem: How do I list all the software projects?
I've searched the documentation looking for a way to get all projects + the versions that are included in the project to no avail. It seems unirest isn't able to import projects like it would import a trigger issue.
I have considered calling:
HttpResponse<JsonNode> response = Unirest.get("/rest/api/2/project/{projectkey}/versions")
.basicAuth("example@example.com", "<api_token>")
.header("Accept", "application/json")
.asJson();and adding a static project key to find my versions.
Any other, more efficient ideas?
I generally ignore static type checking errors. These can help with debugging your code, but they don't automatically mean that your code is bad.
I would run it and look at the specific line that's failing by reviewing the logs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.