Project

General

Profile

Actions

Feature #42630

open

Introduce reaction feature to issues, notes, news, and forums

Added by Katsuya HIDAKA 26 days ago. Updated 4 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

This patch adds a reaction feature.

  • Adds reaction buttons to issues and notes, news and comments, and forum messages
  • Shows a tooltip with the names of users who reacted—up to 10 names, with the remaining number shown if there are more than 10
  • The feature is enabled by default and can be turned off in the administration settings

Please also refer to the following screenshots and GIF:

Background / Purpose

  • In my experience, there are many times on Redmine when I want to react to something without leaving a full comment. Reactions are now a common way to express appreciation, agreement, or support. I believe this feature will help encourage more interaction within Redmine.
  • Many modern project management tools like GitHub and Jira already support reactions. By adding this feature to Redmine, I believe it will help modernize the platform and promote its adoption.

Details

  • The icon used for reactions is thumb-up. This icon is commonly used to express appreciation, agreement, or support, and is widely adopted in tools similar to Redmine, such as GitHub, Jira, Asana, and Slack. Based on my experience, thumb-up is the most frequently used reaction icon in these tools.
  • Since reactions should be widely available by nature, this patch does not add a specific permission for them. Instead, access is controlled based on the following rules:
    • Add/Remove a reaction: Any logged-in user who can view the object (e.g., object.visible?(user) returns true)
    • View reaction button: Any user who can view the object

Implementation

  • To reduce memory usage and performance impact when displaying objects with many journals (such as issues), I implemented the feature to load only the minimum necessary data.
  • I confirmed that all tests, including system tests, pass.

You can also check the source code on GitHub:
https://github.com/hidakatsuya/redmine/tree/reaction-feature-dev

Performance

The following results were measured using rack-mini-profiler and memory_profiler when opening an issue detail page. The tested issue has 50 journals, each with reactions from 10 users. The Redmine instance is running the latest trunk on PostgreSQL in production mode.

Response Time (average of 5 runs) Memory Performance
Reactions Enabled 257ms Total allocated: 14490218 bytes (128483 objects)
Total retained: 2576895 bytes (7804 objects)
Reactions Disabled 214ms Total allocated: 11122428 bytes (96509 objects)
Total retained: 2064420 bytes (6036 objects)

Files

screenshot-forum.png (101 KB) screenshot-forum.png Katsuya HIDAKA, 2025-04-25 08:40
screenshot-issue.png (176 KB) screenshot-issue.png Katsuya HIDAKA, 2025-04-25 08:40
screenshot-news.png (103 KB) screenshot-news.png Katsuya HIDAKA, 2025-04-25 08:40
screenshot-setting.png (166 KB) screenshot-setting.png Katsuya HIDAKA, 2025-04-25 08:40
screenshot-tooltip-more-than-10-users.png (96.9 KB) screenshot-tooltip-more-than-10-users.png Katsuya HIDAKA, 2025-04-25 08:40
short-demo.gif (535 KB) short-demo.gif Katsuya HIDAKA, 2025-04-25 08:40
0001-Adds-reaction-feature-to-issues-news-and-forums.patch (28.1 KB) 0001-Adds-reaction-feature-to-issues-news-and-forums.patch Katsuya HIDAKA, 2025-04-25 08:40
0002-Adds-tests-for-reaction-feature.patch (31.4 KB) 0002-Adds-tests-for-reaction-feature.patch Katsuya HIDAKA, 2025-04-25 08:40
Add-reaction-feature.patch (56.1 KB) Add-reaction-feature.patch Katsuya HIDAKA, 2025-04-25 10:10
Add-reaction-feature.patch (57 KB) Add-reaction-feature.patch Includes partial fixes for the points raised in #note-8, along with some minor improvements Katsuya HIDAKA, 2025-05-01 03:47
Add-reaction-feature.patch (60.9 KB) Add-reaction-feature.patch Includes an update for “Prevent reactions in closed projects” in #note-9 Katsuya HIDAKA, 2025-05-02 10:50
screenshot-tooltip-with-non-visible-users.png (30.7 KB) screenshot-tooltip-with-non-visible-users.png Katsuya HIDAKA, 2025-05-06 11:59
Add-reaction-feature.patch (65 KB) Add-reaction-feature.patch Includes updates for “User visibility check in reactions” and "Return User objects instead of names" in #note-8 Katsuya HIDAKA, 2025-05-06 12:00
position-button-after.png (244 KB) position-button-after.png Katsuya HIDAKA, 2025-05-08 09:24
position-button-before.png (245 KB) position-button-before.png Katsuya HIDAKA, 2025-05-08 09:24
Add-reaction-feature.patch (65 KB) Add-reaction-feature.patch Includes a fix for the position of reaction buttons when Gravatar icons are enabled Katsuya HIDAKA, 2025-05-08 09:45
Add-handling-reactions-with-missing-user-associations.patch (1.42 KB) Add-handling-reactions-with-missing-user-associations.patch Katsuya HIDAKA, 2025-05-11 10:56
0001-Show-reaction-counts-and-user-names-only-for-reactions-visible-to-the-logged-in-user.patch (6.99 KB) 0001-Show-reaction-counts-and-user-names-only-for-reactions-visible-to-the-logged-in-user.patch Katsuya HIDAKA, 2025-05-14 04:10
0002-Improve-method-and-variable-naming-for-clarity-and-consistency.patch (6.28 KB) 0002-Improve-method-and-variable-naming-for-clarity-and-consistency.patch Katsuya HIDAKA, 2025-05-14 04:10
screenshot-tooltip-with-non-visible-users2.png (41.1 KB) screenshot-tooltip-with-non-visible-users2.png Katsuya HIDAKA, 2025-05-14 04:12
0003-Use-visible-for-method-names-for-consistency.patch (3.23 KB) 0003-Use-visible-for-method-names-for-consistency.patch Katsuya HIDAKA, 2025-05-15 03:30
update-reaction-style.diff (3.76 KB) update-reaction-style.diff Mizuki ISHIKAWA, 2025-05-16 01:49
screenshot 2025-05-16 8.51.05.png (65.2 KB) screenshot 2025-05-16 8.51.05.png Mizuki ISHIKAWA, 2025-05-16 01:51
Allow-reactions-to-journals-with-only-property-changes.patch (6.55 KB) Allow-reactions-to-journals-with-only-property-changes.patch Katsuya HIDAKA, 2025-05-16 12:16
screenshot-journal-without-notes2.png (59.8 KB) screenshot-journal-without-notes2.png Katsuya HIDAKA, 2025-05-16 12:17
screenshot-journal-without-notes1.png (86.2 KB) screenshot-journal-without-notes1.png Katsuya HIDAKA, 2025-05-16 12:17

Related issues

Related to Redmine - Feature #1011: Add voting to ticketsNew2008-04-07

Actions
Actions #1

Updated by Katsuya HIDAKA 26 days ago

The previously attached patches have conflicts, so I’m attaching a new patch, Adds-reaction-feature.patch, with the conflicts resolved. This patch includes both the implementation and test code. If there are any future conflict resolutions or updates, I will attach a new patch with the same filename.

Actions #2

Updated by pasquale [:dedalus] 26 days ago

+1

Actions #3

Updated by Kohei Nakamura 26 days ago

+1

Actions #4

Updated by Go MAEDA 25 days ago

  • Category set to UI
  • Target version set to Candidate for next major release

I strongly support adding a reaction feature to Redmine.

It would make it easy for users to show agreement or feedback with a simple click. Since a feature like this is common nowadays, even beginners can use it intuitively. This could help activate communication by making it easier to respond.

Currently, many users post "+1" comments on www.redmine.org to show their support for the issue. If we have a reaction feature, users can react without posting "+1" comments, helping keep discussions more focused.

The proposed patch allows administrators to disable reactions if they don't need them, so it won't negatively affect users who prefer not to use it.

