JIRA REST API - missing parameters

Kuba_Janus
Contributor
February 17, 2020

Hi,

on friday I have discovered issue with connect to REST API

 

I have used jira-rest-java-client-api and in the endpoints where I would like to get account details everytime I am getting 

JSONException: JSONObject[“name”] not found

I have checked all of the cases and using jira in your cloud everytime I am getting without "name" field. I have check also jira in external server where we have oldest version and everything is fine.

For me the issue is important based of broken jira-rest-java-client-api 

16 answers

1 accepted

3 votes
Answer accepted
wwerner
Contributor
February 18, 2020

I copied the class JsonParseUtil from jira-rest-java-client-core-5.1.6 and modified the function parsebasicUser to this:

@Nullable
public static BasicUser parseBasicUser(@Nullable final JSONObject json) throws JSONException {
if (json == null) {
return null;
}

final String username = json.optString("name", "[" + json.getString("accountId") + "]");
if (!json.has(JsonParseUtil.SELF_ATTR) && "Anonymous".equals(username)) {
return null; // insane representation for unassigned user - JRADEV-4262
}

// deleted user? BUG in REST API: JRA-30263
final URI selfUri = optSelfUri(json, BasicUser.INCOMPLETE_URI);
return new BasicUser(selfUri, username, json.optString("displayName", null));
}

With this, my program runs fine.

Kuba_Janus
Contributor
February 18, 2020

I have also made something similar :) Thanks for info!

next step will be replace jira-rest-java-client-core to owner impl

Robinwchahal February 18, 2020

I've raised a separate question for the issue I'm having, which is a little different, but I think it has the same root cause.
https://community.atlassian.com/t5/Jira-questions/Jira-Cloud-REST-API-getting-an-error-on-Promise-lt-Issue-gt/qaq-p/1304283#M409162

Like fellipe.gurgel likes this
Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2020

It is probably worth keeping in mind that there are a number of ways that Jira Server REST APIs (especially from an older release like 5.1) are incompatible with Jira Cloud REST APIs.

Like wwerner likes this
Thierry
Contributor
February 19, 2020

Similar problem in the .Net Atlassian SDK, in their own source code it tries to access json[this._propertyName] here _propertyName is set to "name" and we get a NullReferenceException. Changing this to "displayName" makes my app work again. I've asked my question here with a lot more details: https://community.atlassian.com/t5/Jira-questions/SDK-name-vs-displayName-userPicker-NullReferenceException-in/qaq-p/1303712

fellipe.gurgel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 19, 2020

Where and how did you guys replaced this snippet in order to fix the Issue instantiation problem? 

Thanks.

wwerner
Contributor
February 19, 2020

@fellipe.gurgel I just extracted the source code of the given class and created a patched version of it in my code - so I did not try to patch the library and build it. As my class path has the library in the back, my provided class overwrites the library's implementation. Very simple and very fix to experiment. 

I would suggest to use the patch from the merge request, as it is far superior to my solution. Just make name optional by using optString("name", null). 

Good luck!

Stefan C.
Contributor
February 21, 2020

There is an (11 month old) pull request for changing JsonParseUtil.java from name to accountId:

https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93

4 votes
Craig Rodrigues
Contributor
February 18, 2020

@wwerner @Kuba_Janus Can you try this patch and see if it solves the problem: https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93/jrjc-240-added-support-for-accountid/diff

This was submitted to the jira-rest-java-client plugin last year but was never merged.

wwerner
Contributor
February 18, 2020

This looks good and works for me, too. It is superior to my quick fix as it

- does not deliver wrong data for the user name

- does change the BasicUser and User structures accordingly

- is test covered

So thumbs up!

+1

1 vote
Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2020

Please note the section under "Compatibility with Jira" for JRJC on https://ecosystem.atlassian.net/wiki/spaces/JRJC/overview

The Jira REST Java Client works with Jira Server, but not with Jira Cloud.

Craig Rodrigues
Contributor
February 18, 2020

@Ben Kelley that is true, but whether you like it or not, people are using workflows based on jira-rest-java-client plugin against JIRA Cloud.
I had a workflow working last week, and then due to the change in JIRA Cloud, the workflow broke this weekend.

Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2020

I understand. Although there are often small changes and new features for Jira Cloud APIs that the Jira Server library didn't support, possibly that wasn't a problem for some people.

These changes by their nature were breaking changes though. It wasn't a decision we took lightly, so we sought to give as much notice as possible.

