{"action":"closed","issue":{"url":"https://api.github.com/repos/OpenConceptLab/oclapi/issues/135","labels_url":"https://api.github.com/repos/OpenConceptLab/oclapi/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/OpenConceptLab/oclapi/issues/135/comments","events_url":"https://api.github.com/repos/OpenConceptLab/oclapi/issues/135/events","html_url":"https://github.com/OpenConceptLab/oclapi/issues/135","id":94805847,"number":135,"title":"Zero retired concepts are actually retired upon import","user":{"login":"paynejd","id":1189689,"avatar_url":"https://avatars.githubusercontent.com/u/1189689?v=3","gravatar_id":"","url":"https://api.github.com/users/paynejd","html_url":"https://github.com/paynejd","followers_url":"https://api.github.com/users/paynejd/followers","following_url":"https://api.github.com/users/paynejd/following{/other_user}","gists_url":"https://api.github.com/users/paynejd/gists{/gist_id}","starred_url":"https://api.github.com/users/paynejd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paynejd/subscriptions","organizations_url":"https://api.github.com/users/paynejd/orgs","repos_url":"https://api.github.com/users/paynejd/repos","events_url":"https://api.github.com/users/paynejd/events{/privacy}","received_events_url":"https://api.github.com/users/paynejd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenConceptLab/oclapi/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/OpenConceptLab/oclapi/labels/high-priority","name":"high-priority","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-13T20:37:59Z","updated_at":"2015-07-18T22:12:21Z","closed_at":"2015-07-18T22:12:21Z","body":"When running the import scripts, retired concepts are not retired. We ended up having to write a separate script that runs after the import script has completed that simply calls the API to retire any concepts that should have been retired. Unfortunately, this behavior will only work on the initial import of a dictionary and not when \"re-importing\" a dictionary over itself to update it.\r\n\r\nAaron indicated that there is code in the import script specifically dedicated to retired concepts (see https://github.com/OpenConceptLab/oclapi/blob/master/django-nonrel/ocl/oclapi/management/commands/import_concepts_to_source.py#L105). In the current implementation, the \"retired\" attribute is handled independently of the other attributes.\r\n\r\nHowever, the above code is either not executed or does not run correctly, because when the import script is done running (for example, on the full CIEL dictionary or on the test CIEL dictionary), zero concepts are retired."}}