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

How to Perform Custom Value Calculation for Rich Filter Gadget Use?

Blaine A February 25, 2021

Objective: Provide a gauge that displays a percentage of completed work based on a number of triaged tickets.

Background: We have a couple of queries that have been configured in the Rich Filter as custom values. (i.e TriageConfirmed and CompletedTickets) The custom values are both "Issue Count" value types with Total Formula set to "Total Count". We would like to display the percentage of completion in a SmartGauge that shows the result of (CompletedTickets / TriageConfirmed). In the RichFilter configuration it does not appear to have an option to create a custom formula based on the custom values.

Is this configuration possible without additional scripting? If so are there some additional docs/HowTos that can be provided?

Reference material:
https://wiki.qotilabs.com/rich-filters/user-s-guide/configuring-rich-filters/configuring-custom-values
https://wiki.qotilabs.com/rich-filters/user-s-guide/working-with-rich-filter-gadgets/the-rich-filter-smart-gauges-gadget

1 comment

Comment

Log in or Sign up to comment
Dan Mihalache _Qotilabs_ February 25, 2021

For this particular use case you don't need to define custom values.

My understanding is that you have a JQL for Completed Tickets and another JQL for Triage Confirmed. Completed Tickets is a sub-set of Triage Confirmed, is this correct? 

Then, you should use a Rich Filter Simple Gauge gadget. There are two cases:

- if the base JQL of your rich filter returns the Triage Confirmed tickets: then you just need to define a static filter using the Completed Tickets JQL. You should use this static filter as gauge level in the configuration of your Rich Filter Simple Gauge gadget.

- if the base JQL of your rich filter returns more than just the Triage Confirmed tickets: then you need to use the working query of your gadget to limit the issues that will be used in the gadget (use the Triage Confirmed JQL). Then, define a static filter using the Completed Tickets JQL. You should use this static filter as gauge level in the configuration of your Rich Filter Simple Gauge gadget.

In both cases, as Value you should use Issue Count (in the configuration of the gadget). 

Blaine A February 25, 2021

Thanks for your detailed response.

I have configured the Rich Filter Simple Gauge gadget as you described but I am still not getting the expected results.

I deleted the existing Rich Filter and started over to be sure none of the other attempts to get this working would affect this test.

Here is an example of the two queries and the issue count returned:

Completed Tickets -
labels = CompletedWidget AND resolved >= "2021/01/01" AND labels != Triage-NotValidWork AND status in (Done, Closed, Fixed)

Returns 1 issue

TriageConfirmed-
labels = WidgetWorkTriage-ConfirmedWork AND createdDate >= "2021/01/01"

Returns 2 issues

With the TriageConfirmed query as the base of the rich filter and the CompletedTickets static filter set as Gauge Filter the gauge shows 0% or 0% 0/2 with percentages and ratio layout set

With CompletedTickets query set as the base of the rich filter and the TriageConfirmed static filter set as Gauge Filter the gauge shows 0% or  0% 0/1 with percentages and ratio layout set

What I want/expect to see is 50% 1/2 since 1 ticket is completed and 2 were triaged as valid work.

Dan Mihalache _Qotilabs_ February 26, 2021

That's because the 1 issue returned by your "Completed Tickets" JQL is not among the two issues returned by the "TriageConfirmed" JQL. This is why I was mentioning in my previous reply that "Completed Tickets" needs to be a sub-set of "Triage Confirmed".  

The Rich Filter gauge gadgets allows you to show a ratio of a sub-query from a total. The gauge gadget computes the intersection of two JQLs, not a ratio of two arbitrary JQLs.

For example, imagine you have your base JQL: project = X (this is the total). And then you have a gauge level (a static filter): status = Closed. The gadget will show the number of issues returned by project = X and status = Closed (this is the gauge level) from the total project = X. Or, more in functional terms, the percentage of issues Closed from project X. If you have 5 issues in project X and two of them are closed, then the gauge will show 2/5. The gauge level is always a sub-set of the total. The JQLs are combined in the gauge level. 

A gauge cannot display the ratio of two arbitrary JQLs. Because imagine your gauge level JQL returns more issues than the total. Then you'd have a percentage that exceeds 100% and this cannot be displayed in a gauge (a gauge can display maximum 100%).

I don't know your exact functional use case, but you need to adapt your implementation so that the totals JQL (TriageConfirmed) also includes the issues in the first JQL. I have the feeling you have a system of labels that are added when the triage is confirmed but then removed when the issues are completed. The total should not exclude the issues from the gauge level JQL. 

Hope this helps. 

Blaine A February 26, 2021

Because the issues are not directly related by project or otherwise that is why I was hoping that using custom values would allow me to create my own formula to populate the gauge with. In this use case tickets from various projects are triaged and if work is identified from the triage a new ticket in an unrelated project is created  and then when those tickets are closed that gives the CompletedTickets value.

What I understand from what you have shared we should just use the CompletedTicket project and use the TriageConfirmed label on those tickets to produce the result we are looking for.

Thanks this discussion has been helpful.

TAGS
AUG Leaders

Atlassian Community Events