Forums

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

Increment data number on summary field when a new ticket created from Jira Automation on Schedule.

Rajesh Konda
Contributor
November 16, 2021

Hi All,

 

I have a requirement to auto create tickets on scheduled basis with jira automation, and on summary field each time a ticket is created it should increase number ex

1. schedule

Summary :  XXXXXXXX Release 21

2. Schedule

Summary   :   XXXXXXXXXXX Release 22

 

3. Schedule

Summary   :   XXXXXXXXXXX Release 23

 

each time a new ticket created the release number should increase, can any one suggest how can i achieve. Thanks

 

Regards,

Rajesh

2 answers

1 accepted

4 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2021

Hi @Rajesh Konda 

I can think of three ways to accomplish this:

  1. Use the Lookup Issues action with JQL (e.g. project = myProject AND summary ~ "Release" ORDER BY summary DESC) to get the last issue created, and then extract and increment the value
  2. Use a project entity property to store the last value used, and increment it as needed
  3. If you are using versions (releases) to support this approach, find the last released version (or upcoming one) to extract the number and increment it

Kind regards,
Bill

Rajesh Konda
Contributor
November 18, 2021

Hi @Bill Sheboy  Thank you for response, unable to understand from where to start. Can you please suggest with an example please.

 

Regards,

Rajesh.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2021

Hi, Rajesh.  I will try to help with more details, but first...

Are you using Jira versions along with this or are these "Release" values independent of the built-in ones?

You note doing this on a schedule.  What drives that schedule?  Some event happening or is this just on time, such as every 3-days?

Thanks!

Rajesh Konda
Contributor
November 18, 2021

Hi @Bill Sheboy  

We are not using version, actually these versions are from developers project and they want an automation to be created on db project with their release. DB team is not using the versions or release on their one.

Yes the automation is schedule and it executes every 3 weeks.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2021

Thanks for that information.  I encourage you to read about creating rules before you start: https://www.atlassian.com/software/jira/guides/expand-jira/automation

Your rule could be something like this:

  • trigger: scheduled every 3 weeks with no JQL
  • action: lookup issues with JQL to gather those issues.  Please update this as needed and test it with advanced filter search to confirm it works
    • project = myProjectName AND summary ~ "Release" ORDER BY summary DESC
  • action: create variable to store the next number, extracting it from the summary
    • name: varReleaseNumber
    • value: {{lookupIssues.first.summary.substringAfterLast("Release").asNumber.plus(1)}}
  • action: create issue, setting your summary as needed
    • XXXXXXXX Release {{varReleaseNumber}}
Like # people like this
Rajesh Konda
Contributor
November 20, 2021

Thank you Bill for your support, it worked and automation is able to add value for new tickets. Really Appreciate your help.

Like Bill Sheboy likes this
Gareth Whitley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 11, 2023

This has been really useful. My 'number' is in the middle of the summary text so I modified the above lookup value to the below. It may not be the most efficient way for this case but it works at the moment.

{{lookupIssues.first.summary.substringBetween("Sprint","into").trim().split(" ").first.asNumber.plus(1)}}

Like # people like this
0 votes
Abhi August 4, 2023

Hello @Bill Sheboy 

Can you please Suggest me the automation Rule for Below example:

I have seeking your help because this seems to be close to my example below:

To have a field that is automatically populated on creation, with the value "REQ.(N+1) where N is the value from the most recently created story., and whenever a issue type = story is deleted, Then it has to continue the Next Incremental value , when a new story issue is created.

Please let me know if any information is in need from my end.

Regards,

Abhi

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2023

Hi @Abhi 

I suggest you create a new question, and link back to this thread.  Otherwise only the people following this one will see it.

When you do that, please post images of your complete rule, the audit log details showing the rule execution, and describe what is not working as you expect.  That will provide context for the community to offer suggestions.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events