Skip to content

How can I edit an exist journal? #381

Description

@eunyeuny

Hi,
I want to edit or delete an exist journal on my readmine, however,
issue.update() or issue.setNotes(note);
can only add a new notes to my issue...
I was searching and found the post(https://www.redmine.org/issues/10171)
: When the notes of the journal that does not have the associated journal_details are changed to empty, the journal record is deleted.
So I wrote the code like this
`RedmineManager mgr = RedmineManagerFactory.createWithApiKey(uri, apiAccessKey);
Transport transport = mgr.getTransport();

        Issue issue = mgr.getIssueManager().getIssueById(issueId, Include.journals);

        List<Journal> journalList = new ArrayList<>(issue.getJournals());

        for(Journal journal : journalList){
           if(journal.getId().equals(850180)){
                journal.setNotes("");
           }
        
        transport.updateObject(issue);`

but how to update jounal in issue?
jounal class doesn't implements Identifiable ...
so i don't know how to update jounal ..

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions