It should be possible to customize column visibility in the items table in additem.pl through the columns configuration tool.
Created attachment 40977 [details] [review] Bug 14510: Allow column visibility in additem.pl to be customized This patch adds the table of items on additem.pl to the columns customizer. Test plan: 1. Open item editor on a record, and verify that all columns are visible. 2. Apply patch. 3. Reload editor, and verify that column visibility hasn't changed. 4. Open "Hide/show columns," and verify that you can add and remove columns. 5. Change the visibility and togglability of some columns in columns_settings.pl, and verify that these correctly apply to additem.pl. NOTE: The columns that are configurable are selected from the non-hidden columns that have mappings to MARC subfields in the default MARC21 framework (and can thus be displayed in the item editor).
Sorry, QA tools found some forbidden tab chars: cataloguing/additem.pl forbidden pattern: tab char (line 807) koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc forbidden pattern: tab char (line 13) forbidden pattern: tab char (line 12) koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt forbidden pattern: tab char (line 15) forbidden pattern: tab char (line 22) forbidden pattern: tab char (line 17) forbidden pattern: tab char (line 16) koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt forbidden pattern: tab char (line 41) forbidden pattern: tab char (line 40)
Created attachment 41418 [details] [review] Bug 14510: Allow column visibility in additem.pl to be customized This patch adds the table of items on additem.pl to the columns customizer. Test plan: 1. Open item editor on a record, and verify that all columns are visible. 2. Apply patch. 3. Reload editor, and verify that column visibility hasn't changed. 4. Open "Hide/show columns," and verify that you can add and remove columns. 5. Change the visibility and togglability of some columns in columns_settings.pl, and verify that these correctly apply to additem.pl. NOTE: The columns that are configurable are selected from the non-hidden columns that have mappings to MARC subfields in the default MARC21 framework (and can thus be displayed in the item editor). Signed-off-by: Jenny Schmidt <jschmidt@switchinc.org>
Created attachment 41419 [details] [review] Bug 14510: (QA followup) remove extraneous whitespace
Jesse, This works quite well! How did you choose the order of the fields on the column settings configuration page? What about the stocknumber and statisticvalue fields, for instance?
(In reply to Jonathan Druart from comment #5) > Jesse, > This works quite well! > How did you choose the order of the fields on the column settings > configuration page? > What about the stocknumber and statisticvalue fields, for instance? The order and selection of the columns in question is based on which columns are mapped to subfields in the MARC21 framework. These are the only columns that can appear in the table. Are there any such fields that are mapped in UNIMARC but not MARC21?
Joubu: pianohacker: for instance stocknumber is not mapped by default, but can be mapped pianohacker: hrm, decent point. pianohacker: Joubu: based on my patch, and your work with the datatables stuff, even if I throw in all those columns it will only show the ones that are actually visible in the "show/hide columns" menu, and in the correct order, right? Joubu: I think so, yes matts est désormais connu sous le nom de matts_away Joubu: that's the point, I think it's better to show all columns pianohacker: agreed nengard est désormais connu sous le nom de nengard_webinar Joubu: and display them either the order on admin/koha2marclinks.pl either the DB order edveal-afk est désormais connu sous le nom de edveal Joubu: DB order ie. kohastructure.sql pianohacker: yeah, to be consistent with something pianohacker: Joubu: all right, have that on my todo list.
Created attachment 41800 [details] [review] Bug 14510: (QA followup) Add more columns, resort Per a conversation with Jonathan Druart, add all columns that could be reasonably mapped, and order them the same as in kohastructure.sql.
Jesse, This does not work (even without the last patch). To reproduce: hide the first column by default (barcode), save and refresh the add item page. The first column is hidden (in my case 'damaged'). You will have to change the way the feature works. The way it works currently is based on the order of the columns, not the names. Marked as Failed QA.
(In reply to Jonathan Druart from comment #9) > Jesse, > > This does not work (even without the last patch). > To reproduce: hide the first column by default (barcode), save and refresh > the add item page. > The first column is hidden (in my case 'damaged'). > > You will have to change the way the feature works. The way it works > currently is based on the order of the columns, not the names. > > Marked as Failed QA. Was this on a UNIMARC system? If so, is there any chance you could post a sandbox link that I could look at? I thought I'd made it possible for it to work based on name.
Yes it was a UNIMARC install. But same on a MARC21 fresh install. Check "cn_source is hidden by default". Refresh cataloguing/additem.pl?biblionumber=109 The third column is hidden (damaged status).
(In reply to Jonathan Druart from comment #11) > Yes it was a UNIMARC install. > > But same on a MARC21 fresh install. > > Check "cn_source is hidden by default". > Refresh cataloguing/additem.pl?biblionumber=109 > > The third column is hidden (damaged status). This is very bizarre; I can't duplicate this issue. Could I ask you to post a link to a sandbox where this issue occurs, so I can poke around?
On sandbox 13 (reminder: the DB is erased every day). http://pro.test13.biblibre.com/cgi-bin/koha/admin/columns_settings.pl : barcode, dateaccessioned and homebranch are hidden by default. http://pro.test13.biblibre.com/cgi-bin/koha/cataloguing/additem.pl?biblionumber=9 "Propriétaire", "Dépositaire" and "Code barres" are hidden Propriétaire: homebranch Dépositaire: holdingbranch Code barres: barcode
Ok, I found why it does not work: dateaccessioned is not mapped. Same with my previous example, barcode is not mapped on my local install.
Created attachment 42353 [details] [review] Bug 14510: (QA followup) Fix bug with unmapped columns Fall back more smoothly when items subfields are not mapped to a kohafield. Note, however, that this development does not allow applying default settings to subfields that aren't mapped. A note has been added to the columns settings page, as there is no known workaround for this.
Created attachment 42379 [details] [review] Bug 14510: Redirect to the items' fields mapped
Jesse, Great, it works perfectly, for the items editor table... Not the others :) Try the late orders table for instance, the ft is broken on it.
Created attachment 42624 [details] [review] Bug 14510: (QA followup) fix columns settings in other pages
Created attachment 42628 [details] [review] Bug 14510: Allow column visibility in additem.pl to be customized This patch adds the table of items on additem.pl to the columns customizer. Test plan: 1. Open item editor on a record, and verify that all columns are visible. 2. Apply patch. 3. Reload editor, and verify that column visibility hasn't changed. 4. Open "Hide/show columns," and verify that you can add and remove columns. 5. Change the visibility and togglability of some columns in columns_settings.pl, and verify that these correctly apply to additem.pl. NOTE: The columns that are configurable are selected from the non-hidden columns that have mappings to MARC subfields in the default MARC21 framework (and can thus be displayed in the item editor). Signed-off-by: Jenny Schmidt <jschmidt@switchinc.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 42629 [details] [review] Bug 14510: (QA followup) remove extraneous whitespace Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 42630 [details] [review] Bug 14510: (QA followup) Add more columns, resort Per a conversation with Jonathan Druart, add all columns that could be reasonably mapped, and order them the same as in kohastructure.sql. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 42631 [details] [review] Bug 14510: (QA followup) Fix bug with unmapped columns Fall back more smoothly when items subfields are not mapped to a kohafield. Note, however, that this development does not allow applying default settings to subfields that aren't mapped. A note has been added to the columns settings page, as there is no known workaround for this. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 42632 [details] [review] Bug 14510: Redirect to the items' fields mapped Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 42633 [details] [review] Bug 14510: (QA followup) fix columns settings in other pages Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Patches pushed to master. Thanks Jesse!