Hello team, I want to know if this is possible:
I have created a table that contains the time spent on some tickets, so I need to make a sum of this time, but I need to change some data based on the following criteria:
- If the ticket is duplicated, I need to do a time average and then use this number for the total sum.
- If the ticket is not duplicated but has more than 12 hours, then convert that number to 5 hours.
- If the ticket is not duplicated and does not have more than 12 hours using the hours reported.
This image is an example of what some data looks like:
The problem is that I need to see the hours per week, so when I remove the issue_key column, the sum is not done correctly
The table should look like this
This is the custom field I did, but It only works when I have the issue_key column and I’m not sure if this problem can be solved from a calculated field.
ifelse(
count({issue_key})>1,avg({hours_in_status})*distinct_count({issue_key}),
count({issue_key})=1 AND sum({hours_in_status})>10, 5,
sum({hours_in_status}))