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,456,603
Community Members
 
Community Events
176
Community Groups

How could I assign a dynamic label based on a custom field value and update date?

Edited

Dear community,

We have a custom field "Severity" which has 'Emergency', 'Sev.1', 'Sev.2' and 'Sev.3' as options. If the value is "Emergency" We would like to automatically assign the label "Emergency_YY_WXX" to the ticket, where 'YY' and  'XX' must correspond to the year and the week numbers of the date on which the ticket was set as Emergency. 

We're use to work with ScriptRunner, and I've look around a similar case but I did found a clear solution to dynamic labels.

Could you help me on this one?

3 answers

1 accepted

0 votes
Answer accepted

Hi @Fabio Racobaldo _Herzum_ , @Marco Brundel 

Thanks for your inputs, unfortunately we do not have automation in our JIRA instance, so I could not use Marco's option.

I'm not familiar with Behaviors, I will take a look and see if I can make a script with that.

Thanks

2 votes

Hi @OriO ,

Behaviour is a good option. But you can also have a look at Automation for Jira.

When I set 

Emergency_{{now.format("yyyy")}}_{{now.weekOfYear}}

in 'comment on Issue' action I get as a result

Emergency_2022_51

 Screenshot 2022-12-14 at 11.53.45.png

Regards, Marco

correct @Marco Brundel , automation is a good solution ;)

Like Marco Brundel likes this
2 votes

Hi @OriO ,

you can implement that requirements through a Behaviour (something like https://docs.adaptavist.com/sr4js/latest/features/behaviours/behaviours-examples/setting-field-defaults

Please let us know if you need support on that.

Fabio

Suggest an answer

Log in or Sign up to answer