You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the user belongs to a group and endorses an endorsable item both as herself and as the group, and after this removes the endorsement from herself, it also removes it from the group.
This happens both on 0.27 as well as in the redesign (0.28).
To Reproduce
Steps to reproduce the behavior:
Go to try.decidim.org
Login as a user that belongs to a group (e.g. the example admin)
Find a blog article anywhere on the site (e.g. inside a process)
When on the blog article page, click the "Endorse" button
Select endorsement for both: the user and the group
Remove the endorsement from the user (and the user only, leave group endorsement active)
Reload the page
Click the "Endorse" button again
See that the group endorsement has also disappeared
The behavior is slightly different between the current layout and the redesigned layout, as they reload the endorsements in the modal slightly differently. However, the actual backend behavior is exactly the same in both.
Expected behavior
When unendorsing an item as a user, I would expect the group endorsement to remain intact.
Screenshots
This is a screencap of the situation at try.decidim.org:
decidim-group-endorsement-disappear.mp4
Stacktrace
N/A
Extra data (please complete the following information):
Device: Laptop
Device OS: Ubuntu 22.04
Browser: Chrome
Decidim Version: 0.27, 0.28 (develop), probably previous versions too
Decidim installation: try.decidim.org (or any other)
Additional context
It was noted in a related discussion at #9852 that this behavior is coming from this line in the code:
Notice that even the group endorsement is bound to the user who initially did the endorsement. This means that the code line pointed out above also removes the group endorsement.
Describe the bug
When the user belongs to a group and endorses an endorsable item both as herself and as the group, and after this removes the endorsement from herself, it also removes it from the group.
This happens both on 0.27 as well as in the redesign (0.28).
To Reproduce
Steps to reproduce the behavior:
The behavior is slightly different between the current layout and the redesigned layout, as they reload the endorsements in the modal slightly differently. However, the actual backend behavior is exactly the same in both.
Expected behavior
When unendorsing an item as a user, I would expect the group endorsement to remain intact.
Screenshots
This is a screencap of the situation at try.decidim.org:
decidim-group-endorsement-disappear.mp4
Stacktrace
N/A
Extra data (please complete the following information):
Additional context
It was noted in a related discussion at #9852 that this behavior is coming from this line in the code:
decidim/decidim-core/app/commands/decidim/unendorse_resource.rb
Line 34 in db91cf3
The group endorsements look as follows in the database:
Notice that even the group endorsement is bound to the user who initially did the endorsement. This means that the code line pointed out above also removes the group endorsement.