Many modern tools like GitHub, Jira, Asana, and GitLab already offer reaction features. Without a similar feature, Redmine might be seen as lacking something important.

Actions #5

Updated by Mizuki ISHIKAWA 25 days ago

+1
After applying the patch, it looks really good!
The thumbs-up icon is very useful because it allows users to widely express positive reactions, such as agreement, appreciation, or confirmation, without having to leave a comment.
I would really love to have this feature available.

Actions #6

Updated by Go MAEDA 25 days ago

Actions #7

Updated by Go MAEDA 23 days ago

  • Target version changed from Candidate for next major release to 6.1.0

A feature like this has been requested repeatedly. You can see this from #1011, which was posted 17 years ago, and its related issues.

Let's include this long-awaited feature in 6.1.0. I am setting the target version to 6.1.0.

Actions #8

Updated by Holger Just 23 days ago

Thank you for this proposal!

I do have some random remarks. Sorry for the brevity.

  • We may need to check user visibility in the list of users who reacted to an object and only include users visible to User.current. As anyone can react, this may expose non-visible users otherwise. For that, it may be possible to introduce Reaction.visible scope or some other way to filter users.
  • I'm not a fan of returning final user names in Redmine::Reaction::Reactable#reaction_user_names. I think we should return actual User objects here rather than names (and thus rename the method). The consumer should then format the user appropriately on the view/helper or e.g. the API. This also applies to Reaction.users_map_for_reactables
  • In the ReactionsController, we should first check require_login, followed by check_enabled to avoid leaking the setting value to anonymous users.
  • The ReactionsController probably needs to check the request format and handle non-js requests. See #39894 for a similar issue.
  • In the reaction_text_enabling_reactions translation, we probably don't want to spell out the list ob objects one can react to so that this list does not become outdated or incomplete if we or plugins later extend the list. This should be more generic.
  • The reactions should also be included in the API responses for issues, messages, ..., possibly behind an include flag

Some suggested feature work:

  • Add a column and a filter for the IssueQuery to filter issues which the current user (or some other user?) has reacted to. This can be similar to the watcher column / filter.
    • A sortable column containing the number of reactions may be helpful.
    • For larger projects, a column/filter with some definition of of "recent" reactions might also help.
  • Maybe add a set of permissions to control who can react and who can see reactions. These permissions probably need to be per object type (i.e. separate permissions for issues and forum posts). At least a "can react" permission would be helpful.
  • A useful (later) extension may be to add negative reactions (or something like a set of possible emoji reactions, some of which may be positive or negative). While this may still need additional refinements, the design should probably allow this as a future extension.
  • A user may (optionally?) want to be notified when someone reacts to one of their posts.
Actions #9

Updated by Holger Just 23 days ago

One additional issue:

It must not be possible to react to objects in closed projects. This may require specific checks as the view permissions are still granted here, while changes must not be possible anymore.

Edit: This and similar issues may be solved by introducing new "View reactions" (read-only) and "React" (write) permissions, similar to the various watcher permissions. If desired, we could add a migration which sensibly grants these permissions to existing roles, e.g. mirroring the watcher permissions of the respective role.

Actions #10

Updated by Katsuya HIDAKA 20 days ago

Holger Just
I appreciate your review of this patch. Please find my responses below.

In the ReactionsController, we should first check require_login, followed by check_enabled to avoid leaking the setting value to anonymous users.

You're absolutely right. I will fix this.

The ReactionsController probably needs to check the request format and handle non-js requests. See #39894 for a similar issue.

I don't think the issue described in #39894 would occur, as the actions in the ReactionsController require authentication. However, explicitly indicating that the controller expects only JS format requests improves code readability. Therefore, I will modify the controller to return a 404 response for non-JS requests.

In the reaction_text_enabling_reactions translation, we probably don't want to spell out the list of objects one can react to so that this list does not become outdated or incomplete if we or plugins later extend the list. This should be more generic.

I agree. The description was intended to help explain the features reactions can be used with, but it's merely supplementary and not essential. Based on your feedback, I will remove the description from the setting.

