Project

General

Profile

Actions

Feature #45577

open

Possibility to sort records in TCEforms by label_userFunc labels

Added by most wanted over 11 years ago. Updated about 4 years ago.

Status:
New
Priority:
Must have
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2013-02-18
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Needs Decision

Description

You can use label_userFunc to display meaningful custom labels for each record of a table in TCEforms. At the moment it is not possible to sort the records by this custom labels.

$TCA['table_name']['ctrl']['sortby'] and
$TCA['table_name']['ctrl']['default_sortby'] do not work for this task.

It would be useful if you could sort records in TCEforms by label_userFunc labels.

Actions #1

Updated by Georg Ringer over 11 years ago

but how should this work? sorting works via mysql but with user defined labels it is impossible to know the title without rendering every one of them....

Actions #2

Updated by Markus Klein over 11 years ago

I guess we need manual post-processing in TCEforms

Actions #3

Updated by Thomas Mammitzsch over 10 years ago

no progress on this one? Would be interested too!

Actions #4

Updated by Mathias Schreiber over 9 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Mathias Schreiber

We need a solid concept for this.
Like Georg said, sorting takes place on a very very low level of the DB without any PHP logic involved.
Pulling PHP in between sounds like the most under-performing thing I could possibly imagine.

So in case there is a solid concept, I'm willing to dig into this.
Otherwise I'd just close this one down.

Actions #5

Updated by most wanted over 9 years ago

i still think this would be a useful feature. infact i think you could even call the current behaviour a bug: when an editor tries to sort by such a label it does not necessarily sort as expected by the editor.

i can understand the need for a solid concept. i myself could not find a clean solution back then, but i am not that much into the TYPO3 core.

my rough ideas involved additional database table fields (integer) solely used for sorting in the TYPO3 backend. those fields would be updated when necessary (asynchonously but as promptly as possible) in the background.

Actions #6

Updated by Alexander Opitz almost 9 years ago

  • Status changed from Needs Feedback to New
  • Target version deleted (6.1.0)
Actions #7

Updated by Susanne Moog almost 9 years ago

  • Sprint Focus set to PRC
Actions #8

Updated by Loon Buster over 5 years ago

  • Priority changed from Should have to Must have

hello.

..workaround:

1) add a column 'label' to your table.

2)

// .. Configuration/TCA/tx_table_xyz.php

'label_userFunc' => \MyVendor\MyExtension\Userfuncs\Tca::class . '->mylabel',
'default_sortby' => 'label',

3)

// .. Classes/Userfuncs/Tca.php > mylable

$parameters['title']=$newtitleXYZ;

if($_GET['edit'] & $parameters['row']){
   $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_table_xyz','(uid='.$parameters['row']['uid'].')',['label' => $parameters['title']]);
}

.loon

Actions #9

Updated by Benni Mack about 4 years ago

  • Sprint Focus changed from PRC to Needs Decision
Actions

Also available in: Atom PDF