Hours spent on linked issue by a custom text field

How it works?
It is necessary to display the hours spent on tasks that have a link to the task number in the text field.

If I use this code, then it works.

Sum(Filter(
      Descendants([Issue].DefaultMember, [Issue].[Issue]),
[Measures].[Hours spent] > 0 
AND
     [Measures].[Issue link to task] MATCHES 'task-100'
      ),
[Measures].[Hours spent]
      )

But if it is, it gives out an empty.
It doesn’t work.

Sum(Filter(
      Descendants([Issue].DefaultMember, [Issue].[Issue]),
[Measures].[Hours spent] > 0 
AND
     [Measures].[Issue link to task] MATCHES [Issue].CurrentMember.Get('DISPLAY_KEY')
      ),
[Measures].[Hours spent]
      )

[Issue link to task] this is a text custom field, which contains the issue key

Hi @clank232

The first code would return sum of hours spent for tasks that has “Link to task” to a particular issue “Task-100”

Sum(Filter(
      Descendants([Issue].DefaultMember, [Issue].[Issue]),
     [Measures].[Issue link to task] MATCHES '.*Task-100.*'
      ),
[Measures].[Hours spent]
      )

The next code would be returning horus spent for tasks with the link to any task in Task project:

Sum(Filter(
      Descendants([Issue].DefaultMember, [Issue].[Issue]),
     [Measures].[Issue link to task] MATCHES '.*Task-.*'
      ),
[Measures].[Hours spent]
      )

The last one is a more universal approach to checking for task links in any project as long as there is an issue key in the text field.

Sum(Filter(
      Descendants([Issue].DefaultMember, [Issue].[Issue]),
     [Measures].[Issue link to task] MATCHES ".*\-\d.*"
      ),
[Measures].[Hours spent]
      )

Martins / eazyBI

Is it possible to specify a value from the field? It is necessary to show the time spent for all tasks for which the link to the task is equal to the issue key.

Maybe there are other ways to show it?

image

We need to display the time spent of linked task by custom field
image
Calculate the total time spent (link spend), known only to the issue key

Hi,
Check this report on our demo account.
It has a measure “Hours spent on linked bugs” which calculates the hours spent for bugs linked to particular story

https://eazybi.com/accounts/22010/cubes/Issues/reports/376216-stories-with-bugs-details

Martins / eazyBI