Forums

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

How to store a custom field coming from bulk process

vincenzo_spatafora
Contributor
November 20, 2025

Dear ALL,

I understand that a work-around about the current Jira DC lookup limitation over custom fields is to code an automation rule with When=Scheduled and then select the bulk option.

My question is: given that (the automation rule), is there a way now to store the same/specific custom field of all the issues coming from the applied JQL in a variable?

So, I can use these variables later on in the automation rule in order to make calculation?

As you can see below, I have used this syntax {{issues.get(0).fields.customfield_19141}} but it gives (as expected, I think) the values of all the issues found (in this case 2):

Completion_Bulk.jpg

I use Jira DC version 9.12.24.

Thanks, Vincenzo.

2 answers

0 votes
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 Champions.
November 24, 2025

Hi @vincenzo_spatafora 

First regarding the limited fields in Lookup Issues in Jira Server or Data Center automation, there are two possible workarounds...depending upon needs / context:

  • When you only need to read the data and your rule is not yet using branching, try the bulk-handling option and the plural {{issues}} smart value.  (My understanding is this immediately gets "broken" if you reference the singular {{issue}} smart value in the same rule scope.)
  • For all other cases, call the issue search REST API endpoint using the Send Web Request action, and then use the web response in place of {{lookupIssues}}

 

Next, I am unclear what you are trying to accomplish for your scenario.  Perhaps you could try explaining it again.  Thanks!

 

Finally, from your other post about lookup tables, one workaround would be using the dynamic list searching methods I describe in this article.  For example:

  1. gather the data for the issues using the REST API method
  2. store the issue key, field data, etc. in a delimited list using Create Variable; this will be your proxy "lookup table"
  3. create a dynamic regular expression in another Create Variable as a proxy of the lookup  table get() function for "key"
  4. use the variable from #3 with the match() function to search the list in #2, extracting your results using text functions

 

Kind regards,
Bill

vincenzo_spatafora
Contributor
November 25, 2025

Thanks @Bill Sheboy,

I would like to calculate the mean average of all the completion field values coming from all the JQL issues.

In my example, the total of issues is 2, completion value for issueA is 40 and completion value for issueB is 30.

I have applied then the workaround as described in the article you posted but I can get only the value of the first issue and not of the second: that's the meaning of the workaround being partial? Working only for the first issue?

See please below:

Part1.jpg

 

Part2.jpg

Thanks a lot,

Vincenzo.

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 Champions.
November 25, 2025

Thanks for that information, @vincenzo_spatafora

What do you want to do with that mean (i.e. arithmetic average) value?  

 

Let's assume you only want to calculate it, such as for sending in a message.  That is quite simple:

  • trigger: scheduled, with JQL and using the bulk-handling option
  • action: send email, with the average value of...
{{issues.customfield_19141.average}}

 

If instead you wanted to save the average in another field, another technique is required in order to both get the issue data and then update some other issue (perhaps with a branch), using the Send Outgoing Web Request action.

  • trigger: scheduled, with no JQL
  • action: send outgoing web request
  • branch: with JQL to the issue you want to update
    • action: edit issue, to set the field to the average with...
{{webhookResponse.body.customfield_19141.average}}

I am not using Jira Data Center, so please confirm the specific endpoint and response structure.

 

vincenzo_spatafora
Contributor
November 26, 2025

Thank You @Bill Sheboy very much.

Kind Regards,

Vincenzo.

Like Bill Sheboy likes this
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 Champions.
November 26, 2025

Hi @vincenzo_spatafora 

Just to confirm...did that solve this question for you?  If so, please consider marking this one as "answered".  That will help others with a similar need find solutions faster.  If not, please let the community know what help you need with the rule.

Thanks!

vincenzo_spatafora
Contributor
November 27, 2025

Hi @Bill Sheboy,

I haven't tried the send web request.

About the first technique,  I have tried it and

{{issues.customfield_19141.average}}

gives me no value.

Then I have stopped investigating further as I understand Jira DC will be decommissioned.

Thanks a lot anyway for your great assistance,

Vincenzo.

Like Bill Sheboy likes this
0 votes
arielei
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 Champions.
November 20, 2025

Hello @vincenzo_spatafora 

Do you have an option to add an action "create variable"?

Ariel.

vincenzo_spatafora
Contributor
November 21, 2025

Hi @arielei , thanks for your message.

Yes, I have this option, so, what am I supposed to do now?

Thanks in advance,

Vincenzo.

arielei
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 Champions.
November 21, 2025

Hey @vincenzo_spatafora 

First, since you are running a branch on JQL, remove the JQL from the trigger, and add it to the JQL branch.

Before doing the branch, create a variable with value NULL and then in the branch, create the same variable again and set the value from the issue.

 

give it a try.

Ariel.  

vincenzo_spatafora
Contributor
November 21, 2025

Thanks @arielei.

Do you mean something like this:

Completion_Average.jpgAs you can see, it gives me the sum of itsself.

How can I store the single value such that the sum is (in this example) 70?

And on 70 I need to work out then the mean avearge, so, in this case 35.

Thanks, Vincenzo. 

arielei
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 Champions.
November 21, 2025

Hey @vincenzo_spatafora 

First, set the Completion before the branch to "0" instead of Null.

