{"action":"created","issue":{"url":"https://api.github.com/repos/theCrag/website/issues/1874","labels_url":"https://api.github.com/repos/theCrag/website/issues/1874/labels{/name}","comments_url":"https://api.github.com/repos/theCrag/website/issues/1874/comments","events_url":"https://api.github.com/repos/theCrag/website/issues/1874/events","html_url":"https://github.com/theCrag/website/issues/1874","id":59741154,"number":1874,"title":"round trip registered grades","user":{"login":"scd","id":373058,"avatar_url":"https://avatars.githubusercontent.com/u/373058?v=3","gravatar_id":"","url":"https://api.github.com/users/scd","html_url":"https://github.com/scd","followers_url":"https://api.github.com/users/scd/followers","following_url":"https://api.github.com/users/scd/following{/other_user}","gists_url":"https://api.github.com/users/scd/gists{/gist_id}","starred_url":"https://api.github.com/users/scd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scd/subscriptions","organizations_url":"https://api.github.com/users/scd/orgs","repos_url":"https://api.github.com/users/scd/repos","events_url":"https://api.github.com/users/scd/events{/privacy}","received_events_url":"https://api.github.com/users/scd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/theCrag/website/labels/5:%20Enhancement","name":"5: Enhancement","color":"009800"},{"url":"https://api.github.com/repos/theCrag/website/labels/7:%20Idea%20for%20discussion","name":"7: Idea for discussion","color":"e102d8"}],"state":"open","locked":false,"assignee":{"login":"scd","id":373058,"avatar_url":"https://avatars.githubusercontent.com/u/373058?v=3","gravatar_id":"","url":"https://api.github.com/users/scd","html_url":"https://github.com/scd","followers_url":"https://api.github.com/users/scd/followers","following_url":"https://api.github.com/users/scd/following{/other_user}","gists_url":"https://api.github.com/users/scd/gists{/gist_id}","starred_url":"https://api.github.com/users/scd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scd/subscriptions","organizations_url":"https://api.github.com/users/scd/orgs","repos_url":"https://api.github.com/users/scd/repos","events_url":"https://api.github.com/users/scd/events{/privacy}","received_events_url":"https://api.github.com/users/scd/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-03-04T02:24:32Z","updated_at":"2015-03-04T05:23:37Z","closed_at":null,"body":"According to the general feedback the current implementation of registered grades is a bit complex. A simple text field would be preferred.\r\n\r\nTo do this we need to ensure that the round trip journey of all registered grades is consistent.\r\n\r\nRelated issue #1585 describes a mechanism of how to treat multiple grade contributions, which is dependent on this issue being completed. I don't want to change data models to resolve this issue. I want the scope to be limited to simplifying the UX for registered grades.\r\n\r\nRelated issue #1513 describes an API which returns multiple grade matches. Resolving this issue does require an API. I think if we work through this issue then the API requirements will fall out.\r\n\r\nParsing grades may give different results for the following:\r\n - [x] the context\r\n - [x] gear style (eg bouldering will prioritise Font grades)\r\n\r\nThinking out loud, some requirements:\r\n - [ ] If you don't change the grade (or context/style) in the text field when updating a route then the grade will not change\r\n - [ ] You should be able to save a registered grade outside the context (eg an Australian grade in US context).\r\n - [ ] The text field should be unambiguous. This means that if the grade is outside the current context then the grading system label should make it explicit.\r\n - [ ] Changing the context or gear style means that the grade may be changed without changing the text. In the case where the grading system is explicit then it will not be changed.\r\n - [ ] Multiple pitches should not be used in registered grade. If mulitple pitch format is used then the overall grade should be returned\r\n - [ ] Multiple grade components (eg free + aid, uk adj + tech) should be catered for.\r\n - [ ] Multiple grading systems should be catered for eg register grade for both AU and FR grade for a route.\r\n - [ ] API should return the parsed grade to be shown marked up in the UX\r\n\r\nMaybe we could use select2, but this is for bonus marks.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/theCrag/website/issues/comments/77099133","html_url":"https://github.com/theCrag/website/issues/1874#issuecomment-77099133","issue_url":"https://api.github.com/repos/theCrag/website/issues/1874","id":77099133,"user":{"login":"scd","id":373058,"avatar_url":"https://avatars.githubusercontent.com/u/373058?v=3","gravatar_id":"","url":"https://api.github.com/users/scd","html_url":"https://github.com/scd","followers_url":"https://api.github.com/users/scd/followers","following_url":"https://api.github.com/users/scd/following{/other_user}","gists_url":"https://api.github.com/users/scd/gists{/gist_id}","starred_url":"https://api.github.com/users/scd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scd/subscriptions","organizations_url":"https://api.github.com/users/scd/orgs","repos_url":"https://api.github.com/users/scd/repos","events_url":"https://api.github.com/users/scd/events{/privacy}","received_events_url":"https://api.github.com/users/scd/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T05:23:37Z","updated_at":"2015-03-04T05:23:37Z","body":"oh, I forgot to include an example with multiple components:\r\n\r\ninput:\r\n\r\n```\r\n{\r\n  \"data\": {\r\n    \"text\": \"22 M3\",\r\n    \"context\": \"AU\",\r\n  }\r\n}\r\n```\r\n\r\noutput:\r\n\r\n```\r\n{\r\n   \"data\" : {\r\n      \"contextID\" : \"7516384\",\r\n      \"input\" : \"22 M3\",\r\n      \"components\" : {\r\n         \"22\" : {\r\n            \"unambiguousContexts\" : {\r\n               \"7516384\" : \"AU\"\r\n            },\r\n            \"styleID\" : 7510792,\r\n            \"style\" : \"Free\",\r\n            \"interpretations\" : [\r\n               {\r\n                  \"system\" : \"AU\",\r\n                  \"grade\" : \"22\",\r\n                  \"systemName\" : \"Australian Ewbanks\",\r\n                  \"systemID\" : \"7510852\"\r\n               },\r\n               {\r\n                  \"system\" : \"SA\",\r\n                  \"grade\" : \"22\",\r\n                  \"systemName\" : \"South African\",\r\n                  \"systemID\" : \"7510912\"\r\n               }\r\n            ],\r\n            \"systemName\" : \"Australian Ewbanks\",\r\n            \"systemLabel\" : \"AU\",\r\n            \"systemID\" : \"7510852\",\r\n            \"display\" : \"22\"\r\n         },\r\n         \"M3\" : {\r\n            \"unambiguousContexts\" : {\r\n               \"7516384\" : \"AU\"\r\n            },\r\n            \"styleID\" : 7510798,\r\n            \"style\" : \"Aid\",\r\n            \"interpretations\" : [\r\n               {\r\n                  \"system\" : \"AUAID\",\r\n                  \"grade\" : \"M3\",\r\n                  \"systemName\" : \"Australian Aid\",\r\n                  \"systemID\" : \"7510942\"\r\n               },\r\n               {\r\n                  \"system\" : \"MIXED\",\r\n                  \"grade\" : \"M3\",\r\n                  \"systemName\" : \"Mixed Rock/Ice\",\r\n                  \"systemID\" : \"7511002\"\r\n               }\r\n            ],\r\n            \"systemName\" : \"Australian Aid\",\r\n            \"systemLabel\" : \"AUAID\",\r\n            \"systemID\" : \"7510942\",\r\n            \"display\" : \"M3\"\r\n         }\r\n      },\r\n      \"style\" : \"Aid\",\r\n      \"grade\" : \"22 M3\",\r\n      \"score\" : 188,\r\n      \"context\" : \"AU\",\r\n      \"gradeBand\" : \"Experienced\",\r\n      \"gradeBandID\" : \"7511068\"\r\n   }\r\n}\r\n```"}}