{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/pxt-microbit/issues/1643","repository_url":"https://api.github.com/repos/Microsoft/pxt-microbit","labels_url":"https://api.github.com/repos/Microsoft/pxt-microbit/issues/1643/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/pxt-microbit/issues/1643/comments","events_url":"https://api.github.com/repos/Microsoft/pxt-microbit/issues/1643/events","html_url":"https://github.com/Microsoft/pxt-microbit/issues/1643","id":380811702,"node_id":"MDU6SXNzdWUzODA4MTE3MDI=","number":1643,"title":"Duplicated functions get numbered incorrectly","user":{"login":"mdeutschmtl","id":385817,"node_id":"MDQ6VXNlcjM4NTgxNw==","avatar_url":"https://avatars2.githubusercontent.com/u/385817?v=4","gravatar_id":"","url":"https://api.github.com/users/mdeutschmtl","html_url":"https://github.com/mdeutschmtl","followers_url":"https://api.github.com/users/mdeutschmtl/followers","following_url":"https://api.github.com/users/mdeutschmtl/following{/other_user}","gists_url":"https://api.github.com/users/mdeutschmtl/gists{/gist_id}","starred_url":"https://api.github.com/users/mdeutschmtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdeutschmtl/subscriptions","organizations_url":"https://api.github.com/users/mdeutschmtl/orgs","repos_url":"https://api.github.com/users/mdeutschmtl/repos","events_url":"https://api.github.com/users/mdeutschmtl/events{/privacy}","received_events_url":"https://api.github.com/users/mdeutschmtl/received_events","type":"User","site_admin":false},"labels":[{"id":846638341,"node_id":"MDU6TGFiZWw4NDY2MzgzNDE=","url":"https://api.github.com/repos/Microsoft/pxt-microbit/labels/needs%20additional%20information","name":"needs additional information","color":"b25b35","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-14T17:39:56Z","updated_at":"2018-11-15T15:17:40Z","closed_at":"2018-11-15T15:17:39Z","author_association":"NONE","body":"**Describe the bug**\r\nThe function-duplicating mechanism sometimes goes wrong, resulting in unusual suffix numbers. Seems to be confusing a trailing number in the function name with the suffix-number issued by MakeCode.\r\n\r\n**To Reproduce**\r\nSeems to happen when creating 2nd and 3rd generation duplicates. May only happen when the user toggles to look at the Javascript. These numbers sometimes “leak” back into the blocks, and users see function numbers they did not create.\r\n\r\nCurrently do not have a 100% recipe, but was able to reproduce it today: https://makecode.microbit.org/_Mu80JW9oMfp3\r\n\r\nThis is a simple program, but it’s been built in an iterative, create-destroy-create-destroy kind of way, as many of my novice programmers do it. The Javascript now shows functions with suffix numbers 22, 23, and 222. Blocks now show functions with numbers 2, 3, and 22.\r\n\r\n**Expected behavior**\r\nFunction duplicates should keep nice, consistent numbering. 1, 2, 3, etc. They should stay consistent between Blocks and Javascript.\r\n\r\n**Screenshots**\r\nSee project https://makecode.microbit.org/_Mu80JW9oMfp3\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: Mac OS X 10.3\r\n - Browser: Firefox 63.01\r\n - Version\r\n\r\n**Smartphone (please complete the following information):**\r\n N/A\r\n\r\n**Additional context**\r\nN/A"}}
{"actor":{"display_login":"abchatra"}}