Can't synchronize links when the JIRA issue was moved

Description

Long technical description

The links on JIRA issues are named "Remote Issue Links" (RIL). RILs have a type and a globalID, which, in the case of Requirement Yogi, is in the form:

They contain this data because event handlers (which manage the synchronization with Confluence when a RIL is added/deleted) only reference the globalID of the RIL, therefore it must be unique across an instance. As you can notice, the globalID is formatted like the part of a URL after the ?, therefore we use libraries to marshall/unmarshall this string.

The problem when moving an issue is that the issueKey is in the globalID. Requirement Yogi then fails at understanding why a RIL is present with another issue key than the current issue. Also, the globalID is immutable, so the technical solution is to delete this RIL and create a new one with the updated issueKey, and this must be triggered by the even of moving an issue.

Long story short

  • JIRA issues can now be moved. The RIL will be deleted/recreated, and they will immediately produce a synchronization with Confluence.

Is there any harm when the sync fails or when a RIL is invalid?

No:

  • The master data for links is what is visible in JIRA. Requirement Yogi has no control over what JIRA displays.

  • Invalid data in JIRA cannot delete data in Confluence.

  • The worst that can happen is that Confluence is not aware of a link.

    • This could be recovered by going to the JIRA issue and synchronizing it. Synchronization always affects all RILs on a JIRA issue.

    • If the synchronization fails, then deleting-and-recreating the link will always update the situation. This is what the synchronization does automatically.

  • RILs will be deleted in the following situations:

    • When the requirement in Confluence was deleted (removed from its original page) and the JIRA issue is synchronized. That means the link persists on the JIRA issue until a user clicks "Synchronize" in JIRA.

    • When it is immediately recreated because its globalID has changed. This happens when the issue was moved, or when the requirement's space key has changed, causing the globalID to change. The globalID being immutable, the old RIL must be destroyed and a new RIL created.

Yes, there is little harm:

  • RILs can't be displayed properly,

  • Neither synchronous nor asynchronous synchronizations can happen between JIRA and Confluence, causing:

    • Issues link to stale requirements (which were either moved or deleted in Confluence),

    • Confluence requirements display stale links to JIRA (e.g. keep displaying a link although it was deleted in JIRA, or no link although a new one was created in JIRA).

The whole purpose of the "synchronize" buttons is to recover those situations. After reinstalling and synchronizing:

  • Titles will be updated both ways (Confluence requirement description in JIRA / JIRA issue title in Confluence),

  • Links to requirements which were deleted in Confluence will be deleted from JIRA,

  • Links which were created or deleted in JIRA will be updated in Confluence.

Environment

None

Observations

None
Resolved

Assignee

Unassigned

Reporter

Adrien Ragot (Old account)

Labels

None

Participants

None

Components

Fix versions

Priority