onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

P#52107 Allow sorting by all fields : gaps in the implementation #152

Closed michaelarnold-dev closed 2 years ago

michaelarnold-dev commented 2 years ago

@tung-le-esg We found some bugs in the mentioned project. Could you please analyse?

1.) If "Sort by user selection" is unchecked, the old dropdown with fixed field selection is shown for "sort by", not the required new text field with selection of all fields. 2.) The text search does not find all active fields, e.g. year of construction (Baujahr) or floor (Etage) are missing. 3.) The order of the fields under "Popular" is not as in the specification screenshot. The field "Number of bathrooms" is missing in "Popular". 4.) In my case there are only 3 fields under "All", but there are many more fields active. All fields should be displayed under "All" that are not under "Popular". 5.) In order for the default sort to be current, the view must be reloaded first, if sort by user selection is on. Default sorting should be updated directly after "Save changes", if you have made changes in "Sort by".

Feedback: 1.) fixed 2.) not fixed 3.) Sorting not fixed. "Number of bathrooms" is there. 4.) not fixed 5.) not fixed. "Standard sort" option is broken. No values in the dropdown.

tung-le-esg commented 2 years ago

@jayay I have some feedback for these issues: 2): The old logic came with fixed fields in sort by input, so we will change it to dynamic to add more active fields. 3): The number of bathrooms must be active for selectability. 4): Fields in the Popular section will be fixed as the list in the requirement, the rest field will be placed in the All section like following fields:

5): It works on our side.

I'm fixing these issues and after finishing I notify you as soon as possible. Thank you.

NickDGNack commented 2 years ago

@tung-le-esg We have tested the points and the following further feedback

1.) The setting "Sort by" is now double. See screenshot Sort_by.png. 2.) Sometimes fields at "Standard Sort" are selectable, although not selected in "Sort by". Sometimes nothing is selectable in "Standard Sort", although fields are selected in "Sort by". "Standard Sort" in connection with "Sort by" does not work correctly. See video 2022-03-25_16-19-52.mp4. 3.) After setting a sort option, a fatal error comes up when entering the estate list, a sorting error. The error is known, I already had it with other project. I can't continue testing until this error is fixed.

Fatal error: Uncaught TypeError: Argument 1 passed to Sort_by

https://user-images.githubusercontent.com/84010675/160400989-cb88cbed-3ccf-4b4d-b908-58178dfa2fa1.mp4

onOffice\WPlugin\Controller\SortList\SortListTypes::getSortOrderMapping() must be of the type int, string given, called in /www/htdocs/w01b9fbd/wpptest.onofficeweb.com/htdocs/wp-content/plugins/onoffice/plugin/Model/FormModelBuilder/FormModelBuilderDBEstateListSettings.php on line 513 and defined in /www/htdocs/w01b9fbd/wpptest.onofficeweb.com/htdocs/wp-content/plugins/onoffice/plugin/Controller/SortList/SortListTypes.php:71 Stack trace: #0 /www/htdocs/w01b9fbd/wpptest.onofficeweb.com/htdocs/wp-content/plugins/onoffice/plugin/Model/FormModelBuilder/FormModelBuilderDBEstateListSettings.php(513): onOffice\WPlugin\Controller\SortList\SortListTypes::getSortOrderMapping('', 'ASC') #1 /www/htdocs/w01b9fbd/wpptest.onofficeweb.com/htdocs/wp-content/plugins/onoffice/plugin/Gui/AdminPageEstateListSettings.php(101): onOffice\WPlugin\Model\FormModelBuilder\FormModelBuilderDBEstateListSettings->createInputModelSortByDefault() #2 /www/htdocs/w01b9fbd/wpptest.onofficeweb.com/htdocs/w in /www/htdocs/w01b9fbd/wpptest.onofficeweb.com/htdocs/wp-content/plugins/onoffice/plugin/Controller/SortList/SortListTypes.php on line 71

LongTrong-exe commented 2 years ago

@NickDGNack Thanks, bugs 1), 3) will be fixed by me as soon as possible. As for 2), "Standard Sort" is only updated after you save and reload the page, it will be fixed when #160 is released.