Description of problem: There is no checking about the bug_system_id when invoking this method:TestCase.attach_bug(). Version-Release number of selected component (if applicable): v3.8.9-1 on test server the test case is https://tcms-test.app.eng.nay.redhat.com/case/390009/ How reproducible: 100% Steps to Reproduce: 1.invoke the method like this: (1)n.TestCase.attach_bug({'case_id':390009,'bug_id':'TCMS-234','bug_system_id':1,'summary':'test','description':'testing'}) Or like this: (2)n.TestCase.attach_bug({'case_id':390009,'bug_id':'TCMS-234','bug_system_id':3,'summary':'test','description':'testing'}) 2.then invoke the TestCase.get(390009) or refresh the UI page Then check the result. Actual results: (1)there is no wrong msg but this bug was added to the case.And the bug is right in the case. (2)there is no wrong msg and this bug was not added to the case. Expected results: (1) it should has warning that bug_system_id is not existed :1: BZ(Default), 2: JIRA (2)it should has warning that 3 is not existed. Additional info: TestCase.attach_bug(): +-------------------+----------------+-----------+-------------------------------+ | Field | Type | Null | Description | +-------------------+----------------+-----------+-------------------------------+ | case_id | Integer | Required | ID of Case | | bug_id | Integer | Required | ID of Bug | | bug_system_id | Integer | Required | 1: BZ(Default), 2: JIRA | | summary | String | Required | Bug summary | | description | String | Required | Bug description | +-------------------+----------------+-----------+-------------------------------+
In the following results,both of their bug_system are the same,but actually the bug types are different,which one is bugzilla and the other is jira. [{'bug_id': '23432', 'bug_system': 'Red Hat\nBugzilla', 'bug_system_id': 1, 'case': 'test case 1', 'case_id': 390009, 'case_run': None, 'case_run_id': None, 'description': 'just do testing', 'id': 120333, 'summary': 'test atach bug'}, {'bug_id': 'TCMS-234', 'bug_system': 'Red Hat\nBugzilla', 'bug_system_id': 1, 'case': 'test case 1', 'case_id': 390009, 'case_run': None, 'case_run_id': None, 'description': 'just do testing', 'id': 120334, 'summary': 'test atach bug'}]
changed to 3.8.8 as it happened on product env too.
fix with https://bugzilla.redhat.com/show_bug.cgi?id=1131920
verify on devel server with v3.8.11-1------>pass verify steps are the same as description.