I need to write a groovy script in post function to create or update a jira issue using rest api
Please Help.
Thanos, the script worked fine but when used in post function, it did not create any issue . Rather, i got error as "groovyx.net.http.HttpResponseException: Bad Request".
Can you please let me know if i need to do something else also, in order to create issues in this way?
Ankita, The link Vasiliy posted is really informative. You said it doesn't work for you ? Do you get any errors in your logs ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But why? When you're running a script, you have access to your JIRA. It's far faster, easier, flexible and more efficient to create them in the script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes right, I have access to JIRA but want to create issues within JIRA using REST API (REST APIs available for JIRA; https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue) within a post function with groovy script. Later i will use REST API of some other applications.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think Thanos is questioning the requirement. You already have direct access to the JIRA that your post-function is running in and do not need to use REST to talk to it. My guess is that you are writing code that updates another remote JIRA?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanos, i have to use rest api only. Please suggest me. Vasiliy, i have already checked this link. The code is not working for me within post function. Would it be possible for you to provide me with a very basic code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ankita, is there a particular reason you want to use the rest api ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try to use this: https://answers.atlassian.com/questions/33129265
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vasiliy, I am new to this code but on using it, I am unable to resolve HTTPContext. Even though I am using correct import statements, but it is not working for me :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.