Bug 7372 - RoadTypes should be folded into Authorised Values
Summary: RoadTypes should be folded into Authorised Values
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: 3.16
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 11760 13443
  Show dependency treegraph
 
Reported: 2011-12-21 11:33 UTC by Ian Walls
Modified: 2016-06-21 21:37 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 7372: Move road types from the roadtype table to the ROADTYPE AV (23.02 KB, patch)
2013-10-23 12:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7372: Move road types from the roadtype table to the ROADTYPE AV (22.98 KB, patch)
2013-10-30 07:55 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 7372: Move road types from the roadtype table to the ROADTYPE AV (23.11 KB, patch)
2014-02-12 16:14 UTC, Sophie MEYNIEUX
Details | Diff | Splinter Review
Bug 7372: Move road types from the roadtype table to the ROADTYPE AV (22.58 KB, patch)
2014-02-21 14:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 7372: (follow-up) does execute this DB entry twice (2.84 KB, patch)
2014-09-11 13:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7372: (follow-up) remove debug message (899 bytes, patch)
2014-10-09 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Walls 2011-12-21 11:33:48 UTC
The current data structure for Road Types is essentially the same as for Authorised Values, but it gets it's own admin page and database table.  In an effort to simply both the Koha data structure, and the admin main page, I suggest moving this into Authorised Values.

This development is marked as "(OUEST-PROVENCE)".  Is there a reason for the separate table and admin page that I don't understand, (not being in a European library)?
Comment 1 Ian Walls 2012-03-02 19:02:39 UTC
Data layer:

Step 1:  create new authorised value ROADTYPE, both in default SQL and databaseupdate.pl

Step 2:  migrate existing roadtype table into new authorised value category using databaseupdate.pl

Code layer:

Step 3:  replace usage of GetRoadTypes and GetRoadTypeDetails with GetAuthorisedValues(ROADTYPE) and GetKohaAuthorisedValueLib() respectively

Step 4:  remove administrative links to admin/roadtype.pl


Cleanup:

Step 5:  remove admin/roadtype.pl page and corresponding template

Step 6:  remove GetRoadTypes and GetRoadTypeDetails subroutines from C4/Members.pm

Step 7:  remove roadtype table from DB and kohastructure.sql

Documentation:

Step 8:  update documentation to reflect new mechanism for handling Road Types
Comment 2 Jonathan Druart 2013-10-23 12:35:42 UTC Comment hidden (obsolete)
Comment 3 I'm just a bot 2013-10-30 07:53:11 UTC
Applying: Bug 7372: Move road types from the roadtype table to the ROADTYPE AV
Using index info to reconstruct a base tree...
M	installer/data/mysql/updatedatabase.pl
Falling back to patching base and 3-way merge...
Removing koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Removing admin/roadtype.pl
Patch failed at 0001 Bug 7372: Move road types from the roadtype table to the ROADTYPE AV
The copy of the patch that failed is found in:
   /home/christopher/git/koha/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Comment 4 Chris Cormack 2013-10-30 07:55:18 UTC Comment hidden (obsolete)
Comment 5 Sophie MEYNIEUX 2014-02-12 16:14:02 UTC Comment hidden (obsolete)
Comment 6 Sophie MEYNIEUX 2014-02-12 16:17:43 UTC
Works as described in test plan
Comment 7 Kyle M Hall 2014-02-21 14:36:29 UTC
Created attachment 25540 [details] [review]
Bug 7372: Move road types from the roadtype table to the ROADTYPE AV

Currently road types are stored in a specific table in DB. Moreover, an
admin page is present in order to manage them.
This patch proposes to remove this table and this page in favour of a
new authorised value category 'ROADTYPE'.

This patch:
- adds a new AV category 'ROADTYPE' (created from the roadtype table
  content).
- remove the roadtype table.
- remove the .pl and .tt file admin/roadtype
- remove the 2 routines C4::Members::GetRoadTypes and
  C4::Members::GetRoadTypeDetails

Test plan:
1/ Execute the updatedatabase entry and verify existing roadtypes are
now stored in the AV 'ROADTYPE'.
2/ Verify you can add/update a streettype for patrons.
3/ Verify on following pages the streettype is displayed in patron
information (top left):
  circ/circulation.pl
  members/memberentry.pl
  members/moremember.pl
  members/routing-lists.pl

Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Passes koha-qa.pl, t and xt. Works as advertised.
Comment 8 Galen Charlton 2014-02-21 16:12:27 UTC
Pushed to master.  Thanks, Jonathan!
Comment 9 Fridolin Somers 2014-06-03 10:25:47 UTC
Pushed to 3.14.x, will be in 3.14.08
Comment 10 Jonathan Druart 2014-09-11 13:24:50 UTC
Created attachment 31526 [details] [review]
Bug 7372: (follow-up) does execute this DB entry twice

Since this enh has been backported on 3.14, this patch should be applied
on 3.16 and master branch in order to update the updatedb entry.
It should not be executed twice otherwise the process is stuck on this
entry.

http://irc.koha-community.org/koha/2014-09-11#i_1567078
Comment 11 Jonathan Druart 2014-09-11 13:25:41 UTC
ping 3.16 and master RM.
Comment 12 Tomás Cohen Arazi 2014-09-23 18:49:24 UTC
Followup pushed to master. Next time please fill a new bug report!
Comment 13 Jonathan Druart 2014-10-09 13:11:54 UTC
Created attachment 32083 [details] [review]
Bug 7372: (follow-up) remove debug message
Comment 14 Jonathan Druart 2014-10-09 13:12:42 UTC
Tomas, Paul have found a debug message (in French...) in the last patch. Could you push it please?
Comment 15 Tomás Cohen Arazi 2014-10-09 19:10:04 UTC
Followup pushed to master, thanks Jonathan!
Comment 16 Mason James 2014-12-22 16:49:33 UTC
(In reply to Jonathan Druart from comment #11)
> ping 3.16 and master RM.

Followups pushed to 3.16.x, will be in 3.16.6