I would like to perform automation every 2 week to increment labels numbers, exmaple:
if label contains "WW" (i.e. full label: "WW47-48/2023") i would like to remove it and create and apply the incremented label "WW49-50/2023".
PS
i managed to do a scheduled automation, just need to figure out the labels
Hi @Tamir Melamed ,
this is a bit more complicated than it looks because you need the Smart Value to identify the week number in the label, and then increase it.
I have not tested this, but you could try and see if this works for example :
"WW" + ({{issue.labels.first.match("WW(\\d+)-\\d+/\\d{4}")[1]}} as number + 1) + "-{{issue.labels.first.match("WW\\d+-(\\d+)/\\d{4}")[1]}}/{{issue.labels.first.match("WW\\d+-\\d+/(\d{4})")[1]}}"
You might need to adapt it if that doesn't work exactly as expected.
Let me know if this helps,
--Alexis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
would it work:
{
"update": {
"labels": [
{
"add": "WW{{now.addWeeks(1).format("WW")}}-{{now.addWeeks(2).format("WW")}}/{{now.format("YYYY")}}"
}
]
}
}
?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.