The reactions should also be included in the API responses for issues, messages, ..., possibly behind an include flag

I suggest we leave it out of the scope of this patch for now and only consider it when there is a concrete proposal or demand for API integration, including discussions around the API specification. The reasons are:

  • We need to discuss both the necessity and the design of API support.
  • Keeping the scope of this patch minimal will help facilitate focused discussions and reviews.

I will respond to the following points separately, but I will at least address the first one in an upcoming update:

  • We may need to check user visibility in the list of users who reacted to an object and only include users visible to User.current. As anyone can react, this may expose non-visible users otherwise. For that, it may be possible to introduce Reaction.visible scope or some other way to filter users.
  • I'm not a fan of returning final user names in Redmine::Reaction::Reactable@reaction_user_names. I think we should return actual User objects here rather than names (and thus rename the method). The consumer should then format the user appropriately on the view/helper or e.g. the API. This also applies to Reaction.users_map_for_reactables

I've uploaded a new patch that includes the above changes along with some additional improvements. The file name remains Add-reaction-feature.patch. If you would like to test the patch locally, please use the version with the most recent upload date. You can also view the detailed diff on GitHub here:
https://github.com/hidakatsuya/redmine/compare/master...hidakatsuya:redmine:reaction-feature-updates

The changes included in this patch are as follows:

  • Explicitly handle only JS format requests
  • Check login status first to prevent configuration leakage
  • Remove setting description to avoid inconsistencies if the scope of the feature changes
  • Add a readonly style to reaction buttons
  • Fix an incorrect expected value in the helper test
  • Fix an issue where reaction button positions shifted when zooming in or out
Actions #11

Updated by Go MAEDA 20 days ago

Thank you, Holger Just, for your review. And thank you, Hidaka Katsuya, for quickly updating the patch.
The table below summarizes the points raised in Holger Just’s review and how those have been addressed.

Findings in the review Mentioned in Status Handled in
User visibility check in reactions #note-8
Return User objects instead of names #note-8
Enforce login before checking setting #note-8 ✅️ #note-10
Explicitly handle only JS format requests #note-8 ✅️ #note-10
Use generic text for reaction targets #note-8 ✅️ #note-10
Include reactions in API responses #note-8 ✅️ (Future consideration) #note-10
Prevent reactions in closed projects #note-9
Actions #12

Updated by Katsuya HIDAKA 20 days ago

Thank you for summarizing the list of points and their current status.

Prevent reactions in closed projects

I had overlooked this point. I’ll take care of this as well.

Actions #13

Updated by Katsuya HIDAKA 19 days ago

