{"action":"created","issue":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4437","labels_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4437/labels{/name}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4437/comments","events_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4437/events","html_url":"https://github.com/DynamoDS/Dynamo/pull/4437","id":74242260,"number":4437,"title":"Fix MAGN-5768 With a \"dirty definition\" closing Revit fails to prompt Dynamo for File Save","user":{"login":"Randy-Ma","id":5584246,"avatar_url":"https://avatars.githubusercontent.com/u/5584246?v=3","gravatar_id":"","url":"https://api.github.com/users/Randy-Ma","html_url":"https://github.com/Randy-Ma","followers_url":"https://api.github.com/users/Randy-Ma/followers","following_url":"https://api.github.com/users/Randy-Ma/following{/other_user}","gists_url":"https://api.github.com/users/Randy-Ma/gists{/gist_id}","starred_url":"https://api.github.com/users/Randy-Ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Randy-Ma/subscriptions","organizations_url":"https://api.github.com/users/Randy-Ma/orgs","repos_url":"https://api.github.com/users/Randy-Ma/repos","events_url":"https://api.github.com/users/Randy-Ma/events{/privacy}","received_events_url":"https://api.github.com/users/Randy-Ma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DynamoDS/Dynamo/labels/Requires%20Changes","name":"Requires Changes","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-05-08T05:46:21Z","updated_at":"2015-05-11T06:43:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4437","html_url":"https://github.com/DynamoDS/Dynamo/pull/4437","diff_url":"https://github.com/DynamoDS/Dynamo/pull/4437.diff","patch_url":"https://github.com/DynamoDS/Dynamo/pull/4437.patch"},"body":"### Purpose\r\n\r\nThis PR fixes MAGN-5768. When Dynamo is closed because of the host application is closed, the closing handler of Dynamo window won't be called. The result of this is there will be no chance to prompt users to whether or not save the Dynamo documents.\r\n\r\nThe fix here is try to check whether PerformShutdownSequence of the view model has been called successfully when the closed handler is called. If not, it will be called first.\r\n\r\n### Declarations\r\n\r\n- [x] The code base is in a better state after this PR\r\n- [x] The level of testing this PR includes is appropriate\r\n(I have run manual test.)\r\n\r\n### Reviewers\r\n\r\n@pboyer \r\n\r\n### FYIs\r\n\r\n@riteshchandawar "},"comment":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/comments/100787972","html_url":"https://github.com/DynamoDS/Dynamo/pull/4437#issuecomment-100787972","issue_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4437","id":100787972,"user":{"login":"Randy-Ma","id":5584246,"avatar_url":"https://avatars.githubusercontent.com/u/5584246?v=3","gravatar_id":"","url":"https://api.github.com/users/Randy-Ma","html_url":"https://github.com/Randy-Ma","followers_url":"https://api.github.com/users/Randy-Ma/followers","following_url":"https://api.github.com/users/Randy-Ma/following{/other_user}","gists_url":"https://api.github.com/users/Randy-Ma/gists{/gist_id}","starred_url":"https://api.github.com/users/Randy-Ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Randy-Ma/subscriptions","organizations_url":"https://api.github.com/users/Randy-Ma/orgs","repos_url":"https://api.github.com/users/Randy-Ma/repos","events_url":"https://api.github.com/users/Randy-Ma/events{/privacy}","received_events_url":"https://api.github.com/users/Randy-Ma/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T06:43:19Z","updated_at":"2015-05-11T06:43:19Z","body":"@pboyer \r\nThanks for the comments! The reason that I have not added an automatic test is that this test case has to be run with a host application, which is Revit for this defect. This means we need an API to close Revit and then check whether the prompt to save dialog comes out. I have not seen a straightforward way to handle these.\r\n"}}