Custom script to create task in JIRA from business rule

Custom script to create task in JIRA from business rule

I have created a business rule to create a task in JIRA whenever an issue is created in SD+. I would like to create the script either in Python or PowerShell.

So far, I have a simple python script that should just execute and call the JIRA API, at this point just for testing it looks like this:

import sys
import json
import requests
import zipfile
import tkinter
from tkinter import messagebox
#response = requests.get('https://xxx.atlassian.net/rest/api/2/project/proj1,auth=('xxx@xxx.com', 'pw'))
with requests.Session() as session:
    session.auth= (xxx@xxx.com','xxxxxxxxxxx')
response = session.get('https://xxxx.atlassian.net/rest/api/2/project/proj1')
#print(response.json())
root = tkinter.Tk()
root.withdraw()
messagebox.showinfo("JIRA Info", response.json())

I don't see any indication that this ever gets called, although the business rule is set up to email the technician after execution (myself) and that is working.

Does anyone have a working example of something similar to what I'm trying to do, or have any idea, documentation etc. on how to get this working?

For the execute script I have tried 2 different approaches:

Execute Script "cmd  py ExecuteScript.py $COMPLETE_V3_JSON_FILE"

and

Execute Script "cmd ExecuteScript.py $COMPLETE_V3_JSON_FIL

but nothing seems to happen.

Any guidance is greatly appreciated.

Thanks,

TC


                  New to ADSelfService Plus?