How to create an issue automatically in JIRA without Jelly ?

Today it's easy to create an issue automatically in JIRA.

A crontab controlled Bash-Script writes the jelly-code every day.  For example like this

 

<!-- Start -->
<JiraJelly  xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib">
<jira:CreateIssue
project-key="PCI"
issueType="Aufgabe"
assignee=ich
summary="PCI-Pruefung 10.6 Review logs fuer Gruppe ipsadm am 14.07.2015"
priority="Normal"
description="Review logs for all system components at least daily. "
duedate="21/Jul/15"
reporter="klumph">
</jira:CreateIssue>
</JiraJelly>
<!-- End -->

 

The Jelly-Service in JIRA is enabled and every day the issues are created.
Without Jelly i found no way to do that in such an easy manner. I know there is "Script Runner" but i found no solution for my problem.  Im not a programmer. Can anyone give me a tip ? Thanks in advance.

Heiko

2 answers

Doing this by a script is one thing. If you want to schedule creation of an issue from the UI you can check this plugin - https://marketplace.atlassian.com/plugins/pl.com.tt.jira.plugin.theschedulerpro . Maybe this is what you are looking for with a little better user friendly UI.

0 votes

As you mention you've got a bash script that runs to create this jelly script, I'd reuse that.

Instead of updating the jelly, I'd use it to create the issue over REST, probably by using curl in the script!

See https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue for the curl you'll need (I think you'll see how to translate the Jelly above into JSON for the curl command)

Wow, thank you very much.
This solution is easy like jelly wink . Great.
For other customers with the same problem. Here is my example curl

"curl -D- -k -u klumph:mypassword -X POST --data @/opt/jira/data.txt -H "Content-Type: application/json" https://jira.test.server/jira/rest/api/2/issue/" <-- one string 

with /opt/jira/data.txt

{     
    "fields": {
       "project":
       {
          "key": "PCI"
       },
       "summary": "PCI-Pruefung 10.6 Review logs fuer Gruppe ipsadm am 15.07.2015",
       "assignee":
       {
          "name": "ich"
       },
       "duedate": "2015-07-21",
       "description": "Review logs for all system components at least daily.",
       "issuetype":
       {
          "name": "Aufgabe"       
       }   
   }
}

 

Heiko

Neat translation example, that'll help a lot of people trying to convert! Thanks!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,965 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot