Uploaded image for project: 'Content Tags'
  1. Content Tags
  2. CONTTAGS-58

TagManager can return wrong result set when searching multiple tags

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 2.0.2
    • 2.0.1
    • Maintenance 31
    • 0.5

      The getNodesTaggedBy method might not always return the correct results.
      On line 103, the clauses String is joined with the queryString, there's no separation of the different clauses though.
      When using the logical operand "OR" you might get this query;
      SELECT * FROM [nt:base] WHERE ISDESCENDANTNODE(/myFolder) AND [mgnl:tags] = 'myTag' OR [mgnl:tags] = 'mySecondTag'.
      The "OR" in this clause negates the first ISDESCENDANTNODE condition and will give all content tagged with 'myTag' or 'mySecondTag' and not only under the selected folder.

      The clauses variable should be encapsulated between parentheses "(" and ")"

        Acceptance criteria

              fgrilli Federico Grilli
              rgange Richard Gange
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 0.25h
                  0.25h