wwerner
Contributor
February 18, 2020

As software developers we fully understand that there are and will be differences in the developing products. However, in our case we are in need of some very basic statistics, that we mirror in an analytics elasticsearch cluster to get a superior overview of things going on and accessing the issue and workflow data to provide our customers accurate statistics and a solid foundation for billing. 

I unterstand that there might be better ways (e.g. some cloud plugins) but this is the way it served us for years, coming from a long maintained server installation.

After successfully migrating to jira cloud we do not want to go back.

@Ben Kelley my suggestion would be to maintain a simple to use interface to the core data for programmers, e.g. not covering all the latest and greatest in both products, but enabling customers to access their data essential stored in jira (server or cloud). 

For our user cases, the patched java client rest library does fulfill this need.

https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93/jrjc-240-added-support-for-accountid/diff

A last sentence: My experience with the atlassian team and dear fellow users was great, I was able to get my system up and working in one day. Thank you very much for the lively platform / users / support team.

Craig Rodrigues
Contributor
February 19, 2020

@Ben Kelley Is there someone at Atlassian who can review and merge https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93/jrjc-240-added-support-for-accountid/diff and release a new plugin?

This patch has been pending for a year, and seems to solve the immediate problem at hand.

Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2020

While I can't comment on that PR, my feeling is that given this library is for Jira Server, this patch would make it incompatible with Jira Server.

There are a number of differences between Server and Cloud APIs.

Craig Rodrigues
Contributor
February 19, 2020

@Ben Kelley I read over the patch a few times, and on this line:

https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93/jrjc-240-added-support-for-accountid/diff#Lcore/src/main/java/com/atlassian/jira/rest/client/internal/json/JsonParseUtil.javaT192 

Jakub made name an optional attribute of the JSON structure, so he didn't take it out.

This makes the change forwards and backwards compatible.

Jakub also added support for accountId, but that is also an optional parameter, so this should still work for older versions which do not support this parameter.

So Jakub put a lot of thought into this patch, and from a few responses on this thread of people who tried it, it does solve the problem encountered with latest JIRA Cloud.

I think the least that Atlassian could do is to have someone review Jakub's patch and provide feedback or merge it.


Like # people like this
Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2020

Again, while I am not involved in the development of the client library for Jira Server, I think it might be more confusing if the official Jira Server library had this change.

The published documentation for Jira Server developers is that version X of the library works with version X of Jira Server. There are many differences even between the latest version of Jira Server and Jira Cloud.

I will raise the issue of publishing a Java client library compatible with Jira Cloud. Consider though that people in this thread are using libraries for Jira Server version 5.1, released in 2012.

Like wwerner likes this
Craig Rodrigues
Contributor
February 19, 2020

@Ben Kelley which team is involved in the development of jira-rest-java-client ?  Jakub submitted a patch one year ago, and no one from Atlassian provided any feedback on it.

How can users of JIRA Cloud communicate with the team that maintains this library in order to provide feedback and solve this problem?

This change is breaking workflows for a lot of people.

Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2020

Jira Cloud customers could create a feature request ticket through the normal support process to ask that a similar client library for Cloud is published.

Cloud and Serve APIs differ in many ways, so I imagine the libraries would always be different.

Another route would be to generate REST client code from the Open API spec that we publish.

wwerner
Contributor
February 19, 2020

Hi @Ben Kelley I do understand your position, publishing an updated library for server and cloud or a dedicated library to cloud customers is definitely the right way to do.

A a quick fix the proposed patch is valid and does not break older code. A no brainer. A chance to show that Atlassian is taking care...

Stefan C.
Contributor
February 20, 2020

Hi @Ben Kelley 

As "Jira REST Java Client works with Jira Server"

which rest-client will work "with Jira Cloud" ?

CraigRodrigues February 20, 2020

@Ben KelleyMy company is a JIRA Cloud customer, but I am not familiar with the support process.  Can you describe what steps that I must follow to start the support process so that the code owner of jira-rest-java-client can code review and merge https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93/jrjc-240-added-support-for-accountid/diff?_ga=2.81996886.1123302327.1582056915-228210608.1534538288 ?


I think we are getting some good feedback from the user community on this thread, but to move forward and fix problems for the customers on this thread,
we need to escalate this to engineers on the JIRA Server team who can effectively code review and merge this fix.

Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2020

@ultra urgent sorry but we don't ship client libraries. You can generate your own from our Open API spec though. I will write up a page on that. (I found that swagger-codegen didn't like a few things, but the work arounds were fairly straightforward.)

