Uploaded image for project: 'Release Notes Application'
  1. Release Notes Application
  2. RN-114

Move the change search from Velocity to Java

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 2.7
    • 2.6
    • Application
    • None
    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      The getChanges wiki macro (ReleaseNotes.Code.Change.GetChangesMacro) is about 150 lines of Velocity that assemble an XWQL query by hand: operator-prefix parsing (>=, <=, >, <, =), audience/importance normalisation, version-comparison resolution against the extension version scheme, and limit+1 pagination.

      That is real logic living in a wiki page, where it is hard to test, cannot be reused outside the wiki, and where one of its steps is needlessly expensive: resolving a version comparison loads every release note document just to read a single version property, because selecting a property value from a query requires programming right in script. Java has no such constraint and can read the versions in one query.

      Move the search to the application-releasenotes-api module, behind ChangeManager.search, and leave the wiki macro as a thin shim.

      This is a pure refactor: the macro's published contract is unchanged (same parameters, same context variables, same generated query, same ordering, same defaults), so release notes must render identically afterwards. The only behaviour that changes is the removal of the document loads described above.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: