I need to trigger a certain even in an external database when a workflow status transitions from A to B. I have successfully used the post function which triggers a webhook on status transition but i am still stuck with triggering a database function. since webhooks accept 'https' in the url so no database address can be specified there. How to connect the workflow transition to the databse (which i connected using scriptrunner resources) . i am not on jira cloud
You can use SR to connect to a database and issue SQL in it. The main recipe I have bookmarked for that is https://scriptrunner.adaptavist.com/5.4.28/jira/recipes/misc/connecting-to-databases.html
Thanks Nic, I had gone through the above adaptavist resource but my main concern still remains how to connect workflow transitions to the database? I can query the database using sqls but how will the database know when an issue is say updated?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can put the code that connects to the database into post functions (if you want to issue the SQL on issue changing status), or listeners if it's for any form of update.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am sorry but I think I didn't understand you. The database connection will be achieved by SR resources. What am I supposed to write in the post functions? Also I saw only predefined post functions, does jira allow custom postf too? Apologies for too many questions, I am new to JIRA .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.