Then, inside the branch when you create the var write: 

{{#=}}{{Completion}} + {{issue.Completion}}{{/}} 

 

Note - {{issue.Completion}} is the value from the issue - i guess that is what you are doing in the var.

 

Let me know if that works.

Ariel.

vincenzo_spatafora
Contributor
November 21, 2025

Thanks @arielei

I check now, and by the way, how can I get the number of issues given by the JQL?

In this case, 2.

I need it to make later on in the automation rule the average of 30 and 40.

Thanks, Vincenzo.

arielei
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 Champions.
November 21, 2025

hey @vincenzo_spatafora 

if you have an action called "Lookup issues" then simply do Lookup issues on that JQL and then you can get the size by {{lookupIssues.size}}

vincenzo_spatafora
Contributor
November 21, 2025

Hi @arielei,

but that's the underlying problem: the lookup function is NOT working for custom fields; if it were, it would have been very easy to code an automation rule working out the completion average of a bunch of issues.

So, now, are you suggesting to use in my automaiton rule either the lookup and branch for JQL?

Thanks in advance,

Vincenzo.

vincenzo_spatafora
Contributor
November 21, 2025

So @arielei,

here what I have done and still not working.

Where is the error?

Completion_Average_2.jpg

Where the var Completion is this smart value : {{issue.fields.customfield_19141}}; in the first "And: Create variable".

While in the second "And: Create variable" I set Completion to 0 (as smart value).

Thanks a lot,

Vincenzo.

 

arielei
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 Champions.
November 21, 2025

hey @vincenzo_spatafora 

ping me via linkeding and lets jump on a call and i'll try to assist.

vincenzo_spatafora
Contributor
November 23, 2025

Thanks @arielei for that but I can NOT share my screen.

What is unclear for you about what I have described and attached so far?

Cheers, Vincenzo.

arielei
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 Champions.
November 24, 2025

Hello @vincenzo_spatafora 

i dont need to see your screen, i just need some info on what you are staying to achieve.

vincenzo_spatafora
Contributor
November 24, 2025

Hi @arielei 

thanks for your patience.

What I would like to achieve is to calculate the mean average of all the completion field values coming from all the JQL issues.

So, if the JQL is giving me 2 issues, I would like to make the mean average of the completion value coming from issue 1 and coming from issue 2.

In my example, it would be (30 + 40) / 2, so 35.

But as reported above, I struggle to find a way to store in a variable each of the single completion (completion from issue 1 and completion from issue 2) such that then later on I can use them in the automation rule to do their sum (in this example 30 + 40) and divide (in this example by 2).

I really would like to know if this is possible in Jira DC (I understand this is possible with Jira Cloud by simply using the lookup function which is working also with the custom fields; my completion field is right a custom field).

 Thanks in advance, Vincenzo.

arielei
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 Champions.
November 24, 2025

Hello @vincenzo_spatafora 

I understand,

So like i wrote above:

1. create a var outside the branch with value 0.

2. create a var that holds the number of issues by doing lookupissue on the JQL.

2. inside the branch, create the same var but the value will be 

{{#=}}{{VAR NAME}} + {{issue.Completion}}{{/}} 

3. after the branch,  simply do 

{{#=}}{{VAR NAME}}/{{lookupissue.size}}{{/}} 

 

In DC that should work.

Let me know.

Ariel. 

vincenzo_spatafora
Contributor
November 24, 2025

Thanks @arielei.

I've done that but it seems not working:

1. (outside the branch)

 VAR_Completion.jpg

2. (inside the branch)

VAR_Completion_Inside.jpg

And here what I get:

Results.jpg

Thanks in advance, Vincenzo.   

arielei
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 Champions.
November 24, 2025

Hey @vincenzo_spatafora 

If the custom field is a number field, try doing this:
Remove the branch and instead create the var after the lookupissues and give it the value: {{lookupIssues.CUSTOM_FIELD.sum}}

 

check if that works,

Ariel.

vincenzo_spatafora
Contributor
November 24, 2025

Hi @arielei,

thanks and Completion for me is a Select List (single choice).

What would it be the lookup syntax in this case? 

Cheers, Vincenzo.

P.S.:

a) can JSON advanced fied editing solve this puzzle?

b) is lookup table available for Jira DC?

 

arielei
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 Champions.
November 24, 2025

Hello @vincenzo_spatafora 

a) you can use the JSON advanced field with the same method as i wrote above.

b) lookup table is not available in DC, only in Cloud.

 

Try to add ".asNumber" to the var you are creating, for example {{issue.Completion.asNumber}}

 

best regards,

Ariel.

vincenzo_spatafora
Contributor
November 25, 2025

Hi @arielei,

sorry for the delay,

I have checked that too and still not working. 

Cheers, Vincenzo.

arielei
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 Champions.
November 25, 2025

Hey @vincenzo_spatafora ,

sorry to hear that, i suggest that you will start thinking on migrating to cloud as DC is EOL.

vincenzo_spatafora
Contributor
November 25, 2025

What @arielei?

End of Life? By when?

Ciao, V 

arielei
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 Champions.
November 25, 2025
vincenzo_spatafora
Contributor
November 25, 2025

Hi @arielei,

thank You very much for your continous assistance.

Cheers, V.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events