- Create an issue - !record {model: project.issue, id: project_issue_onchangeevent0}: categ_id: project_issue.bug_categ name: on_change event does not pass context to the method project_id: project.project_project_22 working_hours_close: 0.0 working_hours_open: 0.0 - Check there is no task attached to issue - !assert {model: project.issue, id: project_issue_onchangeevent0, string: There must not be any task attached to issue}: - task_id.id == False - Convert issue to task - !python {model: project.issue}: | self.convert_issue_task(cr, uid, [ref("project_issue_onchangeevent0")], {"lang": "en_US", "project_id": False, "tz": False, "active_model": "ir.ui.menu", "department_id": False, "section_id": False, "search_default_project_id": False, "search_default_my_bugs": 1, "search_default_user_id": 1, "search_default_current_bugs": 1, "active_ids": [ref("project_issue.menu_project_issue_track")], "active_id": ref("project_issue.menu_project_issue_track"), }) - Check there is a task attached to issue - !assert {model: project.issue, id: project_issue_onchangeevent0, string: After creating a task for the issue there must be a task attached to it}: - task_id.id != False