1 vote
Giuliano C_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 17, 2020

Hey @Kuba_Janus,

As part of the European General Data Protection Regulation (GDPR), usernames have been deprecated from API calls and those will be identified by their Atlassian account ID (accountId), instead. This change has been announced in 2018 and had some reminders with some useful information:

https://confluence.atlassian.com/cloud/blog/2018/06/say-goodbye-to-usernames-in-atlassian-cloud

https://community.developer.atlassian.com/t/announcement-reminder-on-removal-of-user-names/34111

Lastly, you can refer to our guide that shows you how to update the call, including the resources that required parameters like usernames.

I hope it helps! Feel free to raise a support case if there's any additional help the team could provide you, or if you want to share something specific that is related to your instance. :)

Cheers,

Giu

Robinwchahal February 17, 2020

For me, I'm not even trying to get a username.
I have a Promise<Issue>
and I'm trying to do a .claim().

There's something in the back end for the claim() method that is calling
com.atlassian.jira.rest.client.internal.json.JsonParseUtil.parseBasicUser 

Narayanan Srinivasan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 17, 2020

Me too. I can't claim an issue using the issueclient. In fact, I can still create tickets so there's something else that's broken.

Edit:
find -> claim

Robinwchahal February 17, 2020

Through the API, I'm able to create a new Issue.

I get an error when I try to claim that same Issue.

ruel.loehr February 17, 2020

@Giuliano C_ - which version of the the atlassian java sdk should we be using that supports this?   E.g. which version of jira-rest-java-client-api and jira-rest-java-client-core have been modified to support the GDPR changes for the find functionality of tickets?

 

We (and others here) have tried both 4.0.0 and the latest released version but are seeing the error:  

 

Caused by: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.

 at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:360)

at org.codehaus.jettison.json.JSONObject.getString(JSONObject.java:487)

 at com.atlassian.jira.rest.client.internal.json.JsonParseUtil.parseBasicUser(JsonParseUtil.java:192)

ruel.loehr February 17, 2020
Like # people like this
wwerner
Contributor
February 18, 2020

This is exactly my error, too. I just search for worklogs/issues and get back several user objects without the field name (I do understand why) - but the Attlassian code hardcoded tries to parse these structures with the class UserJsonParser that hardcoded works with the BasicUser and a name field.

Looks as this breaks nearly all usages of the java client. 

Kuba_Janus
Contributor
February 18, 2020

Hi @Giuliano C_ 

I understood your answer ... but is any chance to get jira-rest-java-client-core library version which will provide that change? Maybe better will be provide empty "name" in the API - no crash in library level for the time when the new library will be ready?

Nils Rognerud February 25, 2020

Hi @Giuliano C_ 

This change is good for GDPR, but it might have missed an implementation point. Previously i could auto-generate comments and '@' the any user with 'key' but now its not present. [~key] worked great here.

[~emailAddress] and [~accountId] do not work for this. so my current work around is [~emailAddress(split at the @ and getting the first substring)]. I know there are cases this won't work, but I can't figure out another way around this. Maybe I just won't '@' people directly anymore.

Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 25, 2020

Hi @Nils Rognerud . You can mention users in wiki text using a format like [~accountid:abc-1234-def]. All Jira Cloud APIs support account IDs.

Currently if you include a user mention that uses the person's user name in wiki text, it will still render, but as part of user name removal this support is being removed. See this announcement about upcoming changes to wiki text: https://community.developer.atlassian.com/t/announcement-reminder-on-removing-support-for-user-names-in-wiki-text-in-jira/35342

0 votes
Nuno Rosa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 24, 2020

Good night, has anyone managed to overcome this error? JSONException: JSONObject [“name”] not found

0 votes
Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 8, 2020

A suggestion here: If you develop against Atlassian Cloud APIs (including Jira) it is a good idea to subscribe to updates on https://developer.atlassian.com/. While APIs change all the time, breaking changes like this are not common, but they are announced well in advance.

This is particularly true if you develop a product or tool that integrates with Jira that you provide to 3rd parties.

Craig Rodrigues
Contributor
March 8, 2020

@Ben Kelley Thanks for that pointer.  I think a lot of people have been using these API's via the jira rest api libraries distributed by Atlassian, and these libraries are buried deep in people's workflows.

Specifically, a lot of Jenkins plugins which interact with JIRA use these libraries, so this is buried even deeper.

