Bug 21456: The 'New authority' button lists authority types inconsistently
authorAndreas Roussos <arouss1980@gmail.com>
Sun, 30 Sep 2018 10:06:28 +0000 (13:06 +0300)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 17 Oct 2018 13:52:23 +0000 (13:52 +0000)
The 'New authority' button does not always list the available
authority types in A-Z order based on their description.

This patch fixes that.

Test plan:
1) Go to Home > Authorities in the staff client; notice how the
   'New authority' button lists auth types sorted by description.
2) Go to an authority's detail page; notice how the same 'New
   authority' button will list auth types sorted by their code.
3) Apply the patch.
4) In an authority's detail page, the 'New authority' button will
   now list the available authority types sorted by description.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
authorities/detail.pl

index 908b7bd..0e7ba42 100755 (executable)
@@ -188,7 +188,7 @@ my $authtypecode = $authobj ? $authobj->authtypecode : q{};
 $tagslib = &GetTagsLabels(1,$authtypecode);
 
 # Build list of authtypes for showing them
-my $authority_types = Koha::Authority::Types->search({}, { order_by => ['authtypecode']});
+my $authority_types = Koha::Authority::Types->search({}, { order_by => ['authtypetext']});
 
 my $record=GetAuthority($authid);