[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-11-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

   Keywords|rel_21_11_candidate,|
   |rel_22_11_candidate |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Lucas Gass  changed:

   What|Removed |Added

   Keywords|rel_22_05_candidate |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-08-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 CC||vic...@tuxayo.net
 Status|Pushed to oldstable |RESOLVED

--- Comment #29 from Victor Grousset/tuxayo  ---
Missing dependencies for 21.05.x, it shouldn't be affected, no backport.
Nothing to document, marking resolved.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-08-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106
Bug 31106 depends on bug 30865, which changed state.

Bug 30865 Summary: Koha::Biblio->get_components_query should double quote 
Host-item search
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30865

   What|Removed |Added

 Status|Pushed to oldstable |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-08-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Arthur Suzuki  changed:

   What|Removed |Added

 Version(s)|22.11.00, 22.05.04  |22.11.00, 22.05.04,
released in||21.11.11
 Status|Pushed to stable|Pushed to oldstable
 CC||arthur.suz...@biblibre.com

--- Comment #28 from Arthur Suzuki  ---
pushed to 21.11.x for 21.11.11

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-08-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Lucas Gass  changed:

   What|Removed |Added

 Version(s)|22.11.00|22.11.00, 22.05.04
released in||
 Status|Pushed to master|Pushed to stable
 CC||lu...@bywatersolutions.com

--- Comment #27 from Lucas Gass  ---
Backported to 22.05.x for 22.05.04

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #26 from Tomás Cohen Arazi  ---
Pushed to master for 22.11.

Nice work everyone, thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to master
 Version(s)||22.11.00
released in||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Martin Renvoize  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

--- Comment #25 from Martin Renvoize  ---
Great to see the work followed through here.. Passing QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #137248|0   |1
is obsolete||

--- Comment #24 from Martin Renvoize  ---
Created attachment 137833
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137833=edit
Bug 31106: Fix links generated in XSLTs

This patch addresses the case of links that are generated on the XSLT
side, those linking to and from host records using 773$t and 773$a.

To test:
1. Pick a bibliographic record (I chose 'Unconditional' from the sample
   data
2. Add " and ? to the title statement. I changed it to
   'Uncond"itional?¿'
3. Add a child record to it
4. Open the detail page for the host record
=> FAIL: It doesn't show the 'Show analytics' link
5. Repeat 4 for the same record, in the OPAC
=> FAIL: It doesn't show the 'Show analytics' link
6. Apply this patch
7. Repeat 4 and 5.
=> SUCCESS: Links are shown!
8. Follow the links
=> SUCCESS: The links take you to the right resultset!
9. Go to the child record, and notice the link back to the parent works
   :-D
10. Sign off :-D

Sponsored-by: Theke Solutions
Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: David Nind 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #137247|0   |1
is obsolete||

--- Comment #23 from Martin Renvoize  ---
Created attachment 137832
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137832=edit
Bug 31106: Make clean_search_term escape double quotes

We noticed that several characters will break Zebra queries. So search
terms need to be quoted for things to work. In this context, double
quotes inside search terms are problematic because double quotes are
what we use for quoting strings.

This patch makes the clean_search_term method escape double quotes.

To test:
1. Apply the unit tests patch
2. Run:
   $ kshell
  k$ prove t/Koha/SearchEngine/Zebra/QueryBuilder.t
=> FAIL: It doesn't work as it should!
3. Apply this patch
4. Repeat 2
=> SUCCESS: It does the job!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: David Nind 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #137246|0   |1
is obsolete||

--- Comment #22 from Martin Renvoize  ---
Created attachment 137831
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137831=edit
Bug 31106: Unit tests

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: David Nind 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=31178

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Katrin Fischer  changed:

   What|Removed |Added

 CC||mag...@libriotech.no

--- Comment #21 from Katrin Fischer  ---
*** Bug 30900 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

David Nind  changed:

   What|Removed |Added

  Text to go in the||This fixes two issues that
  release notes||affect searching and links
   ||for analytics on the detail
   ||view pages for records in
   ||the staff interface and
   ||OPAC:
   ||
   ||1. Several
   ||characters will break Zebra
   ||search engine queries, so
   ||search terms need to be
   ||quoted by the query builder
   ||for things to work. Double
   ||quotes in titles and used
   ||in search terms were not
   ||escaped, cuasing issues
   ||with results.
   ||
   ||2. This
   ||caused links to and from
   ||host records using 773$t
   ||and 773$a to fail (not find
   ||or display the expected
   ||results).
   ||
   ||Example: Before
   ||this was fixed, for a host
   ||record with the title
   ||'Uncond"itional?¿' and
   ||child records linked using
   ||773$t and 773$a:
   ||- the
   ||'Show analytics' link was
   ||not displayed in the staff
   ||interface and OPAC for the
   ||host record
   ||- the link from
   ||the child record back to
   ||the host record ('In' Title
   ||of host record (linked))
   ||didn't work.

--- Comment #20 from David Nind  ---
I've added some text for the release notes, but not sure if I've described this
correctly. Corrections and updates to the release notes text welcome!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #19 from Martin Renvoize  ---
I'm in agreement with Tomas here.. took a while to work through how it all fits
together but his history sluething helped a lot.. the tl;dr is "we've been
doing some funky escaping for years when in reality we should have been quoting
instead."

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

--- Comment #18 from Tomás Cohen Arazi  ---
(In reply to Marcel de Rooy from comment #16)
> Please provide feedback for this change:
> 
> - name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:( select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:
> subfield[@code='a'], '/', ''), true())"/>)
> 
> + name="href">/cgi-bin/koha/catalogue/search.pl?q= select="str:encode-uri($title_query, true())"/>
> 
> You remove translate ?
> 
> Similar example:
> - name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr: select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''),
> true())"/>+AND+au: select="str:encode-uri(translate(marc:subfield[@code='a'], '()', ''),
> true())"/>

I traced the introduction of this translate to Katrina, bug 5959 [1] and bug
4506 [2] repectively. I'm pretty sure what I did correct. If you look at the
history of the MARC21slim2intranetDetail.xsl file, you will notice we slowly
removed (, ) and / as things exploded in different scenarios and last thing we
did was wrapping in parenthesis. Quoting the string and escaping double quotes
in it is the sensible next step :-D

[1] c0ca9f3413d4c069565595919eced6ddf02e8f96
[2] d3605d9ae8d31953df1aed6c04631a578b690fcd

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #17 from Tomás Cohen Arazi  ---
(In reply to Marcel de Rooy from comment #16)
> Please provide feedback for this change:
> 
> - name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:( select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:
> subfield[@code='a'], '/', ''), true())"/>)
> 
> + name="href">/cgi-bin/koha/catalogue/search.pl?q= select="str:encode-uri($title_query, true())"/>
> 
> You remove translate ?

What I said:

> I think those translations were added because we just didn't quote the string 
> as this patch is doing. in fact, such 'fixes' should be engine-specific and 
> dealt with in the Koha::SearchEngine::{engine}::QueryBuilder module instead. 
> I would > like to hear from David and Nick before moving on with just 
> removing the translates, but the feeling is... we were doing things wrong 
> (not quoting) and working around things...

We can bring them back. But the fact that some places remove parenthesis, and
others the slash smells... a lot. My testing showed that they are not taken
into account in Zebra, and being quoted makes the query not break, which is why
those got removed. See comment 5

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Marcel de Rooy  changed:

   What|Removed |Added

 Status|BLOCKED |Failed QA

--- Comment #16 from Marcel de Rooy  ---
Please provide feedback for this change:

-/cgi-bin/koha/catalogue/search.pl?q=Host-item:()

+/cgi-bin/koha/catalogue/search.pl?q=

You remove translate ?

Similar example:
-/cgi-bin/koha/catalogue/search.pl?q=ti,phr:+AND+au:

+

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Marcel de Rooy  changed:

   What|Removed |Added

 QA Contact|martin.renvoize@ptfs-europe |m.de.r...@rijksmuseum.nl
   |.com|
 CC||m.de.r...@rijksmuseum.nl
 Status|Signed Off  |BLOCKED

--- Comment #15 from Marcel de Rooy  ---
QAing

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #14 from Tomás Cohen Arazi  ---
Raised severity, because this is basically breaking analytics linking for many
users.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

   Keywords||rel_21_11_candidate,
   ||rel_22_05_candidate,
   ||rel_22_11_candidate
   Severity|enhancement |major

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

David Nind  changed:

   What|Removed |Added

 Attachment #137239|0   |1
is obsolete||

--- Comment #13 from David Nind  ---
Created attachment 137248
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137248=edit
Bug 31106: Fix links generated in XSLTs

This patch addresses the case of links that are generated on the XSLT
side, those linking to and from host records using 773$t and 773$a.

