Can we find out which issues were moved from one sprint to another?

Here is one general solution that can be used as a basis for several scenarios analyzing previous sprints of an issue. The suggested solution includes importing previous sprints as a property for an issue. Then you can use this information in several scenarios.

Here is a custom field definition with JavaScript code for custom field Previous sprints ID:

[jira.customfield_shistory]
name = "Previous sprints ID"
data_type = "string"
json_fields = ["customfield_NNNNN"]
javascript_code = '''
sprintHistory = new Array();
issue.changelog.histories.forEach(function(history){
  history.items.forEach(function(historyItem){
    if (historyItem.field == "Sprint") {
      sprintFrom = historyItem.from;
      if(sprintFrom){
        sprintHistory = sprintHistory.concat(sprintFrom.replace(/ /g, "").split(","));
      }
    }
  });
});
issue.fields.customfield_shistory = _.uniq(sprintHistory).join(",");
'''

Use Sprint custom field ID instead of NNNNN in the formula above.

Add the updated custom field definition to eazyBI advanced settings or ask Jira administrator to do this for you. eazyBI advanced settings are common for all accounts and only Jira administrators have access to them.

Open import settings for edit after changes in eazyBI advanced settings and select the custom field for import as a property and run an import. Import will create a new property Issue Previous Sprints ID in your account.

You can use this property after import in your reports and calculated measures. You can access Sprint members from this property with GetMembersByKeys function. For example, here is the formula for retrieving Previous Sprint names for an issue:

Case When
  Not isEmpty([Issue].CurrentHierarchyMember.Get('Previous sprints ID'))
Then
Generate(
  [Sprint].[Sprint].GetMembersByKeys(
    [Issue].CurrentHierarchyMember.Get('Previous sprints ID')),
  [Sprint].CurrentMember.Name, ", "
)
End

Property Issue Sprint gives you a current Sprint of an issue.

Daina / support@eazybi.com

2 Likes