Moving a node to a new document breaks incoming links

Steps to reproduce

(Some steps are optional and can be skipped.)

  1. In a document, create a node (a list item) called foobar.
  2. At the node context menu, Get link to copy a link to this specific node.
  3. Either in the same document or in any other document, create a new node, and paste the link. Letā€™s call this new node linkylink.
  4. Now we have linkylink pointing to foobar. Both forward link and reverse links work fine.
  5. (skippable) Now move foobar to become a child of any other node. The links still work fine, as expected.
  6. (skippable) Now move foobar to become a child of a node from a different document. (Either by drag-and-dropping, or by Move to item from the context menu.) Everything still works fine, the links are correctly updated to point to the location in a different document.
  7. Now move foobar to become a new document on its own.

Expected result

The links to foobar should still work, like they still do in steps 5 and 6. From the userā€™s point-of-view, step 7 is not much different than step 6.

Actual result

The link breaks. Any links to foobar become outdated and point to an invalid node. This behavior is surprising because steps 5 and 6 work fine. Itā€™s probably a corner-case that was missed while coding this feature.

Untested

The behavior for links pointing to the inside of the foobar subtree (i.e. links to foobar descendants) was not tested. Thatā€™s something that should be explored and taken care of when fixing this bug.


Environment

(None of this matters, the issue is certainly server-side anyway.)

Which operating system are you using? GNU/Linux.
Which browser are you using? Google Chrome.
If youā€™re using a desktop or mobile app, whatā€™s the version number of Dynalist? Web version.
Are you using any third-party scripts for Dynalist, e.g. PowerPack? Nothing. Just the vanilla experience.

Additional information

A few related threads:

2 Likes