[BUGFIX] Records with same UID but different tables are not shown
authorOliver Hader <oliver@typo3.org>
Mon, 5 Mar 2012 21:45:13 +0000 (22:45 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Tue, 6 Mar 2012 06:30:55 +0000 (07:30 +0100)
Records with same UID but different tables are not shown in the
Workspace Module. The ExtJS setting "idProperty" needs to point
to a unique value.

Change-Id: I4f8fa7a619b0617df472cde0b150fce7eca4e0fe
Fixes: #34546
Releases: 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/9398
Reviewed-by: Wouter Wolters
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/workspaces/Classes/Service/GridData.php
typo3/sysext/workspaces/Resources/Public/JavaScript/Store/mainstore.js
typo3/sysext/workspaces/Resources/Public/JavaScript/component.js

index 13725fd..88cd94d 100644 (file)
@@ -116,6 +116,7 @@ class Tx_Workspaces_Service_GridData {
                                        $viewUrl =  Tx_Workspaces_Service_Workspaces::viewSingleRecord($table, $record['t3ver_oid'], $origRecord);
 
                                        $pctChange = $this->calculateChangePercentage($table, $origRecord, $versionRecord);
+                                       $versionArray['id'] = $table . ':' . $record['uid'];
                                        $versionArray['uid'] = $record['uid'];
                                        $versionArray['workspace'] = $versionRecord['t3ver_id'];
                                        $versionArray['label_Workspace'] = htmlspecialchars(t3lib_befunc::getRecordTitle($table, $versionRecord));
@@ -491,4 +492,4 @@ class Tx_Workspaces_Service_GridData {
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/Service/GridData.php'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/Service/GridData.php']);
 }
-?>
\ No newline at end of file
+?>
index 8396709..d425a5b 100644 (file)
@@ -34,7 +34,7 @@ TYPO3.Workspaces.Configuration.StoreFieldArray = [
 TYPO3.Workspaces.MainStore = new Ext.data.GroupingStore({
        storeId : 'workspacesMainStore',
        reader : new Ext.data.JsonReader({
-               idProperty : 'uid',
+               idProperty : 'id',
                root : 'data',
                totalProperty : 'total'
        }, TYPO3.Workspaces.Configuration.StoreFieldArray),
index 0ddbe1b..1686fca 100644 (file)
@@ -34,7 +34,7 @@ TYPO3.Workspaces.RowDetail.rowDataStore = new Ext.data.DirectStore({
        storeId : 'rowDetailService',
        root : 'data',
        totalProperty : 'total',
-       idProperty : 'uid',
+       idProperty : 'id',
        fields : [
                {name : 'uid'},
                {name : 't3ver_oid'},