Uploaded image for project: 'Xray for Jira'
  1. Xray for Jira
  2. XRAY-1858

requirement status not properly calculated for epics if Epic Link has been renamed

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Declined
    • None
    • None
    • None
    • None
    • UNCOVERED

    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

          Activity

            People

              helder.ferreira Helder Ferreira
              smsf Sergio Freire
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: