? Pending

User tests: Successful: Unsuccessful:

avatar Quy
Quy
13 Jul 2020

Closes #30073.

Summary of Changes

Fix draggable sorting

Testing Instructions

Go to Content > Fields
Create fields
Click Ordering header
Drag rows to sort
Create field groups
Click Ordering header
Drag rows to sort
Assign fields to field groups
Drag rows to sort within field groups

Actual result BEFORE applying this Pull Request

Sortable in last position only

Expected result AFTER applying this Pull Request

Sortable in any positions

avatar Quy Quy - open - 13 Jul 2020
avatar Quy Quy - change - 13 Jul 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Jul 2020
Category Administration com_fields
avatar Quy Quy - change - 13 Jul 2020
The description was changed
avatar Quy Quy - edited - 13 Jul 2020
avatar Quy Quy - change - 13 Jul 2020
The description was changed
avatar Quy Quy - edited - 13 Jul 2020
avatar ceford ceford - test_item - 14 Jul 2020 - Tested unsuccessfully
avatar ceford
ceford - comment - 14 Jul 2020

I have tested this item ? unsuccessfully on b44e874

Can sort within field group but the sorting behaviour is still not as required. I have 5 fields, 1 not in a group, 1 and 3 in named groups. The individual items I can only drag to the bottom of the list. I believe I should be able to sort the individual items irrespective of their groups.


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

avatar Quy
Quy - comment - 14 Jul 2020

Is sorting an issue with Fields only or with other components too?

avatar Quy Quy - change - 14 Jul 2020
Labels Added: ?
avatar Quy
Quy - comment - 14 Jul 2020

Can you provide a screenshot of the fields so I can see what you are trying to do?

avatar ceford
ceford - comment - 14 Jul 2020

Here is a case where I have ordered fields crossing groups but I can only do it by dragging down.
image
I assumed that selecting order despite group is the expected behaviour.

avatar Quy
Quy - comment - 14 Jul 2020

For the first field, there are no other fields without a field group assigned to sort against.
Yes, it allows you to sort by dragging to the bottom, but essentially, it is still the same position.

For the More Info group, you can sort fields within this group without dragging to the bottom.

Click on the Filter Options.
Filter on Flower data group.
There is only one entry so no sorting possible.
Basically, this is the same scenario with Latin name field.

avatar ceford
ceford - comment - 14 Jul 2020

The sort order in the fields list affects the display order in the front end. Examples before and after changing order:
image

image

avatar Quy
Quy - comment - 14 Jul 2020

It could be related to this issue #23905. This PR fixes the dragging to the bottom only.

avatar Quy
Quy - comment - 14 Jul 2020

Is the latest screenshot a result of this PR?

avatar ceford
ceford - comment - 14 Jul 2020

No - the screenshots were without the patch. But with the patch it makes no difference - I can drag anything to the bottom of the list but only a group member upwards to within its group.

avatar brianteeman
brianteeman - comment - 14 Jul 2020

I would not expect to be able to sort into a group. Just as you can not sort into a category etc

avatar ceford
ceford - comment - 14 Jul 2020

I would not expect to be able to sort into a group. Just as you can not sort into a category etc

But articles, users and contacts don't offer sorting by category!

avatar brianteeman
brianteeman - comment - 14 Jul 2020

oh yes they do

keyb

avatar ceford
ceford - comment - 15 Jul 2020

I am still baffled! With the patch applied, referring to my illustration above, I can drag any member of the More Info group up or down within its group. I can drag any field to the bottom of the list as illustrated. If I drag the ungrouped item or the Flower data group item to the bottom of the list I can't drag it up again. Is this the desired behaviour? Or even desirable behaviour?

I am revising the Help screens for Fields and Field Groups so I really need to understand it all myself. As I see it, the Field Group order just controls the Tab order in the data entry form and has no effect in the front end. The Field order affects the order within the data entry tab and the display order in the front end. Is that right?

avatar ceford
ceford - comment - 15 Jul 2020

By way of illustration, I just removed the patch and decided to put the Fields in the correct order. I had to move each one individually to the bottom of the list. Not too tedious with 5, but imagine doing it with 10 or 20 and making a mistake.


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

avatar brianteeman
brianteeman - comment - 15 Jul 2020

As I see it, the Field Group order just controls the Tab order in the data entry form and has no effect in the front end.

No. It also controls the order in the front end

The Field order affects the order within the data entry tab and the display order in the front end.

Yes

avatar ceford
ceford - comment - 15 Jul 2020

As I see it, the Field Group order just controls the Tab order in the data entry form and has no effect in the front end.

No. It also controls the order in the front end

That seems to be not the case. In a fresh test these are my field groups:

image

And the Latin name field is not in a group so appears in the Fields tab. This is my Fields order:

image

And this is the front end rendering:

image

So the front-end order seems to be controlled only by the Field order.

The Field order affects the order within the data entry tab and the display order in the front end.

Yes

Agree!

avatar Quy
Quy - comment - 15 Jul 2020

I had to move each one individually to the bottom of the list. Not too tedious with 5, but imagine doing it with 10 or 20 and making a mistake.

Use Filter Options to select the desired field group to display applicable fields. With this PR, you can drag and drop within the group and not to the bottom only.

In other words, filter the list to exclude fields not relevant to the field group so you don’t have to interact with them.

avatar ceford
ceford - comment - 15 Jul 2020

Use Filter Options to select the desired field group to display applicable fields. With this PR, you can drag and drop within the group and not to the bottom only.

In other words, filter the list to exclude fields not relevant to the field group so you don’t have to interact with them.

That does not make sense. The Select Field Group drop-down list does not contain No Field Group and if I select Flower Data I cannot move it with respect to More Data. So I repeat: the order shown in the Fields list is the order displayed in the front end. We really need to be able to move any field up or down irrespective of field group.

avatar brianteeman
brianteeman - comment - 15 Jul 2020

We really need to be able to move any field up or down irrespective of field group.

No we dont - that makes no sense and defeats the objective of grouping the fields.

the order shown in the Fields list is the order displayed in the front end.

And that is correct.

With this PR the code is working correctly as designed and exactly how it is working in joomla 3

avatar brianteeman brianteeman - test_item - 15 Jul 2020 - Tested successfully
avatar brianteeman
brianteeman - comment - 15 Jul 2020

I have tested this item successfully on 7bc66cc


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

avatar bonzani bonzani - test_item - 15 Jul 2020 - Tested successfully
avatar bonzani
bonzani - comment - 15 Jul 2020

I have tested this item successfully on 7bc66cc


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

avatar ceford
ceford - comment - 15 Jul 2020

OK - I rethink my use of Fields and Field Groups to use them as designed, and document accordingly. Sorry for being such a pain!

avatar Quy Quy - change - 15 Jul 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-07-15 13:43:22
Closed_By Quy
avatar Quy Quy - close - 15 Jul 2020
avatar Quy Quy - merge - 15 Jul 2020
avatar jan-klima
jan-klima - comment - 30 Aug 2022

Hey guys, I know its old but it still doesnt work properly for me. I am on J4.1.5 and I can only drag all the way down + it doesnt save it. Resets position on reload...

Add a Comment

Login with GitHub to post a comment