Hi,
I would like to automate a spillover label addition when a sprint is closed and also add a comment to that effect.
Many thanks for all the help!
hi @João Ribeiro
Something like this should work...Use the trigger: When Sprint is completed - add the board that references the sprint
+
Edit - labels
Add - comment
Automating label addition when a sprint is closed can be achieved by leveraging workflow automation tools provided by project management platforms like Jira, Trello, or GitHub. Here's how you can approach this automation using different tools:
Using Jira-
Jira provides powerful automation features that can be used to automate tasks such as adding labels when a sprint is closed.
Navigate to Project Settings: Go to the project where you want to set up the automation.Automation Rules:Go to Project Settings > Automation.Click on Create Rule.Create a New Rule:Trigger: Select Sprint Completed as the trigger.Action: Select Edit Issue.Edit Labels: In the action configuration, set the label you want to add to the issues in the sprint.Save and Enable: Save the rule and ensure it is enabled.
Here's a detailed step-by-step:
Trigger: When the sprint is completed.Condition (optional): Add any conditions you might need.Action: Edit issues > Add labels.
Using Trello-
For Trello, you can use Butler (Trello’s automation tool):
Open Butler:Go to your Trello board.Click on Automation.Create a New Command:Choose Calendar or Due Date.Set the trigger for when a sprint ends (you might need to manually set the end date for sprints).Add an Action:Action: Add a label to all cards in the sprint list.Save Command: Save and enable the automation.
Using GitHub-
If you're using GitHub Projects, you can use GitHub Actions:
Create a Workflow:In your repository, go to Actions.Click on New Workflow.Set Up Trigger:Use a cron job or a specific event that signifies the end of a sprint.Define the Action:Use the actions/labeler GitHub Action to add labels to issues or PRs.
Example Workflow:
yaml
name: Add label when sprint closes
on:workflow_dispatch:schedule:- cron: '0 0 * * 0' # This runs every Sunday, adjust as necessary
jobs:add-label:runs-on: ubuntu-lateststeps:- name: Add Labeluses: actions/github-script@v3with:script: |const issues = await github.issues.listForRepo({owner: context.repo.owner,repo: context.repo.repo,labels: 'sprint-ending', // Adjust based on how you track sprint end});for (const issue of issues.data) {await github.issues.addLabels({owner: context.repo.owner,repo: context.repo.repo,issue_number: issue.number,labels: ['sprint-closed']});}
These steps allow you to automate the process of adding labels when a sprint is closed, ensuring consistency and saving time.
Hi @Neil Fletcher ,
Thanks for the quick reply. Maybe I did not explain my query correctly, but I only want to add the label & comment for open tickets when the sprint closes. I've tried to set this up, but getting this warning:
Any clue why?
Hi @Julio Herrera
Thanks for the quick reply. That is what I've tried to achieve but have this warning:
Adding a branch will get you past 'incompatible component' message
To select open tickets only, I added a JQL condition: statuscategory != Done(I use statuscategory instead of status as statuscategory is only: To Do, In Progress or Done... all statuses are always grouped beneath these choices.)
this is the result for open issues when the current sprint is closed.
The sprint moves to the next one, a comment is added and the label is updated
Thanks @Neil Fletcher
I don't why this error is coming, I will research it and let you know!
It looks like you're new here. Sign in or register to get started.