Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-21939

Clear the Parent Link data when the Issue Type is changed and the Link isn't valid anymore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • None
    • 8.0.0, 8.20.0, 9.0.0, 8.22.6, 9.4.0, 9.4.9
    • Issue - Fields
    • None

    Description

      Issue Summary

      When an Issue has a Parent Link (Advanced Roadmaps' field) and it's Type is changed, the Parent Link data remains.

      If the Parent Link is still visible on the screen, it'll show a warning icon suggesting the Link violates the current Hierarchy configuration and should be updated by the user.
      The invalid Parent Link data is left in Jira's database, on both tables issuelink and entity_property.

      This issue is worsened when an Epic Link is also present on the Issue that had the Issue Type changed. The presence of an Epic Link makes Jira automatically hide the Parent Link from the Screens and makes it harder to remove the leftover data.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Install a 3rd party app that provides JQL functions to iterate over Issue hierarchy

      2. Create Issue Types "Initiative" and "Capability" and add them to a Project's Scheme

      3. Add the Parent Link Custom Field to all Screens on that Project (to make it easier to follow the steps)

      4. Configure the Roadmaps Hierarchy so that Initiative > Capability > Epic

      5. Create a set of Issues organized as such:

      Initiative 1
        Capability 1
          Epic 1
      	  Story 1
        Capability 2
          Epic 2
      	  Story 2
      
      Epic 3
        Story 3
      

      6. Create a Filter using the 3rd party app JQL function to list the Hierarchy of the top Issue, like:

      issue = "<Initiative 1 Issue Key>" OR issueFunction in linkedIssuesOfRecursive("<Initiative 1 Issue Key>", "is parent of")
      

      7. Confirm all Issues under the hierarchy of "Initiative 1" are listed

      8. Change the Issue Type of "Capability 2" to Story (Move operation also works) and set it's Epic Link to "Epic 3"

      9. Reload the Filter and see "Capability 2" (now a Story) is still being listed, though it's now in the Hierarchy of "Epic 3", not under "Initiative 1"

      If you use Jira's native JQL functions, the Epic Link has precedence over the (invalid) Parent Link and "Capability 2" is not listed anymore:

      issue = "<Initiative 1 Issue Key>" OR issue in childIssuesOf("<Initiative 1 Issue Key>")
      

      Expected Results

      The Issue won't have left over data that's invalid.

      Actual Results

      The "Capability 2" Issue has a valid Epic Link which is protirized by Jira and invalid Parent Link which is ignored.
      The data is still left over in both DB tables:

      issuelink
      entity_property
      

      Workaround

      Admins can implement an Automation Rule to clear the Parent Link upon Issue Type change:

      But clearing Issues already with leftover Parent Link data requires more effort and will be documented here soon.

      Related issues

      These were previously reported issues that were merged into this one. They all share the same root cause.

      Issue Key Created date Summary
      2017-11-28 JPOSERVER-2059 Clear the value of "Parent Link" field when moving issue from above "Epic" Level to Issue Type below Epic Level
      2020-11-13 JPOSERVER-2895 Converting an issue's type to the same level as its Parent does not relinquish its existing Parent link as it should
      2022-07-08 JPOSERVER-4360 When converting an issue from Epic to another issue type, the parent link field is not cleared
      2023-05-19 JPOSERVER-7116 Clear the value of "Parent Link" field when creating a new issue

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rmartinez3@atlassian.com Rodrigo Martinez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: