Skip to content

Commit

Permalink
Merge branch '2023.11' into 2024.11
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Jan 10, 2024
2 parents 1692b35 + d667053 commit 62aff62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tine20/Tinebase/js/widgets/grid/ForeignRecordFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ Tine.widgets.grid.ForeignRecordFilter = Ext.extend(Tine.widgets.grid.FilterModel
this.metaDataForField = this.metaDataRecordClass.getModelConfiguration().isMetadataModelFor;
const metaDataForRecordConfig = _.get(this.metaDataRecordClass.getField(this.metaDataForField), 'fieldDefinition.config');
this.foreignRecordClass = Tine.Tinebase.data.RecordMgr.get(metaDataForRecordConfig.appName, metaDataForRecordConfig.modelName);
} else if (this.foreignRecordClass.getModelConfiguration()?.denormalizationOf) {
// denormalization -> filter for original model
this.denormalizationRecordClass = this.foreignRecordClass;
this.foreignRecordClass = Tine.Tinebase.data.RecordMgr.get(this.foreignRecordClass.getModelConfiguration().denormalizationOf);
} else {
// we have no api's to pick foreign records - and it makes no sense
this.operators = ['definedBy'];
Expand Down Expand Up @@ -681,7 +685,7 @@ Tine.widgets.grid.ForeignRecordFilter = Ext.extend(Tine.widgets.grid.FilterModel
case 'allOf':
//@TODO find it
var pickerRecordClass = this.foreignRecordClass;
if (this.foreignRefIdField) {
if (this.foreignRefIdField && !this.denormalizationRecordClass) {
// many 2 many relation
var foreignRecordConfig = _.get(this.foreignRecordClass.getModelConfiguration(), 'fields.' + this.foreignRefIdField + '.config');
pickerRecordClass = Tine.Tinebase.data.RecordMgr.get(foreignRecordConfig.appName, foreignRecordConfig.modelName);
Expand Down

0 comments on commit 62aff62

Please sign in to comment.