Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-36292

Provide an easy way for plugin devs to migrate attachment IDs

    XMLWordPrintable

Details

    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      It's currently really hard for a plugin developer to migrate attachments that had their IDs remapped due to the attachment to CEO work. We should add a method in a manager that lets you get the old and new attachment IDs so that the plugin devs can write their own upgrade tasks.

      Calling the method will be done via a new method in the compat lib that uses reflection to see if the method on the manager exists, or returns an empty result if it does not (nothing to migrate)

      Unfortunately our plugin upgrade task infrastructure is not suitable for such an upgrade task - because if they want their plugin to be compatible with both pre 5.7 and 5.7+, and the upgrade task determines it has no work to do pre 5.7, it will never run again.

      We could add something to the compatibility library that when registered as a component runs each time the plugin starts and the user implements an abstract method that does their migration and maybe another that provides a unique string that identifies their plugin. We then write some code to store the fact that the migration has been run.

      Attachments

        Issue Links

          Activity

            People

              slancashire Steve Lancashire (Inactive)
              nbhawnani Niraj Bhawnani
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: