You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I like using hashtags as labels. Some tools support this as part of a "quick entry" feature, like Todoist's Quick Add feature.
For example, in Quick Add if I enter:
Clean the car #for-wife
It will create a new todo with a title of "Clean the car" and a label of "for-wife".
This can be accomplished with Jira automation!
Navigate to Project Settings -> Automation.
Click the "Create Rule" button.
Select the "Field value changed" trigger and select the "Summary" field and click "Save".
Click "New Condition" -> "Issue fields condition".
Select "Summary" for the "Field".
Select "contains" for the "Condition".
Enter this for the Value:
#
(Note that is <space>#)
Click "New branch" -> "Advanced branching".
Enter the following smart value:
{{issue.summary.match(" #(\w+)")}}
and the following Variable name:
mylabel
and click "Save".
Click "Add component" under the "For each" branch and click "New action" -> "Edit issue".
Choose the "Labels" field to set.
Next to the field click the three-dot menu and select "Add/remove values".
In the "Values to add" field enter:
{{mylabel}}
and select the resulting "Smart value {{mylabel}}" menu entry (this is not obvious but critical!).
Now click "Save".
Do you want to automatically have Jira remove the hashtag values from the summary? Then do this:
On the component line that is executed after the "For each" click "Add component" -> "New action" -> "Edit issue".
Under "Choose fields to set..." select "Summary".
Enter this in the Summary text field:
{{issue.summary.replaceAll("( #\w+)", "")}}
and click Save.
Ok, now regardless of whether you added the removal of hashtags or not, you need to save and publish this rule:
Give your automation a name in the "Name your automation..." text field. Something like "Extract labels from summary hashtags" works.
Now click the "Turn it on" button. Done!
To test, simply edit a current ticket or create a new ticket and include some hashtags in the summary:
This is my test ticket #foo #bar
Shortly after saving the ticket you should see new labels "foo" and "bar" show up on the ticket.
Congratulations!
Here are some screenshots to show what it looks like when set up properly: