Changeset 1736
- Timestamp:
- Apr 8, 2011, 4:03:23 PM (11 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/StudyWizardController.groovy
r1733 r1736 1316 1316 1317 1317 // First remove the publication that are not present in the array 1318 if( study.publications ) 1319 study.publications.removeAll { publication -> !publicationIDs.find { id -> id == publication.id } } 1318 if( study.publications ) { 1319 study.publications.findAll { publication -> !publicationIDs.find { id -> id == publication.id } }.each { 1320 study.removeFromPublications(it) 1321 } 1322 } 1320 1323 1321 1324 // Add those publications not yet present in the database … … 1333 1336 } else { 1334 1337 log.info('.no publications selected.') 1335 if( study.publications ) 1336 study.publications.clear() 1338 if( study.publications ) { 1339 study.publications.each { 1340 study.removeFromPublications(it) 1341 } 1342 } 1337 1343 } 1338 1344 } … … 1363 1369 // First remove the contacts that are not present in the array 1364 1370 if( study.persons ) { 1365 study.persons. removeAll {1371 study.persons.findAll { 1366 1372 studyperson -> !contactIDs.find { ids -> (ids.person == studyperson.person.id) && (ids.role == studyperson.role.id) } 1373 }.each { 1374 study.removeFromPersons(it) 1375 it.delete() 1367 1376 } 1368 1377 } … … 1394 1403 } else { 1395 1404 log.info('.no persons selected.') 1396 if( study.persons ) 1397 study.persons.clear() 1405 if( study.persons ) { 1406 // removing persons from study 1407 study.persons.each { 1408 study.removeFromPersons(it) 1409 it.delete() 1410 } 1411 } 1398 1412 } 1399 1413 } … … 1453 1467 users.each { study.addToReaders(it) } 1454 1468 } else if (type == "writers") { 1455 if (study.writers) 1456 study.writers.clear() 1469 if (study.writers) { 1470 study.writers.each { 1471 study.removeFromWriters(it) 1472 } 1473 } 1457 1474 1458 1475 users.each { study.addToWriters(it) } -
trunk/grails-app/domain/dbnp/studycapturing/Person.groovy
r1457 r1736 46 46 } 47 47 48 48 def String toString() { 49 return "${lastName}, ${firstName}" 50 } 49 51 } -
trunk/grails-app/domain/dbnp/studycapturing/PersonAffiliation.groovy
r1457 r1736 12 12 */ 13 13 class PersonAffiliation extends Identity { 14 15 14 String institute 16 15 String department
Note: See TracChangeset
for help on using the changeset viewer.