Bug 27023

Summary: Add class names in the suggestions column in suggestions management
Product: Koha Reporter: Lucas Gass <lucas>
Component: AcquisitionsAssignee: Lucas Gass <lucas>
Status: Pushed to stable --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: andrew, caroline.cyr-la-rose, fridolin.somers, jonathan.druart
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.03
Attachments: Bug 27023: Add class names in acq suggestion table (suggestions column)
Bug 27023: Add class names in acq suggestion table (suggestions column)
Bug 27023: Add class names in acq suggestion table (suggestions column)
Bug 27023: (QA follow-up) Fix span tags
Bug 27023: Add class names in acq suggestion table (suggestions column)
Bug 27023: Add class names in acq suggestion table (suggestions column)
Bug 27023: (QA follow-up) Fix span tags
Bug 27023: Add class names in acq suggestion table (suggestions column)
Bug 27023: (QA follow-up) Fix span tags

Description Lucas Gass 2020-11-13 23:00:20 UTC
There is a lot of info. that goes into the Suggestions column in '/cgi-bin/koha/suggestion/suggestion.pl'. It's currently hard to parse that different information out if you wanted to do something like change the color of the text for each item type. 

It would be trivial to add class names.
Comment 1 Lucas Gass 2020-11-13 23:05:12 UTC
Created attachment 113635 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype
Comment 2 David Nind 2020-11-14 08:14:32 UTC
Created attachment 113640 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2021-01-10 21:21:30 UTC
Created attachment 114994 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Katrin Fischer 2021-01-10 21:21:33 UTC
Created attachment 114995 [details] [review]
Bug 27023: (QA follow-up) Fix span tags

One of the opening tags was missing the > and another was in the
wrong spot (started after the IF, but ending outside ouf it)
Comment 5 Jonathan Druart 2021-01-12 15:33:11 UTC
Typo suggestion_coprightdate
Comment 6 Lucas Gass 2021-01-15 15:50:58 UTC
Created attachment 115209 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Katrin Fischer 2021-01-15 16:26:41 UTC
Hi Lucas, did you see my follow-up patch? Sequence of attachements is wrong now, but not sure if you tested with or without.
Comment 8 Lucas Gass 2021-01-15 21:17:19 UTC
Created attachment 115213 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Lucas Gass 2021-01-15 21:17:24 UTC
Created attachment 115214 [details] [review]
Bug 27023: (QA follow-up) Fix span tags

One of the opening tags was missing the > and another was in the
wrong spot (started after the IF, but ending outside ouf it)
Comment 10 Lucas Gass 2021-01-15 21:18:29 UTC
(In reply to Katrin Fischer from comment #7)
> Hi Lucas, did you see my follow-up patch? Sequence of attachements is wrong
> now, but not sure if you tested with or without.

Sorry about that. I have tested with your QA follow-up. I the reattached them in the correct order. I am still keeping David's SO line.
Comment 11 Katrin Fischer 2021-01-17 15:44:03 UTC
Created attachment 115220 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2021-01-17 15:44:06 UTC
Created attachment 115221 [details] [review]
Bug 27023: (QA follow-up) Fix span tags

One of the opening tags was missing the > and another was in the
wrong spot (started after the IF, but ending outside ouf it)

Move spaces around a bit so the strings don't start with spaces.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Jonathan Druart 2021-01-20 12:51:14 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 14 Fridolin Somers 2021-01-25 14:49:39 UTC
Small enhancement, I choose to backport.

Pushed to 20.11.x for 20.11.03
Comment 15 Andrew Fuerste-Henry 2021-02-01 20:25:41 UTC
Enhancement, not backporting to 20.05. Please ask if needed.