Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Edit labels from within lookupIssues

denis.sheridan
Contributor
February 15, 2023

I have a scheduled rule via CRON that runs at the end of day to compile a list of all issues with a given label "notify" and send out a single Slack message containing a list all of the corresponding issue keys. At the end of this rule I would like to remove the "notify" label from every issue, so that they are not included the next time this automation runs; however, I am unsure how to accomplish this.

Here is a screenshot of my what I was trying:

Screenshot 2023-02-15 at 2.34.32 PM.png

My attempt to remove the label via {{labels.remove("notify")}} successfully removes "notify" from the list of labels that gets printed; however, it does not actually remove that label from the issue.

My other attempt was to include the Edit Issue action; however, when I try that I receive the following error:

Screenshot 2023-02-15 at 2.42.09 PM.png

I understand why I'm receiving that error (I'm not specifying any JQL for the trigger); however, is there anyway to force Edit Issue to use the results of a Lookup Issues action?

1 answer

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
February 15, 2023

Hello @denis.sheridan 

Welcome to the Atlassian community.

One way to accomplish the goal would be to add another step to your rule for Branch / Related Issues / JQL to retrieve the same issues again. Within the branch you can add an action to remove the label from each issue.

denis.sheridan
Contributor
February 15, 2023

Worked like a charm! Thanks for your help :)

Like Trudy Claspill likes this
denis.sheridan
Contributor
February 15, 2023

Out of curiosity... is there also a way to perform the label removal inside of {{ ... }} in the Slack message?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events