In collaboration with @ultra urgent I submitted this patch to the Jenkins JIRA plugin https://github.com/jenkinsci/jira-plugin/pull/213 which bumps up the jira rest api dependency and has some other fixes to deal with the API changes.  That change has been merged, and the maintainer has released a new version of that plugin.

I've had people from at least 5 different companies contact me about that patch, so this API change has been affecting a lot of people.

Like Stefan C. likes this
Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 8, 2020

If you are calling a cloud service, it's good to have a plan for how you will handle API drift. It is certainly a valid plan to do nothing, and this solution has both upsides and downsides.

If you are using a 3rd party product that integrates with a cloud service, you want to know that this product also has a plan for handling API drift.

0 votes
CraigRodrigues February 21, 2020

@Ben KelleyDo you know which Atlassian team owns https://bitbucket.org/atlassian/connector-eclipse/src/rest/ ?  That needs to be updated to use jira-rest-java-client 5.20 which  @Kamal  just released.

Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 23, 2020
Like Dario B likes this
Will Mulder February 24, 2020

@CraigRodrigues Looks like we're on our own here (along with anyone else still using IDE connectors to Jira Cloud!) Workflow's not completely fooked - I'm only really losing Mylyn's task-focus in Eclipse as a result! Let's try to keep eachother in the loop if we find a fix ok?

0 votes
CraigRodrigues February 21, 2020

@wwerner can you help me file a ticket against JIRA itself so that we can get someone at Atlassian to review and merge  https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93/jrjc-240-added-support-for-accountid/diff

 

I've never had to file a bug like this and am having trouble navigating the process.

Craig Rodrigues
Contributor
February 21, 2020

@wwerner Can you try out version 5.20 of the jira-rest-java-client plugin and double-confirm the fix?  @Kamal Cichy and @Andy worked on pushing this through and releasing a new version of the plugin: https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93/jrjc-240-added-support-for-accountid/diff#comment-137009716

wwerner
Contributor
February 24, 2020

@Craig Rodrigues Version 5.2.0 does work for me. The fix looks good.

Craig Rodrigues
Contributor
February 24, 2020

@wwerner can you look at https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/104/change-field-name-from-name-to-id-for/diff ?  I found that I needed that, otherwise if I tried to create an issue with the Assignee prepopulated, the Assignee field would remain unassigned.

wwerner
Contributor
February 24, 2020

Looks reasonable, but I can not comment on that as I do not use this functionality. From the overall context this seems to be appropriate, as these functionalities have been changed to the accountId.

0 votes
Will Mulder February 21, 2020

Thanks @Ben Kelley ... however that's beyond me. Anyone out there capable of easily doing this for all us old-skool folk still using the Eclipse connector? Or perhaps just simply patching: eclipse\plugins\com.atlassian.jira.rest.client_3.2.5.v20150427\jira-rest-java-client-1.1-ide-m09.jar and making it available?

Will Mulder February 21, 2020

Currently looking at Tasktop Dev as an alternative but feel it too might be rusty...!?

0 votes
Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2020

Related: I'm writing up how to generate a client library in the language of your choice from our Open API spec. I'll link it here when it's done.

It won't be a drop in replacement for Server's JRJC (as it is not auto-generated), but it might be useful in terms of how you respond to future API changes.

Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2020
CraigRodrigues February 21, 2020

This document is good, but as you mentioned, it doesn't help people who have workflows and tools that use the existing libraries.

0 votes
Will Mulder February 20, 2020

And i get this: JSONObject["name"] not found from my JIRA connector for Eclipse which worked just fine until yesterday....

com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.


Atlassian Connector for Eclipse
3.2.5.v20150427

Eclipse
Version: Neon.3 Release (4.6.3)
Build id: 20170314-1500




eclipse.buildId=4.6.3.M20170301-0400
java.version=1.8.0_201
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments: -product org.eclipse.epp.package.javascript.product -product org.eclipse.epp.package.javascript.product -product org.eclipse.epp.package.javascript.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.javascript.product -product org.eclipse.epp.package.javascript.product -data file:/C:/Users/willem.mulder/workspace/ -product org.eclipse.epp.package.javascript.product

com.atlassian.connector.eclipse.internal.jira.core
Error
Thu Feb 20 13:46:15 GMT 2020
com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.

