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,556,047
Community Members
 
Community Events
184
Community Groups

Automation: Remove label that was added

Hello,

 

I'm using some integrations with Coda.io on JIRA, and one of those is going to be used to "Change a sprint" in JIRA. Unfortunately the integration kind of sucks, so I've come up with this idea using labels, which I can change with the integration easily. It's easy to set up a label to trigger automation to move to the Backlog. The automations will move them to the backlog and still be tagged to the correct Board (we have multiple boards driven by a custom field for each team). But when I want to move to a specific board, say "DevOps Sprint 8" or "Platform Sprint 7," is where I come up with issues.

 

Steps:

  1. I'll automatically set a new label for the issue, "coda-sprint-change-to-DevOps Sprint 7" -- I'll be able to add a label dynamically that includes a name of a new sprint as the last piece of text after the last "-"
  2. I need the automation to recognize this, which I can do with the below smart field in the image

ChaseScreenshot 2023-04-20 at 17.20.55@2x.png

 

  1. Question 1: Then I need to actually change the sprint to this value. I have no idea how to do this with smart fields? Imagine I'd have the name of the sprint, but not the ID. So I'd have "coda-sprint-change-to-DevOps Sprint 8" of which the Sprint Name is "DevOps Sprint 8" -- how can I split by "-" and get the text "DevOps Sprint 8" and then set the Sprint with the title vs the key of the sprint?
  2. Question 2: Next, I want to remove the label. So just whatever labels have "coda-sprint-change" in them, remove those labels

 

 

2 answers

1 accepted

0 votes
Answer accepted

Hi, 

 

I was able to solve this. Specifically, I had to:

 

  1. Add a "Sprint ID" custom field that is set by automation, so that when I grab JIRA tickets in Coda I am able to get the Sprint ID
  2. Use that in the label "coda-sprint-change-592" for example
  3. Then edit with
{
"update": {
"labels": [{
"remove": "{{varLabelIterate}}"
}]
},
"fields": {
"sprint": {{varLabelIterate.split("-").last.asNumber}}
}
}
  1. ChaseScreenshot 2023-04-21 at 12.57.50@2x.png
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 21, 2023

Awesome!

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 21, 2023

Hello @Chase Schwalbach 

Welcome to the Atlassian community!

I'm still thinking about your first question.

Regarding your second question, yes you can remove 1..n values from the Labels field.

Use the Edit Action. Select the Labels field as the one you want to Edit. Next to the data field click the ... button and select ADDREMOVE. That will give you two fields; one for specifying Label values you want to add, and one for specifying Label values you want to remove.

Screen Shot 2023-04-21 at 12.35.58 AM.png

Hey, but the system wouldn't know what the label is ahead of time. So I'd need to intake that from the trigger to know if I'm removing "coda-sprint-change-to-DevOps Sprint 8" or "coda-sprint-change-to-Platform Sprint 8"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events