Bug 13331 - Subfield does not show in cataloging editor - if subfield is disabled in OPAC/enabled in Staff, via frameworks
Summary: Subfield does not show in cataloging editor - if subfield is disabled in OPAC...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-24 17:22 UTC by Mason James
Modified: 2015-12-03 22:03 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
245b visibile (57.19 KB, image/png)
2014-11-25 10:21 UTC, Mason James
Details
uncheck OPAC vis, for 245b (57.53 KB, image/png)
2014-11-25 10:22 UTC, Mason James
Details
245b now hidden in editor?! (59.50 KB, image/png)
2014-11-25 10:23 UTC, Mason James
Details
fix for 13331 [Bug 13331] Subfield does not show in cataloging editor - if subfield is disabled in OPAC/enabled in Staff, via frameworks (1.82 KB, patch)
2014-11-26 01:04 UTC, Mason James
Details | Diff | Splinter Review
SIGNED-OFF-fix-for-13331-Bug-13331-Subfield-does-not (1.84 KB, patch)
2014-11-27 22:33 UTC, wajasu
Details | Diff | Splinter Review
[PASSED QA] fix for 13331 [Bug 13331] Subfield does not show in cataloging editor - if subfield is disabled in OPAC/enabled in Staff, via frameworks (1.89 KB, patch)
2014-12-05 15:21 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2014-11-24 17:22:11 UTC
Subfield does not show in cataloging editor - if subfield is disabled in OPAC/enabled in Staff, via frameworks
Comment 1 David Cook 2014-11-25 05:15:44 UTC
(In reply to Mason James from comment #0)
> Subfield does not show in cataloging editor - if subfield is disabled in
> OPAC/enabled in Staff, via frameworks

Do you have a specific example that can be tested?
Comment 2 Mason James 2014-11-25 10:20:37 UTC
(In reply to David Cook from comment #1)
> (In reply to Mason James from comment #0)
> > Subfield does not show in cataloging editor - if subfield is disabled in
> > OPAC/enabled in Staff, via frameworks
> 
> Do you have a specific example that can be tested?


hmm, any subfield will do...

1/ attempt to add a new bib in the cataloguing editor, default framewok
  - observe 245b subfield is visible in the editor, for tab 2

2/ uncheck the OPAC visibility for 245b, within the framework editor - then save

3/ repeat step 1/ 
  - observe that the 245b subfield has disappeared from the cataloguing editor!
Comment 3 Mason James 2014-11-25 10:21:53 UTC
Created attachment 33891 [details]
245b visibile
Comment 4 Mason James 2014-11-25 10:22:33 UTC
Created attachment 33892 [details]
uncheck OPAC vis, for 245b
Comment 5 Mason James 2014-11-25 10:23:19 UTC
Created attachment 33893 [details]
245b now hidden in editor?!
Comment 6 Mason James 2014-11-26 01:04:59 UTC Comment hidden (obsolete)
Comment 7 David Cook 2014-11-26 02:49:48 UTC
Ahh, I follow you now. I'll have to take a look at this when I get a chance.

Good catch :)
Comment 8 Mason James 2014-11-26 06:34:04 UTC
i should add a bit more info about 'hidden' values, for the record

if you look in the add_biblio.tt template file, you can see the logic for the values..
based on this code, it seems to me that any subfield that's 'hidden' value is <= -4 or >= 5 should be hidden in the editor, yes?


---------------------------------
 if ( flagged_checked ) {
        hidden_value='-8';
    } else if ( opac_checked && ! intranet_checked && ! editor_checked && collapsed_checked ) {
        hidden_value='-7';
    } else if ( opac_checked && intranet_checked && ! editor_checked && ! collapsed_checked) {
        hidden_value='-6';
    } else if ( opac_checked && intranet_checked && ! editor_checked && collapsed_checked) {
        hidden_value='-5';
    } else if ( opac_checked && ! intranet_checked && ! editor_checked && ! collapsed_checked) {
        hidden_value='-4';

    } else if ( opac_checked && ! intranet_checked && editor_checked && collapsed_checked) {
        hidden_value='-3';
    } else if ( opac_checked && ! intranet_checked && editor_checked && ! collapsed_checked) {
        hidden_value='-2';
    } else if ( opac_checked && intranet_checked && editor_checked && collapsed_checked) {
        hidden_value='-1';
    } else if ( opac_checked && intranet_checked && editor_checked && ! collapsed_checked) {
        hidden_value='0';
    } else if ( ! opac_checked && intranet_checked && editor_checked && collapsed_checked) {
        hidden_value='1';
    } else if ( ! opac_checked && ! intranet_checked && editor_checked && ! collapsed_checked) {
        hidden_value='2';
    } else if ( ! opac_checked && ! intranet_checked && editor_checked && collapsed_checked) {
        hidden_value='3';
    } else if ( ! opac_checked && intranet_checked && editor_checked && ! collapsed_checked) {
        hidden_value='4';

    } else if ( ! opac_checked && ! intranet_checked && ! editor_checked && collapsed_checked) {
        hidden_value='5';
    } else if ( ! opac_checked && intranet_checked && ! editor_checked && ! collapsed_checked) {
        hidden_value='6';
    } else if ( ! opac_checked && intranet_checked && ! editor_checked && collapsed_checked) {
        hidden_value='7';
    } else if ( ! opac_checked && ! intranet_checked && ! editor_checked && ! collapsed_checked) {
        hidden_value='8';
  }
---------------------------------
Comment 9 David Cook 2014-11-26 22:29:42 UTC
-9 => Future use
-8 => Flag
-7 => OPAC !Intranet !Editor Collapsed
-6 => OPAC Intranet !Editor !Collapsed
-5 => OPAC Intranet !Editor Collapsed
-4 => OPAC !Intranet !Editor !Collapsed
-3 => OPAC !Intranet Editor Collapsed
-2 => OPAC !Intranet Editor !Collapsed
-1 => OPAC Intranet Editor Collapsed
0 => OPAC Intranet Editor !Collapsed
1 => !OPAC Intranet Editor Collapsed
2 => !OPAC !Intranet Editor !Collapsed
3 => !OPAC !Intranet Editor Collapsed
4 => !OPAC Intranet Editor !Collapsed
5 => !OPAC !Intranet !Editor Collapsed
6 => !OPAC Intranet !Editor !Collapsed
7 => !OPAC Intranet !Editor Collapsed
8 => !OPAC !Intranet !Editor !Collapsed
9 => Future use

So "<= -4 or >= 5 should be hidden in the editor" is a yep, I believe :)
Comment 10 wajasu 2014-11-27 22:33:53 UTC Comment hidden (obsolete)
Comment 11 Irma Birchall 2014-11-28 10:43:00 UTC
(In reply to wajasu from comment #10)
> Created attachment 34007 [details] [review] [review]
> SIGNED-OFF-fix-for-13331-Bug-13331-Subfield-does-not
> 
> Followed steps for 245b (see breadcrumb in 33892)
> Once selecting default framework MARCStructure link, searched for 245,
> "Subfields" link, then "b" -> advanced.
> 
> Above test plan worked.

I have also tested using a biblibre sandbox and found the patch works as expected. I tested several conditions with no error. Thank you Mason!


Adding a sign-off.
Comment 12 Kyle M Hall 2014-12-05 15:21:48 UTC
Created attachment 34151 [details] [review]
[PASSED QA] fix for 13331 [Bug 13331] Subfield does not show in cataloging editor - if subfield is disabled in OPAC/enabled in Staff, via frameworks

to test...

1/ attempt to add a new bib in the cataloguing editor, default framewok
  - observe 245b subfield is visible in the editor, for tab 2

2/ uncheck the OPAC visibility for 245b, within the framework editor - then save

3/ repeat step 1/
  - observe that the 245b subfield has disappeared from the cataloguing editor!

4/ apply patch,

5/ repeat step 1/
  - observe that the 245b subfield now displays correctly in the cataloguing editor

note: this looks looks like a typo bug, that has been in koha for years

Signed-off-by: wajasu <matted@34813.mypacks.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 13 Tomás Cohen Arazi 2014-12-17 23:10:14 UTC
Patch pushed to master.

Thanks Mason!

PS. try to tidy your commit messages a bit next time :-D
Comment 14 Chris Cormack 2014-12-18 01:14:45 UTC
Pushed to 3.18.x, will be in 3.18.2
Comment 15 Mason James 2015-02-03 22:59:46 UTC
(In reply to Tomás Cohen Arazi from comment #13)
> Patch pushed to master.
> 
> Thanks Mason!
> 
> PS. try to tidy your commit messages a bit next time :-D

can you show me an example of an untidy commit message from me?
Comment 16 Mason James 2015-02-03 23:04:09 UTC
(In reply to Chris Cormack from comment #14)
> Pushed to 3.18.x, will be in 3.18.2

Patch pushed for 3.16.8 release
Comment 17 Tomás Cohen Arazi 2015-02-03 23:50:20 UTC
(In reply to Mason James from comment #15)
> (In reply to Tomás Cohen Arazi from comment #13)
> > Patch pushed to master.
> > 
> > Thanks Mason!
> > 
> > PS. try to tidy your commit messages a bit next time :-D
> 
> can you show me an example of an untidy commit message from me?

Sorry, I meant the subject!
Comment 18 Mason James 2015-03-23 04:57:27 UTC
(In reply to Tomás Cohen Arazi from comment #17)
> (In reply to Mason James from comment #15)
> > (In reply to Tomás Cohen Arazi from comment #13)
> > > Patch pushed to master.
> > > 
> > > Thanks Mason!
> > > 
> > > PS. try to tidy your commit messages a bit next time :-D
> > 
> > can you show me an example of an untidy commit message from me?
> 
> Sorry, I meant the subject!

aah, yes - my mistake :0)