Description
Nick Clemens (kidclamp)
2017-09-06 14:42:49 UTC
Created attachment 66897 [details] [review] Bug 19263: Rancor - Add auto-001 widget WIP code - tied to authorised values for 001 field to set numebrs Created attachment 76864 [details] [review] Bug 19263: Rancor - Add auto-001 widget To test: 1 - Define a new authorised valued category "CONTROL_NUM_SEQUENCE" 2 - Add a value/sequence The authorised_value is the starting value - shoudl end in a number that can be incremented e.g. "control_sequence_001" The description field is the name for the seqeuence Opac description is unused 3 - Edit a record in rancor 4 - Note the new widget and option to increment or assign manually Created attachment 78085 [details] [review] Bug 19263: Rancor - Add auto-001 widget To test: 1 - Define a new authorised valued category "CONTROL_NUM_SEQUENCE" 2 - Add a value/sequence The authorised_value is the starting value - shoudl end in a number that can be incremented e.g. "control_sequence_001" The description field is the name for the seqeuence Opac description is unused 3 - Edit a record in rancor 4 - Note the new widget and option to increment or assign manually Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> I think this is a nice addition, but some small things: - Please add the new authorised value category to the default list and add a database update. - The Plugin will show always now, there is no way to turn it off. I think we shouldn't force it like that. As we can't delete authorised value categories at the moment, maybe the easiest would be to look for existing entries and decide on that if the feature should be active or not. It also wouldn't leave you with an empty/non-working widget so easily. - The buttons are a little huge going over the lines... (not blocker, but having a look would be cool) Making changes based on feedback. Created attachment 80231 [details] [review] Bug 19263 Advanced Editor - Rancor - Add auto control number (001) widget In advanced editor mode for cataloging, the 001 widget will automatically assign the next control number if a format is defined in authorised_values table. To test you need access to the database. 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Enter a new value for authorised_values with the authorised_value column ending in a number 3) Edit a record using the advanced editor, specifically the 001 field 4) Note the new widget and option to increment or assign manually. The buttons fit within the widget now, and there's a database update to create the CONTROL_NUM_SEQUENCE. Bug 19263 Rancor - Add auto control number (001) widget In advanced editor mode for cataloging, the 001 widget will automatically assign the next control number if a format is defined in authorised_values table. To test you need access to the database. 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Enter a new value for authorised_values with the authorised_value column ending in a number 3) Edit a record using the advanced editor, specifically the 001 field 4) Note the new widget and option to increment or assign manually. The buttons fit within the widget now, and there's a database update to create the CONTROL_NUM_SEQUENCE. Quick feedback on the second patch: 1. Commit message must start with "Bug 19263: ", not a big deal ;) 2. Changes in the atomic update files will affect existing installations only. Changes to installer/data/mysql/mandatory/auth_val_cat.sql must be provided for new installations. 3. At first glance the second remark from comment 4 has not been taken into account. Created attachment 80237 [details] [review] Bug 19263: Rancor - Add auto control number (001) widget To test you need access to the database. 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Edit a record using advanced editor and note that widget does NOT show for 001 field 3) Enter a new value for authorised_values table with: CONTROL_NUM_SEQUENCE in category column authorised_value column has string ending with a number lib column has a short string indicating type of control seq ("FAW") 4) Edit a record using advanced editor and note that the widget does show for 001 field Change inclues database update for new installations. See Comment 9 Created attachment 80240 [details] [review] Bug 19263: Rancor - Add auto control number (001) widget To test you need access to the database. 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Edit a record using advanced editor and note that widget does NOT show for 001 field 3) Enter a new value for authorised_values table with: CONTROL_NUM_SEQUENCE in category column authorised_value column has string ending with a number lib column has a short string indicating type of control seq ("FAW") 4) Edit a record using advanced editor and note that the widget does show for 001 field Change inclues database update for new installations. Comment on attachment 80240 [details] [review] Bug 19263: Rancor - Add auto control number (001) widget Killing this patch Created attachment 80257 [details] [review] Bug 19263: 001 widget only for configured client Tests: 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Edit a bib record using advanced editor and note that 001 widget isn't there when adding/editing 001 field 3) Add a new row into authorised_values table with: a) CONTROL_NUM_SEQUENCE in category column b) authorised_value column has a string ending with a number i.e. "faw0001" c) lib column has a short string indicating type of control number i.e. "FAW" 4) Edit a bib record using the advanced editor and note that the 001 widget is there when adding / editing 001 field Created attachment 80306 [details] [review] Bug 19263: Rancor - Add auto-001 widget To test: 1 - Define a new authorised valued category "CONTROL_NUM_SEQUENCE" 2 - Add a value/sequence The authorised_value is the starting value - shoudl end in a number that can be incremented e.g. "control_sequence_001" The description field is the name for the seqeuence Opac description is unused 3 - Edit a record in rancor 4 - Note the new widget and option to increment or assign manually Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Created attachment 80307 [details] [review] Bug 19263: Advanced Editor - Rancor - Add auto control number (001) widget In advanced editor mode for cataloging, the 001 widget will automatically assign the next control number if a format is defined in authorised_values table. To test you need access to the database. 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Enter a new value for authorised_values with the authorised_value column ending in a number 3) Edit a record using the advanced editor, specifically the 001 field 4) Note the new widget and option to increment or assign manually. The buttons fit within the widget now, and there's a database update to create the CONTROL_NUM_SEQUENCE. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 80308 [details] [review] Bug 19263: 001 widget only for configured client Tests: 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Edit a bib record using advanced editor and note that 001 widget isn't there when adding/editing 001 field 3) Add a new row into authorised_values table with: a) CONTROL_NUM_SEQUENCE in category column b) authorised_value column has a string ending with a number i.e. "faw0001" c) lib column has a short string indicating type of control number i.e. "FAW" 4) Edit a bib record using the advanced editor and note that the 001 widget is there when adding / editing 001 field Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Comment on attachment 80308 [details] [review] Bug 19263: 001 widget only for configured client Review of attachment 80308 [details] [review]: ----------------------------------------------------------------- ::: installer/data/mysql/mandatory/auth_val_cat.sql @@ +44,4 @@ > ('HINGS_C'), > ('HINGS_AS'), > ('HINGS_RD'), > + ('STACK') There is missing colon ::: koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc @@ +127,5 @@ > + + _("Control number: ") > + + '<span class="control-number-widget-contents"></span>' > + + '<button class="control-number-widget-assign">' + _("Assign next") + '</button>' > + + '<select class="control-number-widget-sequence"></select>' > + + '<button class="control-number-widget-override">Override</button>' "Override" is not translatable @@ +157,5 @@ > + > + if ( result ) widget.setControlNumber( result ); > + } ).end(); > + > + var sequence_list = $.map( KohaBackend.GetAuthorisedValues( 'CONTROL_NUM_SEQUENCE' ), function( authval ) { You don't need to fetch authorised values again - you have them in reg001 variable And I think it would make more sense to have number in lib and the type of control number in authorised_value - there is a precendence for this in stocknumberAV value builder. (In reply to Josef Moravec from comment #18) > And I think it would make more sense to have number in lib and the type of > control number in authorised_value - there is a precendence for this in > stocknumberAV value builder. I don't think so. The point of the lib is to hold the string indicating the type of control number, in our case at DGI, it's intended to hold the client name, like "Springfield Library." It seems like most of the strings in lib contain descriptions/types for the authorised_value. Created attachment 80500 [details] [review] Bug 19263: Changes to address QA issues Changes were made to address QA issues from Comment 17 Tests: 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Edit a bib record using advanced editor and note that the 001 widget isn't there when adding/editing 001 field 3) Add a new row into authorised_values table with: a) CONTROL_NUM_SEQUENCE in category column b) authorised_value column has a string ending with a number i.e. sprLib0001 c) lib column has a short string indicating the type of control number i.e. "Springfield Library" 4) Edit a bib record using the advanced editor and note that the 001 widget is there when adding / editing 001 field Changes to address QA issues in Comment 17 (In reply to Cori Lynn Arnold from comment #19) > (In reply to Josef Moravec from comment #18) > > And I think it would make more sense to have number in lib and the type of > > control number in authorised_value - there is a precendence for this in > > stocknumberAV value builder. > > > I don't think so. The point of the lib is to hold the string indicating the > type of control number, in our case at DGI, it's intended to hold the client > name, like "Springfield Library." It seems like most of the strings in lib > contain descriptions/types for the authorised_value. I understand your position, just pointed out there is an precedence on taking the seqeunce from authorised values. But I will not block the patches because of this. Created attachment 80508 [details] [review] Bug 19263: Rancor - Add auto-001 widget To test: 1 - Define a new authorised valued category "CONTROL_NUM_SEQUENCE" 2 - Add a value/sequence The authorised_value is the starting value - shoudl end in a number that can be incremented e.g. "control_sequence_001" The description field is the name for the seqeuence Opac description is unused 3 - Edit a record in rancor 4 - Note the new widget and option to increment or assign manually Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 80509 [details] [review] Bug 19263: Rancor - 001 widget - db update In advanced editor mode for cataloging, the 001 widget will automatically assign the next control number if a format is defined in authorised_values table. To test you need access to the database. 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Enter a new value for authorised_values with the authorised_value column ending in a number 3) Edit a record using the advanced editor, specifically the 001 field 4) Note the new widget and option to increment or assign manually. The buttons fit within the widget now, and there's a database update to create the CONTROL_NUM_SEQUENCE. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 80510 [details] [review] Bug 19263: Rancor - 001 widdget only for configured client Tests: 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Edit a bib record using advanced editor and note that 001 widget isn't there when adding/editing 001 field 3) Add a new row into authorised_values table with: a) CONTROL_NUM_SEQUENCE in category column b) authorised_value column has a string ending with a number i.e. "faw0001" c) lib column has a short string indicating type of control number i.e. "FAW" 4) Edit a bib record using the advanced editor and note that the 001 widget is there when adding / editing 001 field Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 80511 [details] [review] Bug 19263: Rancor - 001 widget - changes to address QA issues Changes were made to address QA issues from Comment 17 Tests: 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Edit a bib record using advanced editor and note that the 001 widget isn't there when adding/editing 001 field 3) Add a new row into authorised_values table with: a) CONTROL_NUM_SEQUENCE in category column b) authorised_value column has a string ending with a number i.e. sprLib0001 c) lib column has a short string indicating the type of control number i.e. "Springfield Library" 4) Edit a bib record using the advanced editor and note that the 001 widget is there when adding / editing 001 field Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Awesome work all! Pushed to master for 18.11 Enhancement, will not be backported to 18.05.x series. *** Bug 18418 has been marked as a duplicate of this bug. *** |