)]}'
{"watcherclient/v1/action_plan.py":[{"author":{"_account_id":13111,"name":"Hidekazu Nakamura","email":"hidekazuna@gmail.com","username":"hid-nakamura"},"change_message_id":"c6c680e09e7c7c4573b6d7497144f5370f9ba49c","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def cancel(self, action_plan_id):"},{"line_number":94,"context_line":"        action_plan \u003d self.get(action_plan_id)"},{"line_number":95,"context_line":"        if action_plan.state \u003d\u003d \"ONGOING\":"},{"line_number":96,"context_line":"            patch \u003d [{\u0027op\u0027: \u0027replace\u0027, \u0027value\u0027: \u0027CANCELLING\u0027,"},{"line_number":97,"context_line":"                      \u0027path\u0027: \u0027/state\u0027}]"},{"line_number":98,"context_line":"        else:"},{"line_number":99,"context_line":"            patch \u003d [{\u0027op\u0027: \u0027replace\u0027, \u0027value\u0027: \u0027CANCELLED\u0027, \u0027path\u0027: \u0027/state\u0027}]"},{"line_number":100,"context_line":"        return self._update(self._path(action_plan_id), patch)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df140735_bab0df44","line":97,"range":{"start_line":95,"start_character":8,"end_line":97,"end_character":40},"updated":"2017-06-02 05:18:43.000000000","message":"Since we have state transition validation, state check is not needed as the same as start method does not check.","commit_id":"3f25b6b2237bd2ebe1fe42902d02dd3d0742363c"},{"author":{"_account_id":19457,"name":"aditi sharma","email":"adi.sky17@gmail.com","username":"aditi"},"change_message_id":"066de205af612c3267a4ecca9d286acc2fbd2261","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def cancel(self, action_plan_id):"},{"line_number":94,"context_line":"        action_plan \u003d self.get(action_plan_id)"},{"line_number":95,"context_line":"        if action_plan.state \u003d\u003d \"ONGOING\":"},{"line_number":96,"context_line":"            patch \u003d [{\u0027op\u0027: \u0027replace\u0027, \u0027value\u0027: \u0027CANCELLING\u0027,"},{"line_number":97,"context_line":"                      \u0027path\u0027: \u0027/state\u0027}]"},{"line_number":98,"context_line":"        else:"},{"line_number":99,"context_line":"            patch \u003d [{\u0027op\u0027: \u0027replace\u0027, \u0027value\u0027: \u0027CANCELLED\u0027, \u0027path\u0027: \u0027/state\u0027}]"},{"line_number":100,"context_line":"        return self._update(self._path(action_plan_id), patch)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df140735_d03534aa","line":97,"range":{"start_line":95,"start_character":8,"end_line":97,"end_character":40},"in_reply_to":"df140735_bab0df44","updated":"2017-06-07 05:40:33.000000000","message":"yes, cancel method is different then start method, here if the action plan is \"ONGOING\", we are not directly updating it \"CANCELLED\", we will update it to \"CANCELLING\" first","commit_id":"3f25b6b2237bd2ebe1fe42902d02dd3d0742363c"},{"author":{"_account_id":13111,"name":"Hidekazu Nakamura","email":"hidekazuna@gmail.com","username":"hid-nakamura"},"change_message_id":"c6c680e09e7c7c4573b6d7497144f5370f9ba49c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        if action_plan.state \u003d\u003d \"ONGOING\":"},{"line_number":96,"context_line":"            patch \u003d [{\u0027op\u0027: \u0027replace\u0027, \u0027value\u0027: \u0027CANCELLING\u0027,"},{"line_number":97,"context_line":"                      \u0027path\u0027: \u0027/state\u0027}]"},{"line_number":98,"context_line":"        else:"},{"line_number":99,"context_line":"            patch \u003d [{\u0027op\u0027: \u0027replace\u0027, \u0027value\u0027: \u0027CANCELLED\u0027, \u0027path\u0027: \u0027/state\u0027}]"},{"line_number":100,"context_line":"        return self._update(self._path(action_plan_id), patch)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df140735_1ad90b7e","line":99,"range":{"start_line":98,"start_character":8,"end_line":99,"end_character":79},"updated":"2017-06-02 05:18:43.000000000","message":"This is not written in spec. Since the purpose of cancel method is to cancel ONGOING action plan, this is not necessary.","commit_id":"3f25b6b2237bd2ebe1fe42902d02dd3d0742363c"},{"author":{"_account_id":13111,"name":"Hidekazu Nakamura","email":"hidekazuna@gmail.com","username":"hid-nakamura"},"change_message_id":"af95d471b3e0286bb404c426b34b8cfc8eb69a2b","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        if action_plan.state \u003d\u003d \"ONGOING\":"},{"line_number":96,"context_line":"            patch \u003d [{\u0027op\u0027: \u0027replace\u0027, \u0027value\u0027: \u0027CANCELLING\u0027,"},{"line_number":97,"context_line":"                      \u0027path\u0027: \u0027/state\u0027}]"},{"line_number":98,"context_line":"        else:"},{"line_number":99,"context_line":"            patch \u003d [{\u0027op\u0027: \u0027replace\u0027, \u0027value\u0027: \u0027CANCELLED\u0027, \u0027path\u0027: \u0027/state\u0027}]"},{"line_number":100,"context_line":"        return self._update(self._path(action_plan_id), patch)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df140735_e4fe286a","line":99,"range":{"start_line":98,"start_character":8,"end_line":99,"end_character":79},"in_reply_to":"df140735_1053ace4","updated":"2017-06-07 14:19:59.000000000","message":"Ok, i understand.","commit_id":"3f25b6b2237bd2ebe1fe42902d02dd3d0742363c"},{"author":{"_account_id":19457,"name":"aditi sharma","email":"adi.sky17@gmail.com","username":"aditi"},"change_message_id":"066de205af612c3267a4ecca9d286acc2fbd2261","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        if action_plan.state \u003d\u003d \"ONGOING\":"},{"line_number":96,"context_line":"            patch \u003d [{\u0027op\u0027: \u0027replace\u0027, \u0027value\u0027: \u0027CANCELLING\u0027,"},{"line_number":97,"context_line":"                      \u0027path\u0027: \u0027/state\u0027}]"},{"line_number":98,"context_line":"        else:"},{"line_number":99,"context_line":"            patch \u003d [{\u0027op\u0027: \u0027replace\u0027, \u0027value\u0027: \u0027CANCELLED\u0027, \u0027path\u0027: \u0027/state\u0027}]"},{"line_number":100,"context_line":"        return self._update(self._path(action_plan_id), patch)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df140735_1053ace4","line":99,"range":{"start_line":98,"start_character":8,"end_line":99,"end_character":79},"in_reply_to":"df140735_1ad90b7e","updated":"2017-06-07 05:40:33.000000000","message":"This is to cancel, recommended/pending action plans","commit_id":"3f25b6b2237bd2ebe1fe42902d02dd3d0742363c"}]}
