I'm trying to add a static comment into multiple defects at the same time. I was able to use jira.add_comment to add it into a single defect. But i'm not sure how it can be done for multiple defects at the same time. i tried reading the defect id's from the text file to add comments in multiple defects. But that didn't work. Please let me know how this can be done using Python script.
from jira import JIRA
options = {'server': 'https://jira.com'}
jira = JIRA(options, basic_auth=('username', 'pwd'))
f = open('C:////jiraccess//defect.txt')
line = f.readline()
while line:
comment = jira.add_comment(line, 'closed')
line = f.readline()
f.close()