com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.call(JiraRestClientAdapter.java:790)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.getIssues(JiraRestClientAdapter.java:315)
at com.atlassian.connector.eclipse.internal.jira.core.service.JiraClient.findIssues(JiraClient.java:368)
at com.atlassian.connector.eclipse.internal.jira.core.service.JiraClient.search(JiraClient.java:757)
at com.atlassian.connector.eclipse.internal.jira.core.JiraRepositoryConnector.performQuery(JiraRepositoryConnector.java:140)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.synchronizeQuery(SynchronizeQueriesJob.java:311)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.synchronizeQueries(SynchronizeQueriesJob.java:268)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.run(SynchronizeQueriesJob.java:199)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.call(JiraRestClientAdapter.java:783)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.getIssue(JiraRestClientAdapter.java:248)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.access$3(JiraRestClientAdapter.java:247)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter$5.call(JiraRestClientAdapter.java:325)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter$5.call(JiraRestClientAdapter.java:1)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.call(JiraRestClientAdapter.java:746)
... 8 more
Caused by: com.atlassian.jira.rest.client.RestClientException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:89)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.getAndParse(AbstractJerseyRestClient.java:106)
at com.atlassian.jira.rest.client.internal.jersey.JerseyIssueRestClient.getIssue(JerseyIssueRestClient.java:133)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter$3.call(JiraRestClientAdapter.java:250)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter$3.call(JiraRestClientAdapter.java:1)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.call(JiraRestClientAdapter.java:746)
... 13 more
Caused by: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:360)
at org.codehaus.jettison.json.JSONObject.getString(JSONObject.java:487)
at com.atlassian.jira.rest.client.internal.json.JsonParseUtil.parseBasicUser(JsonParseUtil.java:169)
at com.atlassian.jira.rest.client.internal.json.BasicUserJsonParser.parse(BasicUserJsonParser.java:26)
at com.atlassian.jira.rest.client.internal.json.BasicUserJsonParser.parse(BasicUserJsonParser.java:23)
at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.getOptionalField(IssueJsonParser.java:351)
at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parse(IssueJsonParser.java:266)
at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parse(IssueJsonParser.java:90)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient$1.call(AbstractJerseyRestClient.java:111)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:68)
... 18 more
0 votes
pradit.parttime
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 19, 2020

Very Thanks, guys!

0 votes
Ducu Sultan February 19, 2020

Guys, I am trying to rebuild the JRJC library with the patch above (thank you for that), however, I am receiving this mvn error:

Failure to find com.atlassian.maven.plugins:artifactory-staging-maven-plugin:jar:1.0.3 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

Any idea what I can do here? 

Clément
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 19, 2020
<repositories>
<repository>
<id>atlassian-public</id>
<url>https://packages.atlassian.com/maven-external</url>
</repository>
</repositories>

& same for plugins

Like wwerner likes this
Alexandru Giurovici
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 19, 2020

You don't have the correct plugin repositories. 

 

<repositories>
<repository>
<id>atlassian-public</id>
<url>https://m2proxy.atlassian.com/repository/public</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>atlassian-public</id>
<url>https://maven.atlassian.com/repository/public</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<updatePolicy>never</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
Like wwerner likes this
Ducu Sultan February 19, 2020

Thanks, guys!

Like wwerner likes this
0 votes
App_Umane
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 17, 2020

hello my comrade,

 

I am having the same problem, i m relieved that the problem is not only mine.

 

i am using the version 4.0.0

 

<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>4.0.0</version>
</dependency>

 

 

 

Please help.

wwerner
Contributor
February 18, 2020

See the patch mentioned in this thread.

Like Dario B likes this
0 votes
Robinwchahal February 17, 2020

I'm getting the same problem using version 5.1.6 of 

jira-rest-java-client-core
Stefan C.
Contributor
February 20, 2020
jira-rest-java-client

still needs to be merged:

https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93

0 votes
Thomas Deiler
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2020

Dear @Kuba_Janus ,

either it's a bug that went live with constant cloud deployment or the REST API changed. Have you tried to download the latest version of Atlassian's Jira-Java-Client?

So long

Thomas

Craig Rodrigues
Contributor
February 18, 2020

@Thomas Deiler This fix https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93/jrjc-240-added-support-for-accountid/diff needs to be merged to jira-rest-java-client.

That library is used all over the place, so without fixing that library, many things which access JIRA Cloud are now broken.

The latest release of jira-rest-java-client which is 5.16 does not have this fix, and is broken with the current API change.  So this needs to be fixed and a new library needs to be released.

Like # people like this
wwerner
Contributor
February 18, 2020

Works like a charm for me.

Suggest an answer

Log in or Sign up to answer