Skip to content

Conversation

@rolandinus
Copy link
Contributor

Summary

The setObjectIdsForTag method is missing event dispatching. This prevents apps from reacting
to tag changes when using the bulk tag assignment feature which was added with Nextcloud 31.
This creates a different beheaviour to when tags are assigend via the sidebar, where the assignTags and unassignTags methods are used which do dispatch the events.

This fix:

  • Calculates which objects are removed and which are added
  • Dispatches MapperEvent::EVENT_UNASSIGN for removed objects
  • Dispatches MapperEvent::EVENT_ASSIGN for added objects

Checklist

@rolandinus rolandinus requested a review from a team as a code owner March 22, 2025 19:15
@rolandinus rolandinus requested review from ArtificialOwl, provokateurin and yemkareems and removed request for a team March 22, 2025 19:15
@provokateurin provokateurin requested a review from skjnldsv March 22, 2025 20:33
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but didn't test.

@rolandinus rolandinus force-pushed the fix/dispatch-events-on-bulk-tagging branch from 2ba1dd6 to a842d91 Compare March 23, 2025 21:29
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, code looks good

@skjnldsv
Copy link
Member

/backport to stable31

@skjnldsv skjnldsv merged commit 2f7e72f into nextcloud:master Mar 25, 2025
179 of 188 checks passed
@welcome
Copy link

welcome bot commented Mar 25, 2025

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2025

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants