https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37389

--- Comment #15 from Pedro Amorim <[email protected]> ---
Created attachment 169234
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169234&action=edit
Bug 37389: [SQUASH] Join alias fix

This is to be squashed into the previous patch, but I'm leaving an explanation
here of this follow-up fix for now.
Only rename the join aliases if extended_attribute entry is a string 'type'.
If its an array, skip.
This 'array' method is used on the left-side search forms for ILL and patrons
table.
Its the difference between

      [
        {
          "extended_attributes.type": [
            "title",
            "type",
            "author",
            "article_title",
            "pages",
            "issue",
            "volume",
            "year"
          ],
          "extended_attributes.value": {
            "like": "%book%"
          }
        }
      ]

and

[
    {
      "extended_attributes.type": "year",
      "extended_attributes.value": {
        "like": "%book%"
      }
    }
  ],
  [
    {
      "extended_attributes.type": "pages",
      "extended_attributes.value": {
        "like": "%book%"
      }
    }
  ],

Where the former searches for a single keyword occurrence in a potential list
of extended_attributes and the latter allows for different keywords for each
extended_attribute type (even though the datatable search input allows only for
1, this is utilized in other places such as ERM licenses additional fields and
subscriptions searchable additional fields I believe).

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to