Forums

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

Creating a customfield that counts filter results

ldogangul February 28, 2019

I need to create a customfield that returns the count of specific filter results.

More Detail: I have some filters that helps me to analyse my issue statistics. I want to get more details like average..

So I need to count that filter results an store it into a customfiled and then devide it to certain numbers.

How can I store the count of specific filters to a customfiled ?..

Sample: Project = Demand and issuetype = Task..  That returns a list of 800 issues. I want to store the number 800, into a custom field..

Thanks for your help..

Levent

1 answer

0 votes
Tanya Gordon
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.
February 28, 2019

Hi,

What apps do you have? Do you have script runner?

Also, what do you want to do with these custom fields? Do you want to create some kind of a report based on those statistics? If so - do you have a reporting solution? EazyBI?

Regards,

Tanya

ldogangul February 28, 2019

Hi Tanya,

Thanks for your quick response. I am using Jira on server 6.2.2. I don't have Easy BI..

I have script runner and advanced cutom fields add ons.. I simply want to get the avegare of created issues and resolved issues with in a time period.

I want to calculate it by counting the filter results, store it into a customfield. and that divide it to some numbers in another CF..

The main thing is to get the number of filtered results into a seperate CF.

 

Thanks again.. 

Tanya Gordon -HP-
Contributor
February 28, 2019

I understand. So the way to do this is by using Script runner listeners. You should create a custom field of type number and update it from the listener. Note that using a scripted custom field for this might lead to inconsistent data, because these fields are intended to be displayed on screens, thus they are rendered (more then once) on every screen load.

So you should create a scripted listener that is triggered by the Issue Created event, runs the JQL query, runs the needed calculation and saves it to the custom field (explained above). Make sure to reindex the updated issue or save with history record. Also, where do you store the data? On a designated issue/issue type? 

Tanya

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events