Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I edit an exist journal? #381

Open
eunyeuny opened this issue Sep 25, 2023 · 0 comments
Open

How can I edit an exist journal? #381

eunyeuny opened this issue Sep 25, 2023 · 0 comments

Comments

@eunyeuny
Copy link

eunyeuny commented Sep 25, 2023

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 ..

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

No branches or pull requests

1 participant