Merge pull request #2959 from emanuelschuetze/issue2954

Added missing topic text to agenda csv export (Fixed #2954).
This commit is contained in:
Emanuel Schütze 2017-02-15 20:18:01 +01:00 committed by GitHub
commit ae6496852e
3 changed files with 14 additions and 1 deletions

View File

@ -87,6 +87,16 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users'])
getAgendaTitle: function () { getAgendaTitle: function () {
return this.title; return this.title;
}, },
getCSVExportText: function () {
var text;
try {
text = this.getContentObject().getCSVExportText();
} catch (e) {
// when the content object is not in the DS store
// or 'getCSVExportText' is not defined return nothing.
}
return text;
},
// link name which is shown in search result // link name which is shown in search result
getSearchResultName: function () { getSearchResultName: function () {
return this.getAgendaTitle(); return this.getAgendaTitle();

View File

@ -26,7 +26,7 @@ angular.module('OpenSlidesApp.agenda.csv', [])
{ seconds: 'disabled', { seconds: 'disabled',
hours: 'enabled' }) : ''; hours: 'enabled' }) : '';
row.push('"' + (item.title || '') + '"'); row.push('"' + (item.title || '') + '"');
row.push('"' + (item.text || '') + '"'); row.push('"' + (item.getCSVExportText() || '') + '"');
row.push('"' + duration + '"'); row.push('"' + duration + '"');
row.push('"' + (item.comment || '') + '"'); row.push('"' + (item.comment || '') + '"');
row.push('"' + (item.is_hidden ? '1' : '') + '"'); row.push('"' + (item.is_hidden ? '1' : '') + '"');

View File

@ -21,6 +21,9 @@ angular.module('OpenSlidesApp.topics', [])
getAgendaTitle: function () { getAgendaTitle: function () {
return this.title; return this.title;
}, },
getCSVExportText: function () {
return this.text;
},
}, },
relations: { relations: {
belongsTo: { belongsTo: {