{"action":"opened","issue":{"url":"https://api.github.com/repos/libris/xl_auth/issues/29","repository_url":"https://api.github.com/repos/libris/xl_auth","labels_url":"https://api.github.com/repos/libris/xl_auth/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/libris/xl_auth/issues/29/comments","events_url":"https://api.github.com/repos/libris/xl_auth/issues/29/events","html_url":"https://github.com/libris/xl_auth/issues/29","id":260928772,"number":29,"title":"Collection codes should support merging","user":{"login":"mblomdahl","id":786326,"avatar_url":"https://avatars3.githubusercontent.com/u/786326?v=4","gravatar_id":"","url":"https://api.github.com/users/mblomdahl","html_url":"https://github.com/mblomdahl","followers_url":"https://api.github.com/users/mblomdahl/followers","following_url":"https://api.github.com/users/mblomdahl/following{/other_user}","gists_url":"https://api.github.com/users/mblomdahl/gists{/gist_id}","starred_url":"https://api.github.com/users/mblomdahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblomdahl/subscriptions","organizations_url":"https://api.github.com/users/mblomdahl/orgs","repos_url":"https://api.github.com/users/mblomdahl/repos","events_url":"https://api.github.com/users/mblomdahl/events{/privacy}","received_events_url":"https://api.github.com/users/mblomdahl/received_events","type":"User","site_admin":false},"labels":[{"id":682969485,"url":"https://api.github.com/repos/libris/xl_auth/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"mxtthias","id":187215,"avatar_url":"https://avatars0.githubusercontent.com/u/187215?v=4","gravatar_id":"","url":"https://api.github.com/users/mxtthias","html_url":"https://github.com/mxtthias","followers_url":"https://api.github.com/users/mxtthias/followers","following_url":"https://api.github.com/users/mxtthias/following{/other_user}","gists_url":"https://api.github.com/users/mxtthias/gists{/gist_id}","starred_url":"https://api.github.com/users/mxtthias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxtthias/subscriptions","organizations_url":"https://api.github.com/users/mxtthias/orgs","repos_url":"https://api.github.com/users/mxtthias/repos","events_url":"https://api.github.com/users/mxtthias/events{/privacy}","received_events_url":"https://api.github.com/users/mxtthias/received_events","type":"User","site_admin":false},"assignees":[{"login":"mxtthias","id":187215,"avatar_url":"https://avatars0.githubusercontent.com/u/187215?v=4","gravatar_id":"","url":"https://api.github.com/users/mxtthias","html_url":"https://github.com/mxtthias","followers_url":"https://api.github.com/users/mxtthias/followers","following_url":"https://api.github.com/users/mxtthias/following{/other_user}","gists_url":"https://api.github.com/users/mxtthias/gists{/gist_id}","starred_url":"https://api.github.com/users/mxtthias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxtthias/subscriptions","organizations_url":"https://api.github.com/users/mxtthias/orgs","repos_url":"https://api.github.com/users/mxtthias/repos","events_url":"https://api.github.com/users/mxtthias/events{/privacy}","received_events_url":"https://api.github.com/users/mxtthias/received_events","type":"User","site_admin":false},{"login":"mblomdahl","id":786326,"avatar_url":"https://avatars3.githubusercontent.com/u/786326?v=4","gravatar_id":"","url":"https://api.github.com/users/mblomdahl","html_url":"https://github.com/mblomdahl","followers_url":"https://api.github.com/users/mblomdahl/followers","following_url":"https://api.github.com/users/mblomdahl/following{/other_user}","gists_url":"https://api.github.com/users/mblomdahl/gists{/gist_id}","starred_url":"https://api.github.com/users/mblomdahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblomdahl/subscriptions","organizations_url":"https://api.github.com/users/mblomdahl/orgs","repos_url":"https://api.github.com/users/mblomdahl/repos","events_url":"https://api.github.com/users/mblomdahl/events{/privacy}","received_events_url":"https://api.github.com/users/mblomdahl/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-09-27T10:45:14Z","updated_at":"2017-09-27T10:45:14Z","closed_at":null,"author_association":"MEMBER","body":"Add a special \"merge into other code\" button for collections, to merge e.g. code *M* into collection *Eb*.\r\n\r\n1) asks the operator to select a \"source\" code and a \"destination\" code, whereas they go `M -> Eb`\r\n2) queries the database for all users that have privileges on *M*\r\n3) displays a list to the operator saying ...\r\n    > Here's all the ones that will lose their privileges on what is currently code *M* and later will need to be manually added back on *Eb*:\r\n    >\r\n    > ID | Email | Katalogisera M | Beståndsregistrera M\r\n    > -- | ----- | --------------- | ---------------------- \r\n    > 23 | simona@kb.se | yes | no\r\n    > 29 | gunnar@kb.se | no | yes\r\n    > 92 | pernilla@kb.se |yes | yes\r\n    >\r\n    > Are you absolutely 100 % sure that you want to proceed with the operation? It cannot be undone in a thousand years. (y/n)\r\n4) updates the old code *M*, the \"source\", by setting ...\r\n    * `immutable=yes`\r\n    * `replaced_by=['Eb']`\r\n5) updates the destination collection *Eb* by appending code `M` to the `replaces` list property; `replaces=['E'] -> replaces['E', 'M']`\r\n6) executes steps 4-5 in a single transaction\r\n\r\nIllustration!\r\n\r\n![170927_kb--life of collections model](https://user-images.githubusercontent.com/786326/30909385-2ecf684a-a381-11e7-8496-7bdaa7c9cf64.png)\r\n\r\n([170927_KB--Life of Collections Model.xml.zip](https://github.com/libris/xl_auth/files/1336719/170927_KB--Life.of.Collections.Model.xml.zip))\r\n"}}
{"actor":{"display_login":"mblomdahl"}}