Right now I have a Curl command that creates a sub-task in JIRA called Backup Restore. What I am trying to find is the command that will add today's date before the subject name.
Example: 2015-10-19 Backup Restore
I tried some linux commands like date +%Y-%m-%d but that doesn't seem to work. Below is the command I am using.
curl -D- -u UserName:Password -X POST --data "{\"fields\":{\"project\":{\"key\":\"TCHP\"},\"parent\":{\"key\":\"TCHP-1\"},\"summary\":\"Backup Restore\",\"description\":\"Don't forget to do this too.\",\"issuetype\":{\"id\":\"5\"}}}" -H "Content-Type: application/json" https://myjiraURL.com/rest/api/latest/issue/
Thanks for the help,
Greg
Community moderators have prevented the ability to post new answers.
Why don't you write it as a bash script? I am sure that would work as you can add a variable for the summary that has the date pre-pendend and use that.
Currently the curl command is setup in a bash script but I am not sure where to place to date command in the script. I am trying to use $ date +"%m-%d-%y" but where ever I put it the script stops working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, got it! I used this. "summary\":\"$(date +"%m-%d-%Y") Backup and Restore\"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.