Merge pull request #3617 from emanuelschuetze/issue3614

Improved motion import/export (Fix #3614).
This commit is contained in:
Norman Jäckel 2018-03-04 20:59:24 +01:00 committed by GitHub
commit a30a30d72f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -76,8 +76,12 @@ angular.module('OpenSlidesApp.motions.csv', [])
// Submitters // Submitters
if (params.include.submitters) { if (params.include.submitters) {
var submitters = motion.submitters[0] ? motion.submitters[0].get_full_name() : ''; var submitters = [];
row.push('"' + submitters + '"'); angular.forEach(motion.submitters, function(user) {
var user_short_name = [user.title, user.first_name, user.last_name].join(' ').trim();
submitters.push(user_short_name);
});
row.push('"' + submitters.join('; ') + '"');
} }
// Category // Category

View File

@ -2119,7 +2119,8 @@ angular.module('OpenSlidesApp.motions.site', [
// submitter // submitter
if (motion.submitter && motion.submitter !== '') { if (motion.submitter && motion.submitter !== '') {
angular.forEach(User.getAll(), function (user) { angular.forEach(User.getAll(), function (user) {
if (user.short_name == motion.submitter.trim()) { var user_short_name = [user.title, user.first_name, user.last_name].join(' ').trim();
if (user_short_name == motion.submitter.trim()) {
motion.submitters_id = [user.id]; motion.submitters_id = [user.id];
motion.submitter = user.full_name; motion.submitter = user.full_name;
} }