Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,459,886
Community Members
 
Community Events
176
Community Groups

How to write parameter/variable value into Tempo REST API url?

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{
val -> 
def returnDay = val.day
def returnAllocationId = val.allocationId

def removeTempoPlan = client.put(
    path: 'https://JIRAURLHERE/rest/tempo-planning/1/plan/remove/planLog/{returnAllocationId}?date={returnDay}',
    contentType: ContentType.JSON,
)}

Thanks in advance.

1 answer

1 accepted

0 votes
Answer accepted

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.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events