Forums

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

Field Value from Another Ticket

Ahsan Riaz November 10, 2022

Hi,

Is there any wo to copy a value from the custom field in the previously created ticket to the new one by incrementing 1

1 answer

0 votes
Alex Koxaras -Relational-
Community Champion
November 10, 2022

Hi @Ahsan Riaz 

The only way I can't think of this to happen is by using either scriptrunner of JMWE. With the latter you can create a listener which will find the value of the previously created ticket and increase it by one.

On second thought maybe you could do that with Jira AUtomation as well but you have to use smart values. The idea is:

  • When issue created
  • Get issue key of the newly created issue.
  • Get the number by using
{{issue.key.substringAfter("-")}}
  • Lookup the issue with key
{{issue.key.substringBefore("-")}}-{{issue.key.substringAfter("-").asNumber.minus(1)}}
  • Log the value using
{{lookupIssues.PlannedStartDate}}

 

Follow the rule I made below which for now it only logs just the value and nothing more, and it works fine:

lookupissue from previous issue.png

From then on, if your value is numeric then on the smart value do .plus(1). If it's a text convert is first to a number like I did previously. Let me know if that worked out for you!

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