I have writen code like below.
// Specify the issue key to update
def issueKey = 'VD-13'
// Get today's date to set as the due date
def today = new Date()
// Update the issue
def result = put("/rest/api/2/issue/${issueKey}")
.header('Content-Type', 'application/json')
.body([
fields:[
// Set the due date to today's date
customfield_10655: today.format('yyyy-MM-dd') as String
]
])
.asString()
// Validate the issue updated correctly
if (result.status == 204) {
return "Success - The issue with the key of ${issueKey} has been updated with a new due date"
} else {
return "${result.status}: ${result.body}"
}
My requirement is +5 days needs to be add to current date.
For example today date is 6 and system needs print (6+5) 11.How could i write code for that.
Thanks in advance.
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.