How to attach a file in the report thanks to the CLA if I use a Python script ?
Hi everyone,
I am using the command line adapter of IBM to automate some process.
I put the python.exe (kernel) as the Command of the Adapter
And I put the Python script as the Argument.
Process works properly, but I am now trying to add a file to the Attachments in the Result Details. As I am not using a .bat or shell script, I did not find explanation on how to attach a file.
Has somebody the answer and could help me on how to attach a file thanks to a Python script?
Thanks,
Paul
Accepted answer
My suggestion would be to write a basic batch file and play with the feature first. See https://jazz.net/library/article/809 for how to attach files.
Once you understand the basics, call your python script from the command/batch file.
I experimented with this basic command batch:
echo Test echo %* set > c:\Temp\SetEnv.txt echo SomeDocument=C:/shared/SomeDocument.txt >> %qm_AttachmentsFile% echo SetEnv=c:/Temp/SetEnv.txt >> %qm_AttachmentsFile% echo Jazz.net=https://jazz.net >> %qm_AttachmentsFile% echo Google=https://google.com >> %qm_AttachmentsFile% echo CustomAttributesFile is %qm_CustomAttributesFile% > c:\Temp\Files.txt echo CustomPropertiesFile is %qm_CustomPropertiesFile% >> c:\Temp\Files.txt echo ExecutionVariableFile is %qm_ExecutionVariablesFile% >> c:\Temp\Files.txt echo AttachmentsFile is %qm_AttachmentsFile% >> c:\Temp\Files.txt echo Files=c:/Temp/Files.txt >> %qm_AttachmentsFile%