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

Updating the Parent Link that used to point to an Archived Issue leaves discrepant data between the entity_property and issuelink table

XMLWordPrintable

      Issue Summary

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Create a new Issue type (Initiative, for example)
      2. Create a new Roadmaps Hierarchy level above Epic and configure the Initiative to it
      3. Add the Parent Link on the create, edit and view screens of the Epic
      4. Create two Initiatives, "Initiative A" and "Initiative B"
      5. Create an Epic and set it's Parent Link to Initiative A
      6. Archive Initiative A
      7. Reload the Epic and see the Parent Link is gone. Set the Parent Link to Initiative B

      Update (15-02-2025): You can also archive the Epic (child) issue in reproducing the problem. 

      Expected Results

      The data in entity_property and issuelink tables should be consistent.

      Actual Results

      The entity_property.json_value reflects the new Initiative B Id but the issuelink.source still contains the Id of Initiative A.

      This database query can be used to spot all discrepant issuelink and entity_property data due to archived "parent Issues":

      select il.id as "Link Id", concat(ps.pkey, concat('-', concat(source.issuenum, concat(' (', concat(il.source, ')'))))) as "Source Issue", concat(its.pname, concat(' (', concat(its.id, ')'))) as "Source Issue Type", concat(ilt.linkname, concat(' (', concat(il.linktype, ')'))) as "Link Type", concat(pd.pkey, concat('-', concat(dest.issuenum, concat(' (', concat(il.destination, ')'))))) as "Destination Issue", concat(itd.pname, concat(' (', concat(itd.id, ')'))) as "Destination Issue Type", e.json_value
      from issuelink il
      join issuelinktype ilt on ilt.id = il.linktype
      join jiraissue source on source.id = il.source
      join project ps on ps.id = source.project
      join issuetype its on its.id = source.issuetype
      join jiraissue dest on dest.id = il.destination
      join project pd on pd.id = dest.project
      join issuetype itd on itd.id = dest.issuetype
      join entity_property e on e.entity_id = dest.id and e.property_key = 'jpo-issue-properties'
      where ilt.pstyle = 'jira_jpos_parent_child'
      and source.archived = 'Y'
      order by 1 asc;
      

      Workaround

      From the results of the query above, a possible workaround is to:

      1. Unarchive the Parent Issues (reported as "source" by the query)
      2. Delete and recreate the Parent Link (to the new Issues, just to update the link from the old one)
      3. Archive the Parent Issue again

      -------------------------------------------------------------

      Additional update (15-02-2025)

      • When you archive either the child or parent issue, the issue linking to the other ticket will disappear in the UI

      -------------------------------------------------------------

        1. archival_parent_child.mp4
          16.76 MB
          Cecille Maquito
        2. image-2025-03-03-09-44-24-451.png
          163 kB
          Cecille Maquito

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

                Created:
                Updated: