Bugzilla – Attachment 69039 Details for
Bug 17047
Mana Knowledge Base : Data sharing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures - Fix up database schema change, add to kohastructure.sql - Update schema files - Remove javascript debugger call
Bug-17047-QA-Followup---Fix-misc-koha-qapl-failure.patch (text/plain), 13.45 KB, created by
Alex Arnaud
on 2017-11-08 16:12:34 UTC
(
hide
)
Description:
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures - Fix up database schema change, add to kohastructure.sql - Update schema files - Remove javascript debugger call
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2017-11-08 16:12:34 UTC
Size:
13.45 KB
patch
obsolete
>From f5f80c944fe315507e679b0757ffa8a38c818852 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 8 Sep 2017 08:48:24 -0400 >Subject: [PATCH] Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures - > Fix up database schema change, add to kohastructure.sql - Update schema > files - Remove javascript debugger call > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Report.pm | 41 +++++++++++++++------- > Koha/Reports.pm | 4 +++ > Koha/Schema/Result/SavedSql.pm | 11 ++++-- > Koha/Schema/Result/Subscription.pm | 11 ++++-- > Koha/SharedContent.pm | 32 +++++++++++++++++ > Koha/Subscription.pm | 11 +++++- > Koha/Subscription/Numberpatterns.pm | 2 +- > .../mana_01-add_mana_id_in_subscription.sql | 4 +-- > installer/data/mysql/kohastructure.sql | 2 ++ > .../en/modules/admin/preferences/web_services.pref | 2 +- > .../prog/en/modules/serials/subscription-add.tt | 1 - > serials/serials-collection.pl | 2 +- > t/db_dependent/Serials.t | 2 +- > 13 files changed, 100 insertions(+), 25 deletions(-) > >diff --git a/Koha/Report.pm b/Koha/Report.pm >index b0197fb..a78412e 100644 >--- a/Koha/Report.pm >+++ b/Koha/Report.pm >@@ -37,44 +37,59 @@ Koha::Report - Koha Report Object Class > > =cut > >-=head3 type >+=head3 get_search_info > > =cut > > sub get_search_info { >- my $self=shift; >+ my $self = shift; > my $sub_mana_info = { 'query' => shift }; > return $sub_mana_info; > } > >-sub get_sharable_info{ >- my $self=shift; >- my $shared_report_id=shift; >- my $report = Koha::Reports->find($shared_report_id); >- my $sub_mana_info = { >- 'savedsql' => $report->savedsql, >- 'report_name' => $report->report_name, >- 'notes' => $report->notes, >+=head3 get_sharable_info >+ >+=cut >+ >+sub get_sharable_info { >+ my $self = shift; >+ my $shared_report_id = shift; >+ my $report = Koha::Reports->find($shared_report_id); >+ my $sub_mana_info = { >+ 'savedsql' => $report->savedsql, >+ 'report_name' => $report->report_name, >+ 'notes' => $report->notes, > 'report_group' => $report->report_group, >- 'type' => $report->type, >+ 'type' => $report->type, > }; > return $sub_mana_info; > } > >-sub new_from_mana{ >+=head3 new_from_mana >+ >+=cut >+ >+sub new_from_mana { > my $self = shift; > my $data = shift; >+ >+ $data->{mana_id} = $data->{id}; >+ > delete $data->{exportemail}; > delete $data->{kohaversion}; > delete $data->{creationdate}; > delete $data->{lastimport}; >- $data->{mana_id} = $data->{id}; > delete $data->{id}; > delete $data->{nbofusers}; > delete $data->{language}; >+ > Koha::Report->new($data)->store; > } > >+=head3 type >+ >+=cut >+ > sub _type { > return 'SavedSql'; > } >diff --git a/Koha/Reports.pm b/Koha/Reports.pm >index dca236c..4627368 100644 >--- a/Koha/Reports.pm >+++ b/Koha/Reports.pm >@@ -45,6 +45,10 @@ sub _type { > return 'SavedSql'; > } > >+=head3 object_class >+ >+=cut >+ > sub object_class { > return 'Koha::Report'; > } >diff --git a/Koha/Schema/Result/SavedSql.pm b/Koha/Schema/Result/SavedSql.pm >index cb32ef0..04383df 100644 >--- a/Koha/Schema/Result/SavedSql.pm >+++ b/Koha/Schema/Result/SavedSql.pm >@@ -105,6 +105,11 @@ __PACKAGE__->table("saved_sql"); > is_nullable: 1 > size: 80 > >+=head2 mana_id >+ >+ data_type: 'integer' >+ is_nullable: 1 >+ > =cut > > __PACKAGE__->add_columns( >@@ -148,6 +153,8 @@ __PACKAGE__->add_columns( > { data_type => "varchar", is_nullable => 1, size => 80 }, > "report_subgroup", > { data_type => "varchar", is_nullable => 1, size => 80 }, >+ "mana_id", >+ { data_type => "integer", is_nullable => 1 }, > ); > > =head1 PRIMARY KEY >@@ -163,8 +170,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("id"); > > >-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-10-24 09:58:16 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eGWRRzpe1+EBialePAIhMQ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-09-08 16:56:26 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:h0WO9NqYD7hGZIaYTBkYSA > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Subscription.pm b/Koha/Schema/Result/Subscription.pm >index dadb565..9e85fd7 100644 >--- a/Koha/Schema/Result/Subscription.pm >+++ b/Koha/Schema/Result/Subscription.pm >@@ -271,6 +271,11 @@ __PACKAGE__->table("subscription"); > is_nullable: 1 > size: 10 > >+=head2 mana_id >+ >+ data_type: 'integer' >+ is_nullable: 1 >+ > =cut > > __PACKAGE__->add_columns( >@@ -358,6 +363,8 @@ __PACKAGE__->add_columns( > { data_type => "varchar", is_nullable => 1, size => 10 }, > "previousitemtype", > { data_type => "varchar", is_nullable => 1, size => 10 }, >+ "mana_id", >+ { data_type => "integer", is_nullable => 1 }, > ); > > =head1 PRIMARY KEY >@@ -445,8 +452,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-09-12 09:39:32 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jAZGa1b6DkY8Sr12reD4nw >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-09-08 16:56:26 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B7uzwnRQgHBSLbPlditcsA > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/SharedContent.pm b/Koha/SharedContent.pm >index 55d10c5..30619d4 100644 >--- a/Koha/SharedContent.pm >+++ b/Koha/SharedContent.pm >@@ -28,6 +28,18 @@ use C4::Context; > > our $MANA_IP = C4::Context->config('mana_config'); > >+=head1 DESCRIPTION >+ >+Package for accessing shared content via Mana >+ >+=head2 Package Functions >+ >+=cut >+ >+=head3 manaRequest >+ >+=cut >+ > sub manaRequest { > my $mana_request = shift; > my $result; >@@ -53,6 +65,10 @@ sub manaRequest { > return $result ; > } > >+=head3 manaIncrementRequest >+ >+=cut >+ > sub manaIncrementRequest { > my $resource = shift; > my $id = shift; >@@ -71,6 +87,10 @@ sub manaIncrementRequest { > return manaRequest($request); > } > >+=head3 manaPostRequest >+ >+=cut >+ > sub manaPostRequest { > my $resource = shift; > my $content = shift; >@@ -84,6 +104,10 @@ sub manaPostRequest { > return manaRequest($request); > } > >+=head3 manaShareInfos >+ >+=cut >+ > sub manaShareInfos{ > my ($query, $loggedinuser, $ressourceid, $ressourcetype) = @_; > my $mana_language; >@@ -132,6 +156,10 @@ sub manaShareInfos{ > return $result; > } > >+=head3 manaGetRequestWithId >+ >+=cut >+ > sub manaGetRequestWithId { > my $resource = shift; > my $id = shift; >@@ -142,6 +170,10 @@ sub manaGetRequestWithId { > return manaRequest($request); > } > >+=head3 manaGetRequest >+ >+=cut >+ > sub manaGetRequest { > my $resource = shift; > my $parameters = shift; >diff --git a/Koha/Subscription.pm b/Koha/Subscription.pm >index 24595a5..8c41b5d 100644 >--- a/Koha/Subscription.pm >+++ b/Koha/Subscription.pm >@@ -53,7 +53,7 @@ sub biblio { > return scalar Koha::Biblios->find($self->biblionumber); > } > >-=head3 type >+=head3 get_search_info > > =cut > >@@ -74,6 +74,10 @@ sub get_search_info { > return $sub_mana_info; > } > >+=head3 get_sharable_info >+ >+=cut >+ > sub get_sharable_info { > my $self = shift; > my $shared_sub_id = shift; >@@ -120,6 +124,11 @@ sub get_sharable_info { > return $sub_mana_info; > } > >+ >+=head3 _type >+ >+=cut >+ > sub _type { > return 'Subscription'; > } >diff --git a/Koha/Subscription/Numberpatterns.pm b/Koha/Subscription/Numberpatterns.pm >index 638e028..271deb0 100644 >--- a/Koha/Subscription/Numberpatterns.pm >+++ b/Koha/Subscription/Numberpatterns.pm >@@ -32,7 +32,7 @@ Koha::SubscriptionNumberpatterns - Koha SubscriptionNumberpattern object set cla > > =cut > >-=head3 uniqeLabel >+=head3 uniqueLabel > > =cut > >diff --git a/installer/data/mysql/atomicupdate/mana_01-add_mana_id_in_subscription.sql b/installer/data/mysql/atomicupdate/mana_01-add_mana_id_in_subscription.sql >index 66c23ac..a7443db 100644 >--- a/installer/data/mysql/atomicupdate/mana_01-add_mana_id_in_subscription.sql >+++ b/installer/data/mysql/atomicupdate/mana_01-add_mana_id_in_subscription.sql >@@ -1,2 +1,2 @@ >-ALTER TABLE subscription ADD mana_id int(11); >-ALTER TABLE saved_sql ADD mana_id int(11); >+ALTER TABLE subscription ADD mana_id int(11) NULL DEFAULT NULL; >+ALTER TABLE saved_sql ADD mana_id int(11) NULL DEFAULT NULL; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index e547168..3a52713 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1470,6 +1470,7 @@ CREATE TABLE saved_sql ( -- saved sql reports > report_area varchar(6) default NULL, > report_group varchar(80) default NULL, > report_subgroup varchar(80) default NULL, >+ `mana_id` int(11) NULL DEFAULT NULL, > PRIMARY KEY (`id`), > KEY sql_area_group_idx (report_group, report_subgroup), > KEY boridx (`borrowernumber`) >@@ -2128,6 +2129,7 @@ CREATE TABLE `subscription` ( -- information related to the subscription > `reneweddate` date default NULL, -- date of last renewal for the subscription > `itemtype` VARCHAR( 10 ) NULL, > `previousitemtype` VARCHAR( 10 ) NULL, >+ `mana_id` int(11) NULL DEFAULT NULL, > PRIMARY KEY (`subscriptionid`), > CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE, > CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref >index 279302b..c109596 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref >@@ -59,7 +59,7 @@ Web services: > - "Security token used to authenticate on mana:" > - pref: ManaToken > class: Text >- - <br> You need a security token to authenticate on Mana. If this sytem preference is empty, please fill in the following form, you will receive an email to confirm and activate your token. <script src=/intranet-tmpl/lib/jquery/activatemana.js></script> <br> <form> Firstname <input name="firstname" type="text" id="firstname"> <br> Lastname <input name="lastname" type=text id=lastname> <br> email <input name="email" type=text id=email><br> <input type=submit id=activatemana value="Send"></form> >+ - <br> You need a security token to authenticate on Mana. If this sytem preference is empty, please fill in the following form, you will receive an email to confirm and activate your token. <script src=/intranet-tmpl/lib/jquery/activatemana.js></script> <br> <form> First name <input name="firstname" type="text" id="firstname"> <br> Last name <input name="lastname" type=text id=lastname> <br> Email address <input name="email" type=text id=email><br> <input type=submit id=activatemana value="Send"></form> > - > - 'Fields automatically shared with mana' > - pref: AutoShareWithMana >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index 360f977..87ee2b3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -417,7 +417,6 @@ function mana_search() { > }) > .done( function( result ) { > $("#mana_search_result .modal-body").html(result); >-debugger; > $("#mana_search_result_label").text("Results from Mana Knowledge Base"); > $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, { > "sPaginationType": "four_button", >diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl >index afb4462..c07a038 100755 >--- a/serials/serials-collection.pl >+++ b/serials/serials-collection.pl >@@ -82,7 +82,7 @@ if($op eq 'gennext' && @subscriptionid){ > ) = GetNextSeq($subscription, $pattern, $frequency, $expected->{publisheddate}); > > ## We generate the next publication date >- my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity}); >+ $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity}); > my $nextpublisheddate = GetNextDate($subscription, $expected->{publisheddate}, $frequency, 1); > ## Creating the new issue > NewIssue( $newserialseq, $subscriptionid, $subscription->{'biblionumber'}, >diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t >index 5e8e76b..6dc571a 100755 >--- a/t/db_dependent/Serials.t >+++ b/t/db_dependent/Serials.t >@@ -288,7 +288,7 @@ my $pattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subscrip > ( $total_issues, @serials ) = C4::Serials::GetSerials( $subscriptionid ); > my $publisheddate = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); > ( $total_issues, @serials ) = C4::Serials::GetSerials( $subscriptionid ); >-my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity}); >+$frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity}); > my $nextpublisheddate = C4::Serials::GetNextDate($subscription, $publisheddate, $frequency, 1); > my @statuses = qw( 2 2 3 3 3 3 3 4 4 41 42 43 44 5 ); > # Add 14 serials >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17047
:
56175
|
56176
|
56177
|
56178
|
56179
|
56180
|
56181
|
59728
|
59729
|
59931
|
61905
|
62045
|
62046
|
62047
|
62048
|
62049
|
62050
|
62051
|
62052
|
62053
|
62054
|
62075
|
62465
|
62475
|
62485
|
62540
|
62542
|
62543
|
62544
|
62545
|
62546
|
62547
|
62548
|
62549
|
62550
|
62551
|
62552
|
62553
|
62589
|
62591
|
62592
|
62593
|
62594
|
62595
|
62596
|
62597
|
62598
|
62599
|
62603
|
62604
|
62605
|
62606
|
62607
|
62768
|
63476
|
63601
|
63618
|
63619
|
63620
|
63621
|
63622
|
63623
|
64484
|
64530
|
64618
|
64619
|
64620
|
64621
|
64622
|
64623
|
64624
|
64625
|
64626
|
64627
|
64628
|
64629
|
64630
|
64631
|
64632
|
64633
|
64634
|
64635
|
64636
|
64637
|
64638
|
64639
|
64640
|
64641
|
64642
|
64643
|
64648
|
64649
|
64650
|
64651
|
64652
|
64653
|
64654
|
64706
|
64962
|
65058
|
65059
|
65060
|
65061
|
65062
|
65063
|
65064
|
65065
|
65773
|
66667
|
66668
|
66987
|
67003
|
67004
|
67005
|
67006
|
67009
|
67010
|
67011
|
67012
|
67013
|
67014
|
67015
|
67016
|
67017
|
67018
|
67019
|
67020
|
67021
|
67022
|
67023
|
69034
|
69035
|
69036
|
69037
|
69038
|
69039
|
69040
|
69041
|
69091
|
70203
|
70204
|
70205
|
70206
|
70208
|
70209
|
70210
|
70211
|
70561
|
70874
|
72660
|
72661
|
72662
|
72663
|
72664
|
72665
|
72666
|
72667
|
72668
|
72669
|
72670
|
73699
|
73737
|
73738
|
73739
|
73740
|
73741
|
73742
|
73743
|
73744
|
73745
|
73746
|
73747
|
73748
|
73975
|
73976
|
73977
|
73978
|
73979
|
73980
|
73981
|
73982
|
73983
|
73984
|
73985
|
73986
|
76673
|
76674
|
76675
|
76676
|
76677
|
76678
|
76679
|
76680
|
76681
|
76682
|
76683
|
76684
|
78215
|
78216
|
78217
|
78218
|
78219
|
78220
|
78221
|
78222
|
78223
|
78224
|
78225
|
78226
|
78227
|
78228
|
78229
|
79868
|
79869
|
79870
|
79871
|
79872
|
79874
|
79877
|
79878
|
79879
|
79880
|
79881
|
79882
|
79883
|
79884
|
79885
|
79886
|
79887
|
79888
|
79922
|
79923
|
79924
|
79925
|
79926
|
79927
|
79928
|
79929
|
79930
|
79931
|
79932
|
79933
|
79934
|
79935
|
79936
|
79937
|
79938
|
79939
|
80183
|
80184
|
80185
|
80186
|
80187
|
80188
|
80189
|
80190
|
80191
|
80192
|
80193
|
80194
|
80195
|
80196
|
80197
|
80198
|
80199
|
80200
|
80471
|
80472
|
80473
|
80907
|
80908
|
80909
|
80910
|
80911
|
80912
|
80913
|
80914
|
80915
|
80916
|
80917
|
80918
|
80919
|
80920
|
80921
|
80922
|
80923
|
80924
|
81935
|
81936
|
81937
|
81938
|
81939
|
81940
|
81941
|
81942
|
81943
|
81944
|
81945
|
81946
|
81947
|
81948
|
81949
|
81950
|
81951
|
81952
|
81968
|
83863
|
83864
|
83865
|
83866
|
83867
|
83868
|
83869
|
83870
|
83871
|
83872
|
83873
|
83874
|
83875
|
83876
|
83877
|
83878
|
83879
|
83880
|
83881
|
83892
|
83893
|
83894
|
83895
|
83896
|
83897
|
83898
|
83899
|
83900
|
83901
|
83902
|
83903
|
83904
|
83905
|
83906
|
83907
|
83908
|
83909
|
83910
|
83911
|
83912
|
84142
|
84145
|
84210
|
84260
|
84261
|
84262
|
84263
|
84264
|
84265
|
84323
|
84324
|
84325
|
84326
|
84327
|
84328
|
84329
|
84332