Pulling value from parent record

On my project management added a field named “Branch/Project” in the story issue. When you create subtasks for the story you do not see this field. The challenge is I need to sum ‘hours spent’ by assignee by “Branch/Project”.

This is no issue if they logged their hours at the story level but when I have multiple subtasks worked on by multiple assignees I need to pull their hours then the “Branch/Project” from the parent story. Not sure how to do this. Sub tasks do have the ‘Parent Issue Key’ but not sure how I would use this in an expression.

Any Ideas?

Hi @jeffscudder

If “Branch/Project” is a single-select field, you could use a Javascript in advanced settings to define a new calculated field (and later select to import as dimension in import options page).
Try the following script where you use your custom field ID instead of NNNN.

Before importing the new dimension please validate the Javascript for one Jira issueto make sure the Javascript part works as expected on the parent’ issue.
Some Jira custom fields have .Value and some other don’t (see attached image below).

name = "Parent BranchProject"
data_type = "string"
dimension = true
update_from_issue_key = "parent_issue_key"
javascript_code = '''
if(issue.fields.customfield_NNNNN && issue.fields.customfield_NNNNN.value) {
issue.fields.customfield_brpr = issue.fields.customfield_NNNNN.value;

Best regards,

Martins / eazyBI team