I've got following code to delete TEMPO plans in Jira and use a val closure to get each allocationId and date so I can remove those plans again.
The url is blacked out for obvious reasons.
I would like to put the returnAllocationId and returnDay into the URL so i can send the PUT request for each allocationId and date and remove the plans from Tempo that way.
Is that possible? If so, how would I do this? The values I receive from the each function are correct, it just needs to be executed with the url each time now.
searchPlan.data.each{ <span>val</span> -> <span>def returnDay </span>= <span>val</span>.day <span>def returnAllocationId </span>= <span>val</span>.allocationId <span>def removeTempoPlan </span>= client.put( path: <span>'https</span>:<span>//JIRAURLHERE/rest/tempo-planning/1/plan/remove/planLog/{returnAllocationId}?date={returnDay}',</span> contentType: <span>ContentType</span>.<span>JSON</span>, )}
Thanks in advance.
Figured it out, had to put the date into a query and remove the https://JIRAURLHERE because I already used it as a base URL further top in the code.
It looks like you're new here. Sign in or register to get started.