Hi There
I am trying to read data from excel from column 'Summary' and 'Description' which contains multiple lines but I am getting below error.
{"errorMessages":[],"errors":{"summary":"The summary is invalid because it contains newline characters."}}
Can someone please guide how to fix the issue ?
Here is my python code
# Read Json file
strGlobalVarPath = os.path.abspath(some path '/LogIssueinJira.json')
with open(strGlobalVarPath,mode='r') as json_file:
json_data = json.load(json_file)
json_file.close()
url = baseURL + '/rest/api/2/issue'
headers = {'Content-Type': 'application/json'}
#Read Jira Defect file from sys location
data_folder = Path("some path")
file_to_open = data_folder / "Jiratemplate.xlsx"
df = pandas.read_excel(file_to_open)
#Fetch the list value from summary and description
SummaryList = list(df['Summary'])
DescriptionList = list(df['Description'])
#POST call to JIRA to logged defect
value1 = 0
value2 = 0
while value1 in range(0,len(SummaryList)) and value2 in range(0,len(DescriptionList)):
w1 = SummaryList[value1]
w2 = DescriptionList[value2]
json_data['fields']['summary'] = w1
json_data['fields']['description'] = w2
payload = json.dumps(json_data)
r = requests.post(url, data=payload, headers=headers, auth=(username, password))