To test:
1. Pick a bibliographic record (I chose 'Unconditional' from the sample
   data
2. Add " and ? to the title statement. I changed it to
   'Uncond"itional?¿'
3. Add a child record to it
4. Open the detail page for the host record
=> FAIL: It doesn't show the 'Show analytics' link
5. Repeat 4 for the same record, in the OPAC
=> FAIL: It doesn't show the 'Show analytics' link
6. Apply this patch
7. Repeat 4 and 5.
=> SUCCESS: Links are shown!
8. Follow the links
=> SUCCESS: The links take you to the right resultset!
9. Go to the child record, and notice the link back to the parent works
   :-D
10. Sign off :-D

Sponsored-by: Theke Solutions

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

David Nind  changed:

   What|Removed |Added

 Attachment #137238|0   |1
is obsolete||

--- Comment #12 from David Nind  ---
Created attachment 137247
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137247=edit
Bug 31106: Make clean_search_term escape double quotes

We noticed that several characters will break Zebra queries. So search
terms need to be quoted for things to work. In this context, double
quotes inside search terms are problematic because double quotes are
what we use for quoting strings.

This patch makes the clean_search_term method escape double quotes.

To test:
1. Apply the unit tests patch
2. Run:
   $ kshell
  k$ prove t/Koha/SearchEngine/Zebra/QueryBuilder.t
=> FAIL: It doesn't work as it should!
3. Apply this patch
4. Repeat 2
=> SUCCESS: It does the job!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

David Nind  changed:

   What|Removed |Added

 Attachment #137237|0   |1
is obsolete||

--- Comment #11 from David Nind  ---
Created attachment 137246
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137246=edit
Bug 31106: Unit tests

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||n...@bywatersolutions.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #10 from Tomás Cohen Arazi  ---
Created attachment 137239
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137239=edit
Bug 31106: Fix links generated in XSLTs

This patch addresses the case of links that are generated on the XSLT
side, those linking to and from host records using 773$t and 773$a.

To test:
1. Pick a bibliographic record (I chose 'Unconditional' from the sample
   data
2. Add " and ? to the title statement. I changed it to
   'Uncond"itional?¿'
3. Add a child record to it
4. Open the detail page for the host record
=> FAIL: It doesn't show the 'Show analytics' link
5. Repeat 4 for the same record, in the OPAC
=> FAIL: It doesn't show the 'Show analytics' link
6. Apply this patch
7. Repeat 4 and 5.
=> SUCCESS: Links are shown!
8. Follow the links
=> SUCCESS: The links take you to the right resultset!
9. Go to the child record, and notice the link back to the parent works
   :-D
10. Sign off :-D

Sponsored-by: Theke Solutions

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #9 from Tomás Cohen Arazi  ---
Created attachment 137238
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137238=edit
Bug 31106: Make clean_search_term escape double quotes

We noticed that several characters will break Zebra queries. So search
terms need to be quoted for things to work. In this context, double
quotes inside search terms are problematic because double quotes are
what we use for quoting strings.

This patch makes the clean_search_term method escape double quotes.

To test:
1. Apply the unit tests patch
2. Run:
   $ kshell
  k$ prove t/Koha/SearchEngine/Zebra/QueryBuilder.t
=> FAIL: It doesn't work as it should!
3. Apply this patch
4. Repeat 2
=> SUCCESS: It does the job!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #8 from Tomás Cohen Arazi  ---
Created attachment 137237
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137237=edit
Bug 31106: Unit tests

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #137183|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #137185|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #137184|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff
 CC||tomasco...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Needs Signoff   |ASSIGNED

--- Comment #7 from Tomás Cohen Arazi  ---
(In reply to David Nind from comment #6)
> Everything works as per the test plan -  can sign off, or will do so if no
> additional changes area required.
> 
> For the test plan it stelfm, the 'Show Analytics' link is visible before the
> patch (steps 4 and 5) - for both manually added and using the EasyAnaltics
> EasyAnaltics system preference.

I'm redoing it as per a conversation with Martin. Leaving as ASSIGNED until I
resubmit. No behavior changes, just putting things in the right places to aid
maintainability.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #6 from David Nind  ---
Everything works as per the test plan -  can sign off, or will do so if no
additional changes area required.

For the test plan it stelfm, the 'Show Analytics' link is visible before the
patch (steps 4 and 5) - for both manually added and using the EasyAnaltics
EasyAnaltics system preference.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #5 from Tomás Cohen Arazi  ---
(In reply to Martin Renvoize from comment #4)
> Comment on attachment 137185 [details] [review]
> Bug 31106: Fix links generated in XSLTs
> 
> Review of attachment 137185 [details] [review]:
> -
> 
> Bit of a deeper review this time for master...
> 
> ::: koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
> @@ +578,4 @@
> >  
> >  
> >  
> > +
> 
> Maybe we could call this 'quote_term' or something.. 'fix' feels a bit
> unspecific?

We are basically preparing a string so it can be used within bigger query
strings. I feel like 'prepare_query_term' is a better name. It is too
unespecific still...

> @@ +586,5 @@
> > +
> > +
> > +
> > +
> > +
> 
> I'm a bit confused by the translate.. we're translating '()' here, but we
> were translating '/' in some places instead before this patch.. can you
> explain your choice?

That translate method is being used to remove (, ) and / alternatively in some
places. When you look at how Zebra searches work, you notice that those
characters are removed or translated into spaces for the query:

Z> f @attr 1=1033 "Uncond\"itional¿? ="
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1, setno 1
SearchResult-1: term=Uncond cnt=1, term=itional cnt=1
records returned: 0
Elapsed: 0.011988
Z> f @attr 1=1033 "Uncond\"itional¿? )="
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1, setno 2
SearchResult-1: term=Uncond cnt=1, term=itional cnt=1
records returned: 0
Elapsed: 0.002718
Z> f @attr 1=1033 "Uncond\"itional¿? ()="
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1, setno 3
SearchResult-1: term=Uncond cnt=1, term=itional cnt=1
records returned: 0
Elapsed: 0.002441
Z> f @attr 1=1033 "Uncond\"itional¿?/ ()="
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1, setno 4
SearchResult-1: term=Uncond cnt=1, term=itional cnt=1
records returned: 0
Elapsed: 0.003235

I think those translations were added because we just didn't quote the string
as this patch is doing. in fact, such 'fixes' should be engine-specific and
dealt with in the Koha::SearchEngine::{engine}::QueryBuilder module instead. I
would like to hear from David and Nick before moving on with just removing the
translates, but the feeling is... we were doing things wrong (not quoting) and
working around things...

> @@ +589,5 @@
> > +
> > +
> > +
> > +
> > +
> 
> Excellent, you renamed it here to 'escape_quotes' as opposed to
> 'remove_quotes' :)

Well, the 21.05 version of this patches actually remove the double quotes. I
might revisit that as well.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Martin Renvoize  changed:

   What|Removed |Added

 QA Contact||martin.renvoize@ptfs-europe
   ||.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #4 from Martin Renvoize  ---
Comment on attachment 137185
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137185
Bug 31106: Fix links generated in XSLTs

Review of attachment 137185:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=31106=137185)
-

Bit of a deeper review this time for master...

::: koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
@@ +578,4 @@
>  
>  
>  
> +

Maybe we could call this 'quote_term' or something.. 'fix' feels a bit
unspecific?

We're doing two things here actually.. we're escaping quotes and URI escaping..
then we leave the overall quoting of the whole string to the caller..

Maybe 'escape_phrase' or 'escape_term' then?

@@ +586,5 @@
> +
> +
> +
> +
> +

I'm a bit confused by the translate.. we're translating '()' here, but we were
translating '/' in some places instead before this patch.. can you explain your
choice?

@@ +589,5 @@
> +
> +
> +
> +
> +

Excellent, you renamed it here to 'escape_quotes' as opposed to 'remove_quotes'
:)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #3 from Tomás Cohen Arazi  ---
Created attachment 137185
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137185=edit
Bug 31106: Fix links generated in XSLTs

This patch addresses the case of links that are generated on the XSLT
side, those linking to and from host records using 773$t and 773$a.

To test:
1. Pick a bibliographic record (I chose 'Unconditional' from the sample
   data
2. Add " and ? to the title statement. I changed it to
   'Uncond"itional?¿'
3. Add a child record to it
4. Open the detail page for the host record
=> FAIL: It doesn't show the 'Show analytics' link
5. Repeat 4 for the same record, in the OPAC
=> FAIL: It doesn't show the 'Show analytics' link
6. Apply this patch
7. Repeat 4 and 5.
=> SUCCESS: Links are shown!
8. Follow the links
=> SUCCESS: The links take you to the right resultset!
9. Go to the child record, and notice the link back to the parent works
   :-D
10. Sign off :-D

Sponsored-by: Theke Solutions

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #2 from Tomás Cohen Arazi  ---
Created attachment 137184
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137184=edit
Bug 31106: Make clean_search_term escape double quotes

We noticed that several characters will break Zebra queries. So search
terms need to be quoted for things to work. In this context, double
quotes inside search terms are problematic because double quotes are
what we use for quoting strings.

This patch makes the clean_search_term method escape double quotes.

To test:
1. Apply the unit tests patch
2. Run:
   $ kshell
  k$ prove t/Koha/SearchEngine/Zebra/QueryBuilder.t
=> FAIL: It doesn't work as it should!
3. Apply this patch
4. Repeat 2
=> SUCCESS: It does the job!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

--- Comment #1 from Tomás Cohen Arazi  ---
Created attachment 137183
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137183=edit
Bug 31106: Unit tests

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

   Patch complexity|--- |Small patch
 Status|ASSIGNED|Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||da...@davidnind.com,
   ||dc...@prosentient.com.au,
   ||martin.renvoize@ptfs-europe
   ||.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 31106] Error searching for analytics in detail view

2022-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31106

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|koha-b...@lists.koha-commun |tomasco...@gmail.com
   |ity.org |
 Depends on||30865
   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=29418


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30865
[Bug 30865] Koha::Biblio->get_components_query should double quote Host-item
search
-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/