{"action":"closed","issue":{"url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/562","labels_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/562/labels{/name}","comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/562/comments","events_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/562/events","html_url":"https://github.com/ResearchKit/ResearchKit/issues/562","id":117009314,"number":562,"title":"Uniqueness of ORKStep and ORKFormSteps","user":{"login":"md0u80c9","id":3925834,"avatar_url":"https://avatars.githubusercontent.com/u/3925834?v=3","gravatar_id":"","url":"https://api.github.com/users/md0u80c9","html_url":"https://github.com/md0u80c9","followers_url":"https://api.github.com/users/md0u80c9/followers","following_url":"https://api.github.com/users/md0u80c9/following{/other_user}","gists_url":"https://api.github.com/users/md0u80c9/gists{/gist_id}","starred_url":"https://api.github.com/users/md0u80c9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/md0u80c9/subscriptions","organizations_url":"https://api.github.com/users/md0u80c9/orgs","repos_url":"https://api.github.com/users/md0u80c9/repos","events_url":"https://api.github.com/users/md0u80c9/events{/privacy}","received_events_url":"https://api.github.com/users/md0u80c9/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-15T18:22:04Z","updated_at":"2016-01-06T00:18:19Z","closed_at":"2016-01-06T00:18:19Z","body":"Hi,\r\n\r\nJust a couple of observations on doing some work on my app this weekend.\r\n\r\nAt present ORKSteps need unique identifiers.\r\n\r\nIt can get a bit messy if you fail to make an ORKStep identifiers unique - the error can be difficult to pin down. The error is not in the construction phase but of course when the Task is called. And in a complex task that can then be a way away.\r\n\r\nI think I have an individual solution - use a protocol extension to the Collection of ORKSteps to check for duplicates. I have not yet looked but I suspect this is something that could be solved within ResearchKit itself (apologies - still trying to get App ready so haven't delved directly into the ResearchKit to look yet).\r\n\r\nIs it possible to 'fail early' if the ORKStep identifier is non-unique? Happy to try and implement a solution if someone has a clean proposal which is acceptable."}}