{"action":"created","issue":{"url":"https://api.github.com/repos/geneontology/noctua/issues/117","labels_url":"https://api.github.com/repos/geneontology/noctua/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/geneontology/noctua/issues/117/comments","events_url":"https://api.github.com/repos/geneontology/noctua/issues/117/events","html_url":"https://github.com/geneontology/noctua/issues/117","id":72519542,"number":117,"title":"Generally, add button for updating contents of field rather than only supplying add","user":{"login":"kltm","id":2687900,"avatar_url":"https://avatars.githubusercontent.com/u/2687900?v=3","gravatar_id":"","url":"https://api.github.com/users/kltm","html_url":"https://github.com/kltm","followers_url":"https://api.github.com/users/kltm/followers","following_url":"https://api.github.com/users/kltm/following{/other_user}","gists_url":"https://api.github.com/users/kltm/gists{/gist_id}","starred_url":"https://api.github.com/users/kltm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kltm/subscriptions","organizations_url":"https://api.github.com/users/kltm/orgs","repos_url":"https://api.github.com/users/kltm/repos","events_url":"https://api.github.com/users/kltm/events{/privacy}","received_events_url":"https://api.github.com/users/kltm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/geneontology/noctua/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/geneontology/noctua/milestones/19","html_url":"https://github.com/geneontology/noctua/milestones/2015-08-push%20(GO%20DC)","labels_url":"https://api.github.com/repos/geneontology/noctua/milestones/19/labels","id":1188139,"number":19,"title":"2015-08-push (GO DC)","description":"Items we hope to accomplish in August.\r\nThis will be the final milestone for the GO meeting in DC, at the end of August.","creator":{"login":"kltm","id":2687900,"avatar_url":"https://avatars.githubusercontent.com/u/2687900?v=3","gravatar_id":"","url":"https://api.github.com/users/kltm","html_url":"https://github.com/kltm","followers_url":"https://api.github.com/users/kltm/followers","following_url":"https://api.github.com/users/kltm/following{/other_user}","gists_url":"https://api.github.com/users/kltm/gists{/gist_id}","starred_url":"https://api.github.com/users/kltm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kltm/subscriptions","organizations_url":"https://api.github.com/users/kltm/orgs","repos_url":"https://api.github.com/users/kltm/repos","events_url":"https://api.github.com/users/kltm/events{/privacy}","received_events_url":"https://api.github.com/users/kltm/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":0,"state":"open","created_at":"2015-06-30T23:46:59Z","updated_at":"2015-07-28T00:12:31Z","due_on":"2015-08-31T07:00:00Z","closed_at":null},"comments":1,"created_at":"2015-05-01T20:46:40Z","updated_at":"2015-08-07T00:39:41Z","closed_at":null,"body":"The idea is that many text fields have the ability add, but updating a value requires a cycle of deleting and then adding. This is a bit annoying.\r\n\r\nThis could be fixed in many cases by adding an \"update\" button, which essentially batches the delete and add into a single transparent operation."},"comment":{"url":"https://api.github.com/repos/geneontology/noctua/issues/comments/128549054","html_url":"https://github.com/geneontology/noctua/issues/117#issuecomment-128549054","issue_url":"https://api.github.com/repos/geneontology/noctua/issues/117","id":128549054,"user":{"login":"kltm","id":2687900,"avatar_url":"https://avatars.githubusercontent.com/u/2687900?v=3","gravatar_id":"","url":"https://api.github.com/users/kltm","html_url":"https://github.com/kltm","followers_url":"https://api.github.com/users/kltm/followers","following_url":"https://api.github.com/users/kltm/following{/other_user}","gists_url":"https://api.github.com/users/kltm/gists{/gist_id}","starred_url":"https://api.github.com/users/kltm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kltm/subscriptions","organizations_url":"https://api.github.com/users/kltm/orgs","repos_url":"https://api.github.com/users/kltm/repos","events_url":"https://api.github.com/users/kltm/events{/privacy}","received_events_url":"https://api.github.com/users/kltm/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T00:39:41Z","updated_at":"2015-08-07T00:39:41Z","body":"Okay. talking with @hdietze about something else and this came up.\r\n\r\nIt's important to remember why we don't have this now. Annotations on the Minerva side are sets, meaning that we can have multiple titles, dates, states, etc. if we want to. To avoid having to:\r\n\r\n* get the current values of the keys in question\r\n* delete them\r\n* add new k/v(s)\r\n* send\r\n\r\nWe essentially lock the UI once there is a value, making the user delete the single value, and then add another. This made a lot of sense with the one-action-per-request world we used to be in, but with the batching, we can do better.\r\n\r\nThere are a few approaches though:\r\n\r\n1. deal with the heavy lifting on the client (loopy loops)\r\n2. have an \"update\" path on minerva\r\n3. enforce field cardinality in minerva\r\n\r\nFor the time being, we're looking at \"1\", which may not be too bad with a function like:\r\n\r\n```js\r\nentity.update_annotation(key, values)\r\n```\r\nthat (maybe) returns a request (from the requests package)."}}