Auto Create a closed issue

Hello, 

How can I auto create a closed issue every 11 weeks and assign it to specific engineer?

Thank you!

5 answers

2 votes

You need to write a script or scheduled task that can do this. And you might also want to consider reopening the issue (if that makes sense). Even that will need a script or scheduled task.

Why? 

If you only want to have one status it's easiest to create a workflow with one status

I had not thought of that. I assumed that we were talking about an already existing workflow.

Agree with Jobin. I used the free version of "SR Escalation Service" for this.

One way could be using REST api, invoked from a cron schedule with curl.

You could create the issue with the following curl:

curl -D- -u admin:admin -X POST --data '{"fields":{"project":{"key":"TEST"},"summary":"this is a test","description":"yes, a test","issuetype":{"name":"Task"}}}' -H "Content-Type: application/json" http://jira.example.com/jira/rest/api/latest/issue/

And then you'll need to do the transitions through the workflow towards the "Done" status

curl -D- -u admin:admin -X POST --data '{"transition": { "id": "21"}}' -H "Content-Type: application/json" http://jira.example.com/jira/rest/api/latest/issue/TEST-2/transitions

Adapt the above example and put both lines in a cron schedule and you are done

 

Thank you for all the responses, but I think I could not explain what I need clearly. 

1- I need to create the same issue every 11 weeks.

2- I need to assign this issue to the same user every 11 weeks.

For some reason I cannot response you all when I get your feedbacks, it looks like I have to wait 24 hours every time I post a question!

 

Thank you for all the help!

Point 1 - the first curl from my previous comment. To change the asignee (point 2): curl -D- -u admin:admin -X PUT --data '{"fields":{"assignee":{"name":"jira_user_name"}}}' -H "Content-Type: application/json" http://jira.example.com/jira/rest/api/latest/issue/TEST-1 (you need to know the issue key, i.e: TEST-1, so you'll have to extract it from the http response when creating) To do these operations every 11 weeks, you could set a schedule in a crontab.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira Service Desk

Looking for anyone who has switched from Zendesk to Jira Service Desk

Hi Community! The Jira Service Desk marketing team is looking for customers who have successfully switched from Zendesk to Jira Service Desk!   We’d love to hear your thoughts on the pros and ...

27 views 0 1
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