? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
18 Apr 2021

Batch copying a category allows to reverse order all articles in the selected categories. But categories are not only for articles. It can be anything. So this function should not be proposed to other components.

If someone is wondering if it really only works for articles, the code would be here:
https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_categories/models/category.php#L853
As you will see, it is hardcoded to com_content:

$query->update('#__content')
->set($db->qn('ordering') . ' = ' . $max . ' - ' . $db->qn('ordering'))
->where($db->qn('catid') . ' = ' . $db->q($id));

Summary of Changes

Make the "Reverse the ordering of all articles...." conditional to only show when we're in com_content categories.

Testing Instructions

Go to any categories manager (eg articles categories, banner categories, contact categories), select at least one category and then select "Batch" from the "Actions" dropdown.

Actual result BEFORE applying this Pull Request

Regardless if we're managing categories from com_content or com_contact (or any other component), it always offers to reorder the articles:
image

Expected result AFTER applying this Pull Request

The option only shows for com_content. In other components it isn't show.

Documentation Changes Required

None

avatar Bakual Bakual - open - 18 Apr 2021
avatar Bakual Bakual - change - 18 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2021
Category Administration com_categories
avatar sandramay0905 sandramay0905 - test_item - 19 Apr 2021 - Tested successfully
avatar sandramay0905
sandramay0905 - comment - 19 Apr 2021

I have tested this item successfully on 25905df

Reorder the articles is gone on categories:

avatar ChristineWk ChristineWk - test_item - 19 Apr 2021 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 19 Apr 2021

I have tested this item successfully on 25905df


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

avatar richard67 richard67 - change - 19 Apr 2021
Status Pending Ready to Commit
Labels Added: ?
avatar richard67
richard67 - comment - 19 Apr 2021

RTC


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

avatar chmst chmst - close - 19 Apr 2021
avatar chmst chmst - merge - 19 Apr 2021
avatar chmst chmst - change - 19 Apr 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-04-19 13:04:45
Closed_By chmst
Labels Added: ?
avatar chmst
chmst - comment - 19 Apr 2021

Thanks!

Add a Comment

Login with GitHub to post a comment