alphanodes / additionals

Redmine plugin for easy customization of settings, text and content display by using personal or role-based dashboards (drag&drop), providing wiki macros and act as library for other plugins.
https://www.redmine.org/plugins/additionals
GNU General Public License v2.0
132 stars 43 forks source link

Issue macro with NOTE_ID displays wrong comment, when issue has private notes #67

Closed drakosu closed 4 years ago

drakosu commented 4 years ago

In some cases, {{Issue macro}} displays 'N/A' or unexpected comment.

After further look, this happens to issues have private notes. NOTE_ID displayed by my redmine instance is the number to complete note list; However when giving NOTE_ID to {{Issue macro}}, it use NOTE_ID as number to a note list without private notes.

https://github.com/AlphaNodes/additionals/blob/190473b49c1b25bccdc064d877e1add387d2bf4c/lib/additionals/helpers.rb#L49-L51

Is there any reason for {{Issue macro}} to ignore private note?

drakosu commented 4 years ago

By the way, {{issue macro}} displays correct notes if I remove line 50.

alexandermeindl commented 4 years ago

I added support for private comments. Just removing this line is not a good idea, because anybody could see all private comments without permissions. I took care of this.

drakosu commented 4 years ago

Understand. For user familiar with the macro, can spy private note. My users take no use to the macro, so I previously wasn't aware of the risk.

Many thanks for your time checking the issue and updating codes. These codes are great and work good!