Following im issue CLI command string works in cmd line not with Python sub process : CLI command working in Command Line:
im issues --queryDefinition='((field["Project"]="/L2H0090") and (field["Document ID"]="11601660") and (field["Status_fld"]="reviewed","released","approved") and (field["Category"]="Software Test") and (field["External ID"]contains"Fully_Automated"))'
Python Code:
import subprocess
string = "im issues --queryDefinition="+'((field["Project"]="/L2H0090") and (field["Document ID"]="11601660") and (field["Status_fld"]="reviewed","released","approved") and (field["Category"]="Software Test") and (field["External ID"]contains"Fully_Automated"))'
try:
result = subprocess.check_output(string)
print(result)
except subprocess.CalledProcessError as e:
print(e.output)
Its showing below error:
*** The query and queryDefinition options are incompatible with an issue selection.
I've tried way to input string to the subprocess.check_output. But every time same output I am getting. Please support here to get correct command string which shall work in python as well.
Thanks in advance.
string = """im issues --queryDefinition='((field["Project"]="/L2H0090") and (field["Document ID"])=""" + str(TestSuite_ID) + """ and (field["Status_fld"]="reviewed","released","approved") and (field["Category"]="Software Test") and (field["External ID"]contains"Fully_Automated")'"""