Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I incement custom field based on value of previos issue?

Ismael Garcia April 9, 2021

Hello there!

I'm trying to create a rule with automation (it seems the only way posible without other App) that increment in 1 a custom numerical field, but i'm a bit stuck in the last part, I do not know how to refer to the previos issue or if it is posible. If it is posible, i´m looking to add this feature to the epics.

Eg: Lets say we have the epic ep-3 and has a value of 15 in "Number" field (Number is the name of my custom numerical field) and I create ep-4, I expect to tha the field "Number" ends up with a value of 16.

 

Thanks in advance!

Ismael.

1 answer

1 accepted

2 votes
Answer accepted
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 10, 2021

Hi @Ismael Garcia ,

would you please provide us more information, why do you need such a thing? Probably there's some way how to do it, but I feel this kind of thing could go wrong in many different ways (like somebody deletes one of these issues etc.). So, maybe there's much easier way, that's why I would like to know what's behind this. Thank you.

Ismael Garcia April 13, 2021

Hello Hana!

 

Sure, we have a Ref Id i need to relate to epics only for one project, and i wish that this fields autopopulate based on the previous one (epic, remember, only for epics in one project) so i can acces this ID from the epic. No one should be hable to delete any task since i removed the delete permission to everyone, i let the cancel the task if they need to.

 

Thanks!

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 15, 2021

Hi @Ismael Garcia ,

I would try to use Lookup objects:

JQL: type = Epic ORDER BY Custom Field Name DESC

Then the last ID could be available using smart value:

{{lookupIssues.first.Custom Field Name}}

Please, be aware, that I didn't test it, but it seems to me it could work.

Ismael Garcia April 20, 2021

Hello Hana! I tried without luck, don´t know if i did something wrong or actually don´t work, logs aren´t very good, thanks!

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 21, 2021

Hi @Ismael Garcia ,

would you please share me your configuration and logs? Thank you.

Ismael Garcia April 22, 2021

Hello @Hana Kučerová

Sure! I detected 2 thing i have to adjust but don´t know how to. The first one is to take the last created but not considering the one is being created at the moment, that is actually the last one, the second one is adding 1 to the custom field.

image.png

Logs.

image.png

Thanks in advance for the help!

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2021

Hi @Ismael Garcia ,

thank you!

About the first one - what about to add something like

"your custom field" is not EMPTY

to your JQL - because the last one has the custom field empty, right?

Would you please also share me  "Edit issue fields" configuration? Thanks a lot.

Ismael Garcia April 22, 2021

Great idea @Hana Kučerová ! Thanks! the JQL is working properly now! but i'm not being able to edit the field correctly, the log said that is saved succesfully.

At the moment just have this in the edit, just getting to know smat values now...

{{lookupIssues.first.N° Presupuesto.plus(1)}}

 image.png

Thanks!

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 23, 2021

@Ismael Garcia Thank you! I will try to simulate it and make it work during weekend and let you know. 

Like Ismael Garcia likes this
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2021

Hi @Ismael Garcia ,

unfortunately I wasn't able to make this work. It is not possible to get custom field values using lookupIssues :-(. 

I will try to think of something else, but to be honest I'm out of ideas. Maybe send web request and get the data using REST API, but it seems too complicated.

Ismael Garcia April 26, 2021

Hello @Hana Kučerová ! How are you?

Thanks for all the Help!

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2021

Hi @Ismael Garcia ,

please look at this post. It looks like project properties could be used.

Like Ismael Garcia likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events