Forums

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

Jira Automation: variables in titles

ray January 3, 2020

Hi,

I'm desperately in search for a way to have variables (smart values) to display in the titles of newly created issues by automation.

The situation is this: my automation creates every week on monday a new story. I would like that each newly created story has a variable in the title, f.e. numbering:

Story 01
Story 02
Story 03
...

I have found a way to f.e. add the due date (or any date) to the titles, but that's still not enough. I would like to have a solution that it can f.e. count how many issues has been created in the past using that automation and always count 1 up.

Another related question is, besides the date displayed in the title, is it also possible to just show the week number?

3 answers

1 accepted

0 votes
Answer accepted
Aron Gombas _Midori_
Community Champion
January 7, 2020

As you mentioned that the week number could be an acceptable solution, you can tweak your current solution by using a different format pattern. 

The format() method accepts "w" to be replaced with the week number in that year.

I haven't tried, but try this:

TITLE {{now.plusBusinessDays(8).format("w")}}
ray January 7, 2020

I found a workaround to do some calculations based on the result of the week number. Or is there a function that could count the number of issues that has been created previously, or that already exist in the epics where this issue belongs to?

0 votes
ray January 3, 2020

@brbojorque 

We're using Automation for Jira.
It's an automation where it's creating a story each week.

 

The summary now is:
TITLE {{now.plusBusinessDays(8).format("dd/MM/yyyy")}}

otherwise, all the created stories would have the same name. But I don't like that formatting. I would rather have 01, 02, 03,... or week number: week 1, week 2, ...

the only unique identifier right now is the key or duedate of course.

ray January 3, 2020

otherwise I was thinking if there's a way to see how many stories has been created before in the epic that the stories are made in...

Jack Brickey
Community Champion
January 5, 2020

I don’t know of a way to do this with A4J. You might reach out to their support to see if it is possible.

0 votes
brbojorque
Community Champion
January 3, 2020

Hi @ray ,

You have any existing script to start with?

What is your current setup? Automation for Jira?, Listener?, Postfunction?

Is there any unique identifier for each issue created? We can use regex or JQL so we need the identifier of the last issue created.

Adding the Week number is possible aswell.

Just need few more requirements just to clarify things.

Suggest an answer

Log in or Sign up to answer