Prevent reactions in closed projects (#note-9)

I've addressed this point and attached an updated patch. The changes are as follows:

  • In closed projects, reaction buttons are always displayed in a read-only state, just as they are for anonymous users.
  • Rather than adding a dedicated permission, I extracted the logic for determining read/write access for reactions into separate methods for clarity.

You can view the detailed diff of the updated patch on GitHub:
https://github.com/hidakatsuya/redmine/compare/master...hidakatsuya:redmine:reaction-feature-updates

Actions #14

Updated by Go MAEDA 15 days ago

Katsuya HIDAKA wrote in #note-13:

Prevent reactions in closed projects (#note-9)

I've addressed this point and attached an updated patch. The changes are as follows:

  • In closed projects, reaction buttons are always displayed in a read-only state, just as they are for anonymous users.

Thank you for submitting the updated patch. I confirmed that reaction buttons are not clickable in closed projects.

Findings in the review Mentioned in Status Handled in
User visibility check in reactions #note-8
Return User objects instead of names #note-8
Enforce login before checking setting #note-8 ✅️ #note-10
Explicitly handle only JS format requests #note-8 ✅️ #note-10
Use generic text for reaction targets #note-8 ✅️ #note-10
Include reactions in API responses #note-8 ✅️ (Future consideration) #note-10
Prevent reactions in closed projects #note-9 ✅️ #note-13
Actions #15

Updated by Katsuya HIDAKA 15 days ago

User visibility check in reactions #note-8
Return User objects instead of names #note-8

I have updated the patch to hide the names of users who are not visible to the current user (i.e., users not included in User.visible(User.current) ) in the tooltip for reaction users. Instead of showing their names, it now displays a summary like "and 2 others".

Along with this, I refactored the implementation for retrieving reaction data for each object to improve performance (faster response time, reduced memory usage, and better scalability). As part of this change, the reaction data now returns full user objects instead of just user names.

You can view the updated patch diff below:

Apologies for the delay. With this update, I believe all the feedback has now been addressed.

Here is the latest performance comparison. These results are based on opening an issue detail page containing 50 notes (journals), each with 10 reactions. Note that the measurements were taken on a different machine from the one used in the original issue description.

Response Time (avg of 10 runs) Memory Performance
Reactions Enabled 192.7ms Total allocated: 17,659,361 bytes (141,695 objects)
Total retained: 870,207 bytes (5,175 objects)
Reactions Disabled 177.0ms Total allocated: 15,177,064 bytes (123,623 objects)
Total retained: 798,191 bytes (4,544 objects)

The tools and scripts used for this benchmark can be found here .

Detailed Response Time Measurements

Actions #16

Updated by Katsuya HIDAKA 13 days ago

I found an issue where reaction buttons on issues shift downward when Gravatar icons are enabled. I've attached an updated patch that fixes this problem.

Before fix:

After fix:

You can view the detailed diff of the updated patch on GitHub:
https://github.com/hidakatsuya/redmine/compare/master...hidakatsuya:redmine:reaction-feature-updates

Actions #17

Updated by Go MAEDA 13 days ago

I have tested the newly updated patch in #note-16.

With the updated patch, all the comments in #note-8 and #note-9 have now been addressed.

User visibility check in reactions:

I have confirmed that users who reacted but are invisible to the current user are still included in the count displayed as "and N others," even though their names are not shown. I believe this approach is reasonable because it is important to indicate that someone has reacted, and having different reaction counts depending on who is viewing would be confusing.

Return User objects instead of names:

The visible_users member of the Struct object returned by Redmine::Reaction::Reactable#reaction_detail can now be accessed to obtain the users objects.

Findings in the review Mentioned in Status Handled in
User visibility check in reactions #note-8 ✅️ #note-15
Return User objects instead of names #note-8 ✅️ #note-15
Enforce login before checking setting #note-8 ✅️ #note-10
Explicitly handle only JS format requests #note-8 ✅️ #note-10
Use generic text for reaction targets #note-8 ✅️ #note-10
Include reactions in API responses #note-8 ✅️ (Future consideration) #note-10
Prevent reactions in closed projects #note-9 ✅️ #note-13
Actions #18

Updated by Go MAEDA 10 days ago

  • Subject changed from Add reaction feature to Introduce reaction feature to issues, notes, news, and forums
  • Status changed from New to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch in r23755. Thank you for your great contribution.

Actions #19

Updated by Katsuya HIDAKA 10 days ago

Thank you for your commit.

I'm attaching a small patch to handle a corner case where a user associated with a reaction doesn't exist for some reason. Please review and commit this additional change.

Actions #20

Updated by Holger Just 9 days ago

Go MAEDA wrote in #note-17:

User visibility check in reactions:

I have confirmed that users who reacted but are invisible to the current user are still included in the count displayed as "and N others," even though their names are not shown. I believe this approach is reasonable because it is important to indicate that someone has reacted, and having different reaction counts depending on who is viewing would be confusing.

I'm not sure I concur in this approach. I can easily think of cases such as a client-facing development environment, where the mere fact that someone has reacted may divulge too much information. In about all other areas of Redmine, we always take only visible information into account (sometimes under great pains) to avoid showing data the current user can't see. This included e.g. sums of logged times, issue statistics, ... Here, it is intentional and accepted that users with limited permissions may not see all possible data.

As such, I would like to vote to change this again to ONLY show reaction details of users which are visible to User.current and to remove the "and N others" part for non-visible users.

Actions #21

Updated by Katsuya HIDAKA 7 days ago

I appreciate your feedback.

Holger Just wrote in #note-20:

I can easily think of cases such as a client-facing development environment, where the mere fact that someone has reacted may divulge too much information. In about all other areas of Redmine, we always take only visible information into account (sometimes under great pains) to avoid showing data the current user can't see.

I understand and agree with your point. I've attached a patch that changes the behavior so that reaction details (number and usernames) are shown only for users visible to the currently logged-in user. I would be grateful if you could review it and consider committing it.

With this patch applied, the case described in #note-15 would be displayed as follows:

Actions #22

Updated by Katsuya HIDAKA 7 days ago

Just to add to my previous comment:

I've confirmed that all tests pass after applying the patch in #note-21.
https://github.com/hidakatsuya/redmine/actions/runs/15010453715

I also verified that there is no negative impact on performance compared to the result shown in #note-15.

Response Time (avg of 10 runs) Memory Performance
Reactions Enabled 171.2ms Total allocated: 17617686 bytes (138426 objects)
Total retained: 817127 bytes (4709 objects)
Reactions Disabled 164.8ms Total allocated: 15531053 bytes (123940 objects)
Total retained: 750399 bytes (4123 objects)
Actions #23

Updated by Holger Just 7 days ago

Thanks! The 0001 patch should work to not leak non-visible details anymore.

In your 0002 patch however, you rename your visible methods to viewable. This seems unexpected. Redmine generally uses visible and visible? methods rather than viewable. The change from writable to editable is fine however as the term is already used in various other places.

Actions #24

Updated by Katsuya HIDAKA 6 days ago

Thank you for the clarification. I've attached patch 0003, which keeps the method name as visible? for consistency.

When committing, please fixup patch 0003 into patch 0002 before committing.

I’ve confirmed that all tests pass after applying this patch:
https://github.com/hidakatsuya/redmine/actions/runs/15033005022

Actions #25

Updated by Go MAEDA 6 days ago

Holger Just, thank you for reviewing the patch in detail. And Katsuya HIDAKA, thank you for improving the feature.

I have committed the patches attached in #note-21 and #note-24 in r23768 and r23769.

Actions #26

Updated by Mizuki ISHIKAWA 5 days ago

I have attached a patch to improve the appearance of the reaction buttons.
  • Emphasize the presence of reactions by hiding the count when the number of reactions is 0.
  • Emphasize the presence of reactions by making the reaction count bold.
  • Prevent the underline from appearing below the reaction count on :active and :hover states of the reaction button.

This patch was created with advice and reviews from Katsuya HIDAKA.

Actions #27

Updated by Go MAEDA 5 days ago

Mizuki ISHIKAWA wrote in #note-26:

I have attached a patch to improve the appearance of the reaction buttons.

Committed the patch submitted in #note-26 in r23778.

Applying the style you suggested made it easier to see whether reactions are present. Thank you.

Actions #28

Updated by Katsuya HIDAKA 5 days ago

I've attached a patch to display reaction buttons for journals without notes (i.e., journals that only show property changes). The reasons are as follows:

  • It improves UI consistency by showing reaction buttons on all journals for an issue.
    • When journals with and without reaction buttons appear side by side (e.g., in the History tab), the inconsistency may be confusing to users.
    • Currently, if a journal with a note is edited and the note is cleared, the reaction button disappears — this behavior may be unintuitive.
  • Even for journals without notes, users might want to react — for example, to express appreciation or say "well done" when an issue is closed.

History tab:

Property changes tab:

I've verified that all tests pass with this patch:
https://github.com/hidakatsuya/redmine/actions/runs/15063217744

Actions #29

Updated by Go MAEDA 4 days ago

Katsuya HIDAKA wrote in #note-28:

I've attached a patch to display reaction buttons for journals without notes (i.e., journals that only show property changes).

Committed the patch in r23781. Thank you.

Actions

Also available in: Atom PDF