====== AIRS-3356 Multi-Sorting on Tables - Backend Part ====== ====== AIRS-3357 Multi-Sorting on Tables - New Widget ====== [[https://tasks.supplyon.de/browse/AIRS-3356|AIRS-3356 Multi-Sorting on Tables - Backend Part]] ([[https://doc.supplyon.de/display/S10058/Multi-Sorting+on+Tables+-+Backend+Part|In Confluence]]) See also: [[https://doc.supplyon.de/display/S10058/Multi-Sorting+on+Tables+-+Concept|Concept in Confluence]] (mockups) -> [[https://tasks.supplyon.de/browse/AIRS-3173|AIRS-3173 Multi-Sorting on Tables - Concept]] ===== Analyze ===== * Viktor: backend supports multisorting already, except of possibility to save the (multi?)sorting information in the table profile ==== Findings ==== * ''SuiTableScreen.getTableSort()'' takes only first element of Json array * ''SuiTableScreen.createSorterObject()'' doesn't take notice of sort order (aka "sort place", aka ''TSUI_COLCONFIG.CSORTORDER'') ===== Implement ===== * ... * Request to get list of all available columns ==== NLS keys ==== sui.profileselector.menuSorting=$$P$$Sorting... # Beschriftung vom Button, wenn keine Sorter gesetzt sind sui.profileselector.menuSortedByOne=$$P$$Sorted by {0} ({1}) # Beschriftung vom Button, wenn nur ein Sorter gesetzt ist sui.profileselector.menuSortedbyMany=$$P$$Sorted by {0} fields # Beschriftung vom Button, wenn mehrere Sorter gesetzt sind sui.sortingpanel.apply=$$P$$Apply sui.sortingpanel.fromAtoZ=$$P$$from A-Z sui.sortingpanel.fromZtoA=$$P$$from Z-A sui.sortingpanel.selectAnotherField=$$P$$Select another field to sort by sui.sortingpanel.sortBy=$$P$$Sort by sui.sortingpanel.thenBy=$$P$$then by ===== Misc ===== ==== Questions to Saskia ==== * Can we change the concept? -> No * [[https://docs.sencha.com/extjs/4.2.6/#!/example/build/KitchenSink/ext-theme-neptune/|Kitchen sink]], then click on Grids / Multiple Sort Grid (Also a plugin available: [[https://learnfromsaki.com/software/ext-grid-multisort-plugin/|Multisort plugin by Saki]]) ==== Questions to Burkhard / Frank ==== * Reusing for React.js * Burkhard: the backend part should not have big binding to ExtJS * Compatibility with new database sorting concept with cache * No one does really know what this means * The ''SuiTableConfigModel'' contains already a List of ''SuiColConfig'' models. These models have ''sortOrder'' and ''sortDirection''. It seems that we have the full information about sorting. * Yes. But only on this place. On other places the multi-sorting is not supported. For example... * How does the column menu work? * Remove the possibility to sort from the menu * How should the "Copying" work? The destination view can contain different columns. It will work only if all views have ALL columns. It can be true initially, but is it true after an update on table (e.g. new column was added). * Burkhard: Copying should work only for views, which have the same columns to sort. If the destination view does not have columns, listed for sorting in source view, an error message should be shown to the user. ==== Z_Misc ==== * Some views have bugs * ''MaterialListScreen'': * ''createSorter()'' **always** adds ''sorter.addFirstField(SASSorter.SO_CUSTOMER_MATERIAL_NUMBER)'' * fix it: * add column SO_CUSTOMER_MATERIAL_NUMBER to the default view profile * remove the code from the ''createSorter()'' method or overrride it * PO Details / Schedule lines (''???Screen''): * Seems that sorting is not saved in default profile * Views are saved in ''TSUI_COLCONFIG'' * To fake a second sorter : ''UPDATE TSUI_COLCONFIG set cSortOrder=2, CSORTDIRECTION='ASC' where CTABLECONFIGID=200723 and cColId='NCR_HEAD_STATUS'; ''