[Koha-bugs] [Bug 19808] Reviews from deleted patrons make opac-detail explode

2017-12-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

--- Comment #16 from M. Tompsett  ---
Comment on attachment 69856
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69856
Bug 19808: Handle deleted reviewers gracefully - reviews/reviewswaiting.pl

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

::: reviews/reviewswaiting.pl
@@ +67,4 @@
>  }
>  )->unblessed;
>  
> +for my $review ( @$reviews ) {

Love the explicit $review instead of $_ code.

@@ +72,1 @@
>  # setting some borrower info into this hash

Think the comment is misplaced.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

--- Comment #15 from Jonathan Druart  
---
Created attachment 69856
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69856=edit
Bug 19808: Handle deleted reviewers gracefully - reviews/reviewswaiting.pl

Test plan:
- Create reviews
- Delete some reviewers
- Go to Home › Tools › Comments › Comments awaiting moderation

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

--- Comment #14 from Jonathan Druart  
---
Created attachment 69855
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69855=edit
Bug 19808: Handle deleted reviewers gracefully - opac-showreview

Test plan:
- Create reviews
- Delete some reviewers
- Enable OpacShowRecentComments
- Go to opac/opac-showreviews.pl
- Go to opac-showreviews.pl?format=rss

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

--- Comment #13 from Jonathan Druart  
---
Created attachment 69854
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69854=edit
Bug 19808: (follow-up) Handle deleted reviewers gracefully - opac-detail

Make the tests easier to read

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #69828|0   |1
is obsolete||

--- Comment #12 from Jonathan Druart  
---
Created attachment 69853
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69853=edit
Bug 19808: Handle deleted reviewers gracefully - opac-detail

And other display issues when the patron was NULL.
Which allows to keep the review even if it has no patron.
Because it might be useful.

For example when disconnected, the borrowernumber is null. So the
comments from deleted patrons were displayed as if the disconnected
user wrote them. So it had the edit button...

And fix borrowernumber not being passed to the template when
OpacStarRatings was false.

Test plan
1. Log in as a patron
2. Leave a comment/review on a record
3. Librarian: approve this comment
4. Delete the borrower
5. See the record
(opac:/cgi-bin/koha/opac-detail.pl?biblionumber=RELEVANT_BIB_NUMBER)
6. Then you should see an error
7. Apply this patch
8. Refresh the page
9. Then you should see the record page with the comment

Signed-off-by: Mark Tompsett 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

Jonathan Druart  changed:

   What|Removed |Added

 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
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Status|Failed QA   |ASSIGNED
   Assignee|victor.grous...@biblibre.co |jonathan.dru...@bugs.koha-c
   |m   |ommunity.org

--- Comment #11 from Victor Grousset/tuxayo  ---
(In reply to M. Tompsett from comment #7)
> Did you bug report this? Because your patch only fixes the 847 issue in
> opac-detail.pl

(In reply to Josef Moravec from comment #9)
> Are you going to address the issue on reviews/reviewswaiting.pl too? If not
> please make a bug report for it. Thanks

Thanks for following up on that part.

The idea was to write somewhere these findings to not forget to do something
about that.

I planned to open a separate bug for this as it's wasn't the same priority. So
I only have the time handle the first part.

After a discussion with Joubu, it's better to fix the rest in the same bug. So
here you go (changing status and assignee).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

--- Comment #10 from M. Tompsett  ---
As I alluded to in comment #7 based on comment #4's observation.

(In reply to Josef Moravec from comment #9)
> Are you going to address the issue on reviews/reviewswaiting.pl too?

If so, awaiting patch.


> If not
> please make a bug report for it.

-- and add it to the See Also.


> Thanks

-- Ditto. :)


> Marking as Failed QA = waiting for answer here ;)

I'm torn. The title doesn't suggest it will be fixed here.
However, there is no link to a bug elsewhere. I'll leave the status as is.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

Josef Moravec  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA
 CC||josef.mora...@gmail.com

--- Comment #9 from Josef Moravec  ---
Are you going to address the issue on reviews/reviewswaiting.pl too? If not
please make a bug report for it. Thanks

Marking as Failed QA = waiting for answer here ;)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

M. Tompsett  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
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

M. Tompsett  changed:

   What|Removed |Added

  Attachment #69824|0   |1
is obsolete||

--- Comment #8 from M. Tompsett  ---
Created attachment 69828
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69828=edit
Bug 19808: Fix opac-detail breaking on a review from a deleted patron

And other display issues when the patron was NULL.
Which allows to keep the review even if it has no patron.
Because it might be useful.

For example when disconnected, the borrowernumber is null. So the
comments from deleted patrons were displayed as if the disconnected
user wrote them. So it had the edit button...

And fix borrowernumber not being passed to the template when
OpacStarRatings was false.

Test plan
1. Log in as a patron
2. Leave a comment/review on a record
3. Librarian: approve this comment
4. Delete the borrower
5. See the record
(opac:/cgi-bin/koha/opac-detail.pl?biblionumber=RELEVANT_BIB_NUMBER)
6. Then you should see an error
7. Apply this patch
8. Refresh the page
9. Then you should see the record page with the comment

Signed-off-by: Mark Tompsett 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

M. Tompsett  changed:

   What|Removed |Added

 CC||mtomp...@hotmail.com

--- Comment #7 from M. Tompsett  ---
Can't call method "title" on an undefined value at
/home/koha/src/opac/opac-detail.pl line 847.

Successfully duplicated on old-school git install (not kohadevbox).
(In reply to Victor Grousset/tuxayo from comment #3)
> = Going further =
> 
> Another bug caused by the root issue:
> When a patron leaves a comment/review on a record
> And this patron is deleted
> Then the "Comments pending approval" page
>   (staff:/cgi-bin/koha/reviews/reviewswaiting.pl)
>   throws a 500 error
>   «Can't call method "surname" on an undefined value at
> /home/koha/src/reviews/reviewswaiting.pl line 76.»

Did you bug report this? Because your patch only fixes the 847 issue in
opac-detail.pl

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 CC||julian.maur...@biblibre.com
 Status|ASSIGNED|Needs Signoff

--- Comment #6 from Victor Grousset/tuxayo  ---
Thanks Julian Maurice for the help to fix all the tricky cases and clean the
code :)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

--- Comment #5 from Victor Grousset/tuxayo  ---
Created attachment 69824
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69824=edit
Fix opac-detail being broken by a review from a deleted patron

And other display issues when the patron was NULL.
Which allows to keep the review even if it has no patron.
Because it might be useful.

For example when disconnected, the borrowernumber is null. So the
comments from deleted patrons were displayed as if the disconnected
user wrote them. So it had the edit button...

And fix borrowernumber not being passed to the template when
OpacStarRatings was false.

Test plan
1. Log in as a patron
2. Leave a comment/review on a record
3. Librarian: approve this comment
4. Delete the borrower
5. See the record
(opac:/cgi-bin/koha/opac-detail.pl?biblionumber=RELEVANT_BIB_NUMBER)
6. Then you should see an error
7. Apply this patch
8. Refresh the page
9. Then you should see the record page with the comment

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

--- Comment #4 from Victor Grousset/tuxayo  ---
= Going further =

(In reply to Victor Grousset/tuxayo from comment #3)
> = Going further =
> 
> Another bug caused by the root issue:
> When a patron leaves a comment/review on a record
> And this patron is deleted
> Then the "Comments pending approval" page
>   (staff:/cgi-bin/koha/reviews/reviewswaiting.pl)
>   throws a 500 error
>   «Can't call method "surname" on an undefined value at
> /home/koha/src/reviews/reviewswaiting.pl line 76.»


Just trying to go the approved comments
(staff:/cgi-bin/koha/reviews/reviewswaiting.pl?status=1) also triggers the same
error. This case is more likely to happen than the above.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

--- Comment #3 from Victor Grousset/tuxayo  ---
= Going further =

Another bug caused by the root issue:
When a patron leaves a comment/review on a record
And this patron is deleted
Then the "Comments pending approval" page
  (staff:/cgi-bin/koha/reviews/reviewswaiting.pl)
  throws a 500 error
  «Can't call method "surname" on an undefined value at
/home/koha/src/reviews/reviewswaiting.pl line 76.»

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19808] Reviews from deleted patrons make opac-detail explode

2017-12-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808

Victor Grousset/tuxayo  changed:

   What|Removed |Added

Summary|Reviews from deleted|Reviews from deleted
   |patrons make opac-detail|patrons make opac-detail
   |explodes|explode

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