In redmine plugin get issues update note

Added by Henrry parth 3 months ago

i want to develop a redmine plugin about manage project. But I can not find out that how to get issues update notes. is there any API to get this message?

Replies (2)

RE: In redmine plugin get issues update note - Added by Guillermo ML 3 months ago

There is some information in Rest_Issues, more precisely Rest_IssueJournals

RE: In redmine plugin get issues update note - Added by Mayama Takeshi 3 months ago

As Guillermo pointed out, you should search about Issue Journals.
However, depending on how your plugin will work, you don't need to use the REST API.
I usually use the REST API when I have an external application integrating with Redmine.

But in case of a plugin, usually you would just access the elements inside redmine using the facilities provided by rails/ActiveRecord.
For example, if you need to get Issue 123 you would use something like this:

   issue = Issue.find(123)

Then, once you have the issue, you can call a method to obtain the journals (changes, which includes the notes/comments).
But I never had to do this so I don't know the method name, but the usual suspect would be:
  issue.journals()

I think, you would only use the REST API with a plugin if you are injecting code in the client-side (browser) and it needs to obtain/manipulate elements at the server.

(1-2/2)