Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Declined
-
None
-
None
-
None
-
None
Description
if the Epic link/Epic name have been renamed, Xray is unable to find the proper association between stories and epics. Thus, the requirement status is not automaticaly calculated for the epics, whenever a test associated with a user story of that epic is run.
Note: at the epic issue screen, if the user resets the Requirement Status custom field, then it seems to be properly calculated...
Script for changing the JIRA defaults for epic=>story relations:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.managedconfiguration.ManagedConfigurationItemService
import com.atlassian.jira.issue.CustomFieldManager
void unlockRename(String oldName, String newName) {
// def oldName = 'Epic Color'
// def newName = 'Feature Color'
ManagedConfigurationItemService managedConfigurationItemService = ComponentAccessor.getComponent(ManagedConfigurationItemService)
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()
def cf = customFieldManager.getCustomFieldObjectByName(oldName)
if (!cf)
{ return; }
def mci = managedConfigurationItemService.getManagedCustomField(cf)
if (!mci)
{ return; }
managedConfigurationItemService.removeManagedConfigurationItem(mci);
// cf.setName(newName)
customFieldManager.updateCustomField(cf.getIdAsLong(), newName, cf.getDescription(), cf.getCustomFieldSearcher());
}
unlockRename('Epic Colour','Feature Colour')
unlockRename('Epic Link','Feature Link')
unlockRename('Epic Name','Feature Name')
unlockRename('Epic Status','Feature Status')
Attachments
Issue Links
- relates to
-
XRAY-1770 Requirement Status not correct because of renamed Epic-Story relation link
-
- Closed
-