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

Note change generates wrong notification #38

Open
MayamaTakeshi opened this issue May 6, 2023 · 3 comments
Open

Note change generates wrong notification #38

MayamaTakeshi opened this issue May 6, 2023 · 3 comments

Comments

@MayamaTakeshi
Copy link
Owner

MayamaTakeshi commented May 6, 2023

Regarding #35 If user2 updates a note/comment created by user1, when it posts the request, the author of the note will be still user1, so notification will popup to user2 but not to user1.

This might not be much of an issue to user1 but user2 will be surprised to see a note saying user1 did the changes made by him/her.

Alternatives:

  1. do not report note changes at all
  2. assuming we get the post reply before we get the WebSocket notification, control suppression using a variable keeping the id of the last journal the user modified.
  3. maybe header X-issue-lock-version received in the post reply can be used to check if we should suppress notification
@MayamaTakeshi
Copy link
Owner Author

Checking the db schema:

MariaDB [redmine]> select * from journals limit 1;
+-----+----------------+------------------+---------+-------+---------------------+---------------------+---------------+---------------+
| id  | journalized_id | journalized_type | user_id | notes | created_on          | updated_on          | updated_by_id | private_notes |
+-----+----------------+------------------+---------+-------+---------------------+---------------------+---------------+---------------+
| 134 |              2 | Issue            |       1 | abc   | 2022-12-29 22:32:41 | 2022-12-29 22:32:41 |          NULL |             1 |
+-----+----------------+------------------+---------+-------+---------------------+---------------------+---------------+---------------+
1 row in set (0.000 sec)

So I think actually there is an error in the generation of the journal partial:
we should set updated_by_id and use this (if set) instead of user_id.
This should solve the issue.

@MayamaTakeshi
Copy link
Owner Author

This was solved by #39.

@MayamaTakeshi
Copy link
Owner Author

Reopened as we will rework on #39.

@MayamaTakeshi MayamaTakeshi reopened this May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant