Skip to content

Commit

Permalink
Merge branch 'pu/cw/fixEventTypeDefinedByFiter' into 'main'
Browse files Browse the repository at this point in the history
fix(Calendar): event event_types definedBy filter not working

See merge request tine20/tine20!6619
  • Loading branch information
corneliusweiss committed Feb 20, 2025
2 parents 7cd7c62 + ed4b97b commit 8d6156a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tine20/Calendar/js/EventEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Tine.Calendar.EventEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
width: 100,
// height: 30,
xtype: 'label',
text: this.app.i18n._('Event Type')
text: this.app.i18n._('Event Types')
}, {
flex: 1,
xtype:'tinerecordspickercombobox',
Expand Down
10 changes: 8 additions & 2 deletions tine20/Calendar/js/Model/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ const Event = Record.create(Record.genericFields.concat([
{ name: 'tags' },
{ name: 'notes'},
{ name: 'attachments'},
{ name: 'event_types'},
{ name: 'event_types', fieldDefinition: {config: {
// we need some fieldDef to get filter working
appName: 'Calendar',
modelName: 'EventTypes',
refIdField: 'record',
dependentRecords: true
}}},
//{ name: 'contact' },
//{ name: 'related' },
//{ name: 'resources' },
Expand Down Expand Up @@ -512,7 +518,7 @@ Event.getFilterModel = function() {
];

if (app.featureEnabled('featureEventType')) {
filter.push({filtertype: 'foreignrecord', linkType: 'foreignId', app: app, foreignRecordClass: 'Calendar.EventTypes', ownField: 'event_types', foreignRefIdField: 'eventType'});
filter.push({filtertype: 'foreignrecord', linkType: 'foreignId', app: app, ownRecordClass: 'Calendar.Event', ownField: 'event_types', foreignRecordClass: 'Calendar.EventTypes'});
}
if (Tine.Tinebase.featureEnabled('featureSite')) {
filter.push({filtertype: 'tinebase.site', app: app});
Expand Down

0 comments on commit 8d6156a

Please sign in to comment.