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

1 vote
Mirek Community Champion Jul 15, 2015

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 vote

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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

138 views 0 3
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