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

[6.0] Added possibility to batch remove a tag #40613

Merged
merged 41 commits into from
Nov 13, 2024

Conversation

beni71
Copy link
Contributor

@beni71 beni71 commented May 17, 2023

Pull Request for Feature request #23185 .

Summary of Changes

In the articles view there is a batch action which can add/assign one tag from the tag list to the selected articles. This PR introduces the possibility to remove/unassign one tag from the selected articles. It also extends batch processing for categories, contacts and news feeds.

How it looks like:

articles-batch-tag-removing2

Testing Instructions

If you use patch tester, after applying the patch, call npm install from commandline to rebuild the .js files in folder media.

  1. Make sure your Joomla tag system is active and the plugin "Behaviour - Taggable" is enabled.
  2. Create a new article and in the detail view add/assign two tags, lets say "Tag1" and "Tag2".
  3. Save and create a second article, add/assign it to tag "Tag2" and "Tag3".
  4. Save and close.
  5. In the articles list select both articles, click batch action and remove "Tag2". Apply batch processing.
  6. Open the first article details and check whether the "Tag2" is removed. The tag "Tag1" must be still assigned.
  7. Open the second article details and check whether the "Tag2" is removed. The tag "Tag3" must be still assigned.
  8. A similar test should be done for categories, contacts and news feeds.

Actual result BEFORE applying this Pull Request

It is not possible to remove/unassign a tag from an article via batch processing.

Expected result AFTER applying this Pull Request

It is possible to remove/unassign a tag from an article via batch processing.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

There are new text keys that need to be translated.

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.0-dev labels May 17, 2023
@beni71 beni71 changed the title Added possibility to batch remove a tag [5.0] Added possibility to batch remove a tag May 17, 2023
@crommie
Copy link

crommie commented Aug 26, 2023

I have tested this item 🔴 unsuccessfully on d9bf8bf

Not yet, this throws

There is no "joomla.batch-tag-addremove" asset of a "script" type in the registry.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40613.

@beni71
Copy link
Contributor Author

beni71 commented Aug 27, 2023

Hi @crommie, thanks for testing.
I tested it again by installing patch tester on a fresh joomla installation version 5. After applying the patch the article view indeed displayed that error. After calling npm install from commandline it worked. This is needed to rebuild the .js files in folder media. I will update the testing instructions.

@crommie
Copy link

crommie commented Aug 28, 2023

OK in that case I can't re-test since I'm testing on a PBF server site.

@ceford
Copy link
Contributor

ceford commented Sep 14, 2023

I have tested this item ✅ successfully on ba2293d

Tested batch tag removal from articles, article categories, contacts and news feeds. All OK.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40613.

@alikon
Copy link
Contributor

alikon commented Sep 14, 2023

I have tested this item ✅ successfully on ba2293d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40613.

@alikon
Copy link
Contributor

alikon commented Sep 14, 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40613.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 14, 2023
@HLeithner HLeithner changed the title [5.0] Added possibility to batch remove a tag [5.1] Added possibility to batch remove a tag Sep 30, 2023
@HLeithner HLeithner changed the base branch from 5.0-dev to 5.1-dev September 30, 2023 22:50
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 5.1-dev.

@beni71
Copy link
Contributor Author

beni71 commented Oct 4, 2024

@softforge Thanks for helping me.
I have solved the last comment from @HLeithner by adding a new function postStore in the TagsHelper and deprecated the function postStoreProcess.

(if the message is not in before 6 then we cannot remove in 7)

Does it mean that I have to create a PR for the version 5.x as well? If so, shouldn't the deprecation messages be adapted to something like: deprecated 5.x will be removed in 7.0 ?

@Bodge-IT
Copy link

@beni71 yes you would need to get something in 5.* for deprecation in 7. As soon as we see a pr against 5.2, we can merge this one.

Thanks for the time and work on this. We can help test that and discuss with the RM for that release.

@beni71 beni71 closed this Oct 31, 2024
@beni71 beni71 deleted the beni71-23185 branch October 31, 2024 10:28
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Oct 31, 2024
@beni71 beni71 restored the beni71-23185 branch October 31, 2024 10:28
@beni71 beni71 reopened this Oct 31, 2024
@richard67
Copy link
Member

@softforge @Bodge-IT Meanwhile @beni71 has made a PR for 5.2-dev: #44383 . But as far as I understand your comments above, you just wanted to have the deprecation of the old method batchTag in 5.2-dev, not the complete change. Or did I get something wrong? The new PR #44383 seems to contain all changes from this PR here but not do anything with deprecation message. Could you check and advise?

@softforge
Copy link
Contributor

@softforge @Bodge-IT Meanwhile @beni71 has made a PR for 5.2-dev: #44383 . But as far as I understand your comments above, you just wanted to have the deprecation of the old method batchTag in 5.2-dev, not the complete change. Or did I get something wrong? The new PR #44383 seems to contain all changes from this PR here but not do anything with deprecation message. Could you check and advise?

You are right and I have commented on #44383
Thanks for spotting it

@Bodge-IT Bodge-IT added RTC This Pull Request is Ready To Commit and removed b/c break This item changes the behavior in an incompatible why. HEADS UP labels Nov 13, 2024
@Bodge-IT Bodge-IT added this to the Joomla! 6.0.0 milestone Nov 13, 2024
@Bodge-IT Bodge-IT merged commit 488e08e into joomla:6.0-dev Nov 13, 2024
3 checks passed
@Bodge-IT
Copy link

Appreciate all your work and patience on this @beni71. Finally merged.

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Nov 13, 2024
@HLeithner
Copy link
Member

please create a migration entry in the manual for 6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Required Feature Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-6.0-dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.