{"action":"created","issue":{"url":"https://api.github.com/repos/cxrodgers/MouseColony/issues/32","repository_url":"https://api.github.com/repos/cxrodgers/MouseColony","labels_url":"https://api.github.com/repos/cxrodgers/MouseColony/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/cxrodgers/MouseColony/issues/32/comments","events_url":"https://api.github.com/repos/cxrodgers/MouseColony/issues/32/events","html_url":"https://github.com/cxrodgers/MouseColony/issues/32","id":145397175,"number":32,"title":"One-to-One relationship for Litter/BreedingCage (?)","user":{"login":"cxrodgers","id":615121,"avatar_url":"https://avatars.githubusercontent.com/u/615121?v=3","gravatar_id":"","url":"https://api.github.com/users/cxrodgers","html_url":"https://github.com/cxrodgers","followers_url":"https://api.github.com/users/cxrodgers/followers","following_url":"https://api.github.com/users/cxrodgers/following{/other_user}","gists_url":"https://api.github.com/users/cxrodgers/gists{/gist_id}","starred_url":"https://api.github.com/users/cxrodgers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cxrodgers/subscriptions","organizations_url":"https://api.github.com/users/cxrodgers/orgs","repos_url":"https://api.github.com/users/cxrodgers/repos","events_url":"https://api.github.com/users/cxrodgers/events{/privacy}","received_events_url":"https://api.github.com/users/cxrodgers/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cxrodgers/MouseColony/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cxrodgers/MouseColony/milestones/1","html_url":"https://github.com/cxrodgers/MouseColony/milestones/Ensure%20the%20database%20can%20handle%20the%20new%20cage/mouse%20naming%20conventions","labels_url":"https://api.github.com/repos/cxrodgers/MouseColony/milestones/1/labels","id":1679576,"number":1,"title":"Ensure the database can handle the new cage/mouse naming conventions","description":"We decided to follow a slightly different convention, in which each breeding cage number is associated with no more than one litter. The breeding cage number / litter number is used to name the mice in that litter. Weaning creates a new breeding cage number even if the parents stay the same. \r\n\r\nThis may require some modifications to the object model, but probably nothing too major.\r\n\r\nWe should add some test data (faked or real) to the database to give this nomenclature a test drive. We may or may not want to grandfather in existing cage sets with the old nomenclature.\r\n\r\nWe should document the convention in the object model, readme, and admin page instructions.\r\n\r\nThis milestone is more about making sure that the database model can handle the nomenclature. It is not so important to actually renumber the cages upstairs or to actually start using the nomenclature for real cages at this point. That can be a later milestone.\r\n\r\nFinally some usability improvements (like auto-generating the new cage number without having to look it up) would be nice but not critical.","creator":{"login":"cxrodgers","id":615121,"avatar_url":"https://avatars.githubusercontent.com/u/615121?v=3","gravatar_id":"","url":"https://api.github.com/users/cxrodgers","html_url":"https://github.com/cxrodgers","followers_url":"https://api.github.com/users/cxrodgers/followers","following_url":"https://api.github.com/users/cxrodgers/following{/other_user}","gists_url":"https://api.github.com/users/cxrodgers/gists{/gist_id}","starred_url":"https://api.github.com/users/cxrodgers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cxrodgers/subscriptions","organizations_url":"https://api.github.com/users/cxrodgers/orgs","repos_url":"https://api.github.com/users/cxrodgers/repos","events_url":"https://api.github.com/users/cxrodgers/events{/privacy}","received_events_url":"https://api.github.com/users/cxrodgers/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2016-04-02T17:21:24Z","updated_at":"2016-04-02T17:36:26Z","due_on":"2016-04-09T04:00:00Z","closed_at":null},"comments":7,"created_at":"2016-04-02T17:36:19Z","updated_at":"2016-04-04T19:29:30Z","closed_at":null,"body":"Given the new nomenclature that means every BreedingCage can have no more than one litter, does it make sense to make this a one-to-one relationship?\r\nhttps://docs.djangoproject.com/en/1.9/topics/db/examples/one_to_one/\r\n\r\nWill this break anything?"},"comment":{"url":"https://api.github.com/repos/cxrodgers/MouseColony/issues/comments/205459368","html_url":"https://github.com/cxrodgers/MouseColony/issues/32#issuecomment-205459368","issue_url":"https://api.github.com/repos/cxrodgers/MouseColony/issues/32","id":205459368,"user":{"login":"danieldkato","id":16964677,"avatar_url":"https://avatars.githubusercontent.com/u/16964677?v=3","gravatar_id":"","url":"https://api.github.com/users/danieldkato","html_url":"https://github.com/danieldkato","followers_url":"https://api.github.com/users/danieldkato/followers","following_url":"https://api.github.com/users/danieldkato/following{/other_user}","gists_url":"https://api.github.com/users/danieldkato/gists{/gist_id}","starred_url":"https://api.github.com/users/danieldkato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieldkato/subscriptions","organizations_url":"https://api.github.com/users/danieldkato/orgs","repos_url":"https://api.github.com/users/danieldkato/repos","events_url":"https://api.github.com/users/danieldkato/events{/privacy}","received_events_url":"https://api.github.com/users/danieldkato/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T19:29:30Z","updated_at":"2016-04-04T19:29:30Z","body":"Great! This is really useful in illustrating the usability of the different options for structuring the data. \r\n\r\nThis makes me think that maybe we should hang on to Litter as a separate model. If we move all of Litter's fields to Cage, then every instance of Cage will wind up with a bunch of blank fields that aren't really necessary. If we keep Litter as a separate object (and set extra=0 in LitterAdmin), then Litter's fields won't appear unless someone has added a litter. \r\n\r\nAs for the \"Add Mouse\" javascript button, I realize now that there are two similar packages: nested-admin and nested-inline (available here https://github.com/s-block/django-nested-inline). This branch is currently using the former, while I've been using the latter, and the \"Add\"  button works for me (in fact I think I may have even switched over after having this exact problem)."}}