JiraRestClient set assignee - jira

My shop is currently running Jira 5X, and I am attempting to use the Jira Rest Client to retrieve / progress issues.
I need to set values such as Assignee. Can anyone provide a good example on how to do this?

IssueInput issueInput = IssueInput.createWithFields(new FieldInput(IssueFieldId.ASSIGNEE_FIELD, ComplexIssueInputFieldValue.with("name",
<username>)));
jiraRestClient.getIssueClient().updateIssue(<jiraKey>, issueInput).claim();

Looking through the JavaDoc for the Java Jira Rest Client, it looks like it only supports update of a very limited set of issue attributes, and updatng the assignee is not supported - see the methods for the IssueRestClient interface.
You'd be best off contacting the project maintainers - the Java client is only in Alpha so they are probably adding new functionality to it regularly.

Related

Creating issues with the JIRA API for specific users with assigned permissions to view

I am new to JIRA API automation and would like to know how I could use the JIRA API to create an issue for specific user who have restricted permissions to view - the API to be used is as follows -https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post
Thanks,
Best Regards,
Nuzhi
I tried going through the API documentation but could not find any particular detailed documentation with regards to the use case.

Jira Restful api to get any completed sprint Comitted and delivered data

I am writing a Java command like program to fetch Scrum information using Jira Rest API. I am not seeing any restful api to find a given completed sprint Committed and Delivered Story points or velocity chart information.
Can anyone help me out with what service I have to call to get it ?
I am using a raw rest call using basic authentication.
Unfortunately the answer varies for the Jira installation type
Jira Cloud
There's no direct way to get data about a sprint through the api, but I believe POST /rest/api/3/expression/eval would be your best option. From there you could find all the issues from your intended sprint with a JQL like Sprint=4, and then tally the story points. It's not perfect, but the best I'm aware of.
Jira Server/Data Center
Based on your version you may have to take the same approach as for Cloud, however some older versions of Jira have the Agile API which would probably speed things along

JQL to get blocked Issues

Is there a native JQL (not a plugin) that returns tickets that have linked issues listed as "is blocked by" (so I can see all my blocked tickets).
All I have found is linkedIssues() but that can require a specific issue ID to search for which is entirely unhelpful.
I am using Jira Cloud 7.4.
In the core JIRA JQL functionality the closest thing you have, as you've already found out, is linkedIssues() that requires a parent Issue reference.
What you need is Adaptavist ScriptRunner, they have a function called hasLinks(). There are also a handful of other add-ons that offer this functionality but like ScriptRunner, they all cost money.
Related JIRA community question
JIRA Cloud feature request
The below query is also helpful (add it in the filter setup):
project = "Project ID" AND issuetype in (story, Spike) AND Sprint = "Sprint ID" AND linkedIssue in issueHistory()
According to Esther Strom's answer on this Atlassian site, there's a new query type:
Atlassian has very recently introduced a new JQL function called issueLinkType, which can be used in filters, but also in boards.
It's not perfect; if you're already using card colors for something else, you won't be able to use this as well. It also behaves inconsistently when a ticket has links of multiple types. But if you're looking for an easy way to get a view into what might be blocked, and what might have blockers, it works pretty well.
In KQL you can specified the type of link.
For what you want to do here what you can use
issue in linkedIssues([Issue#],"is blocked by")

JIRA: How to get resolved vs closed? using JQL?

Is there a way in JIRA via the filters or using JQL Query to get resolved vs closed over a time frame?
I think you can use dashboard gadget for this. have tested "Issue Statistics" gadget and works fine. you can create a filter that you need with a time frame then configure the gadget with the status and created filter.image attached.
Dataplane Reporting Services handles this quite well.

Is it possible to query or modify project membership/guests with the Asana API?

I'd like to be able to add a user as a guest to a project specific to that individual, but it looks like I cannot do this programmatically and must instead resort to manually adding them as a guest. Is there anything I'm missing in the API documentation? Is there an undocumented feature that would let me do so? Or am I just out of luck?
It is currently not possible to manage users of an organization via the API.
This is on our API roadmap, which I hope to publish a public version of soon.
You can subscribe to incremental changes of our API and it's documentation on API changelog https://www.apichangelog.com/api/asana

Resources