I am new to this Script Rest endpoints and i am looking for on a sample script on how we can create/clone an issue using this Rest end points.
Can anyone help me or guide me on this
Thanks
Adaptavist has a guide on this with some good examples: ScriptRunner - REST Endpoints.
Combine that with the code in Create an issue in Jira - Adaptavist Library and you'll have the starting points for learning how to create an issue via a scripted REST endpoint.
How do we pass multiple customfield parameters while creating the issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Going off that example, you'd use:
issue.setCustomFieldValue(CustomField customField, Object value)
for each of your custom fields you want to set. The object defined in
def issue = issueFactory.issue
is a MutableIssue object, so to find all the methods on that object, see this doc: https://docs.atlassian.com/software/jira/docs/api/7.1.9/com/atlassian/jira/issue/MutableIssue.html
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.