Skip to content

update issue #342

Open
Open

Description

@vvmsalat

Hi @alexeyOnGitHub & Co
How to update an issue with api 4? Like below i'm getting a NullPointerException in bean.Issue.update(). Same with issue.update();
This worked though in earlier versions.

issue.getCustomFieldByName("kontrolle").setValue("1");
issue.getCustomFieldByName("itf_datei").setValue(itf);
issue.setDescription(desc);
issue.setSubject(subject);
mgr.getIssueManager().update(issue);

thanks for help!

Activity

  1. vvmsalat commented on Feb 14, 2020

    @vvmsalat
    Author

    just when i gave up i reread the readme... i tried this and it works!
    Transport t = mgr.getTransport();'
    t.updateObject(issue);

    Last bit of section 'Set custom field value on issue' in readme has to be changed.

  2. alexeyOnGitHub commented on Feb 14, 2020

    @alexeyOnGitHub
    Member

    you are welcome to submit a PR with proposed docs changes. I can take a look then

  3. added a commit that references this issue on Mar 4, 2020
  4. marepop commented on Apr 15, 2020

    @marepop

    Hi, i cannot update the issue even with this workaround by using transport. The error is entity may not be null. There is no entity since this response returns a 204 no content (no body) but apache still throws this error.
    Any way to resolve this? issue.update() and t.updateObject(issue) both throw the same thing.

    Error happens here:
    return handler.processContent(httpResponse);
    because final String charset = HttpUtil.getCharset(entity); is called on null entity.

  5. hoehoe-tech commented on Oct 14, 2021

    @hoehoe-tech

    I think this problem caused by the same reason as #362 . So it has been modified from 4.0.0.rc4.
    I'm very thankful to @alexeyOnGitHub .

    Attention.
    In the following URL site written in README.md and this project's top page, the older version 4.0.0.preview.3 is introduced as the latest version. Maybe search.maven.org has a bug or something.
    https://search.maven.org/search?q=g:com.taskadapter%20AND%20a:redmine-java-api

    To get fixed version(4.0.0.rc4), I think we should access following URL.
    https://search.maven.org/artifact/com.taskadapter/redmine-java-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions