Bug 19520 - Show more information about rotating collections
Summary: Show more information about rotating collections
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: Josef Moravec
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 19519
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-23 19:01 UTC by Josef Moravec
Modified: 2018-09-19 20:18 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19520: Update database (2.87 KB, patch)
2018-03-13 22:18 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Update databse schema files (2.40 KB, patch)
2018-03-13 22:18 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Add tests (4.88 KB, patch)
2018-03-13 22:18 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Add more information about rotating collections (5.67 KB, patch)
2018-03-13 22:18 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Update database (2.94 KB, patch)
2018-03-25 19:47 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Update databse schema files (2.41 KB, patch)
2018-03-25 19:47 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Add tests (4.89 KB, patch)
2018-03-25 19:47 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Add more information about rotating collections (5.78 KB, patch)
2018-03-25 19:47 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Update database (2.92 KB, patch)
2018-03-28 15:35 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Update databse schema files (2.40 KB, patch)
2018-03-28 15:35 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Add tests (4.78 KB, patch)
2018-03-28 15:35 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19520: Add more information about rotating collections (5.67 KB, patch)
2018-03-28 15:35 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Moravec 2017-10-23 19:01:01 UTC
On colections list and detail:
- Number of items in collection
- Number of transferred/untransferred items
- Librarian who created the collection
- Date of creation
- Date of last transfer
Comment 1 Josef Moravec 2018-03-13 22:18:03 UTC
Created attachment 72819 [details] [review]
Bug 19520: Update database
Comment 2 Josef Moravec 2018-03-13 22:18:07 UTC
Created attachment 72820 [details] [review]
Bug 19520: Update databse schema files
Comment 3 Josef Moravec 2018-03-13 22:18:11 UTC
Created attachment 72821 [details] [review]
Bug 19520: Add tests
Comment 4 Josef Moravec 2018-03-13 22:18:14 UTC
Created attachment 72822 [details] [review]
Bug 19520: Add more information about rotating collections

Test plan:
1) Apply the patch
2) Update database
3)
) prove t/db_dependent/Koha/RotatingCollections.t
Comment 5 M. Tompsett 2018-03-14 17:02:58 UTC
Comment on attachment 72819 [details] [review]
Bug 19520: Update database

Review of attachment 72819 [details] [review]:
-----------------------------------------------------------------

::: installer/data/mysql/atomicupdate/Bug19520_Add_more_information_to_rotating_collections.perl
@@ +5,5 @@
> +    $dbh->do( "ALTER TABLE collections ADD CONSTRAINT `collections_ibfk_2` FOREIGN KEY (`createdBy`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE");
> +
> +    $dbh->do( "ALTER TABLE collections ADD COLUMN createdOn datetime default NULL AFTER createdBy" );
> +
> +    $dbh->do( "ALTER TABLE collections ADD COLUMN lastTransferredOn datetime default NULL AFTER createdOn" );

These 4 do's should be encapsulated by !column_exists checks.

@@ +10,5 @@
> +
> +    # or perform some test and warn
> +    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
> +    #    warn "There is something wrong";
> +    # }

And you don't need comments. :)
Comment 6 Josef Moravec 2018-03-25 19:47:05 UTC
Created attachment 73260 [details] [review]
Bug 19520: Update database
Comment 7 Josef Moravec 2018-03-25 19:47:10 UTC
Created attachment 73261 [details] [review]
Bug 19520: Update databse schema files
Comment 8 Josef Moravec 2018-03-25 19:47:14 UTC
Created attachment 73262 [details] [review]
Bug 19520: Add tests
Comment 9 Josef Moravec 2018-03-25 19:47:18 UTC
Created attachment 73263 [details] [review]
Bug 19520: Add more information about rotating collections

Test plan:
1) Apply the patch
2) Update database
3) prove t/db_dependent/Koha/RotatingCollections.t
Comment 10 Josef Moravec 2018-03-25 19:47:43 UTC
(In reply to M. Tompsett from comment #5)
> Comment on attachment 72819 [details] [review] [review]
> Bug 19520: Update database
> 
> Review of attachment 72819 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> :::
> installer/data/mysql/atomicupdate/
> Bug19520_Add_more_information_to_rotating_collections.perl
> @@ +5,5 @@
> > +    $dbh->do( "ALTER TABLE collections ADD CONSTRAINT `collections_ibfk_2` FOREIGN KEY (`createdBy`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE");
> > +
> > +    $dbh->do( "ALTER TABLE collections ADD COLUMN createdOn datetime default NULL AFTER createdBy" );
> > +
> > +    $dbh->do( "ALTER TABLE collections ADD COLUMN lastTransferredOn datetime default NULL AFTER createdOn" );
> 
> These 4 do's should be encapsulated by !column_exists checks.
> 
> @@ +10,5 @@
> > +
> > +    # or perform some test and warn
> > +    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
> > +    #    warn "There is something wrong";
> > +    # }
> 
> And you don't need comments. :)

Done, thanks ;)
Comment 11 Josef Moravec 2018-03-28 15:35:23 UTC
Created attachment 73394 [details] [review]
Bug 19520: Update database
Comment 12 Josef Moravec 2018-03-28 15:35:27 UTC
Created attachment 73395 [details] [review]
Bug 19520: Update databse schema files
Comment 13 Josef Moravec 2018-03-28 15:35:30 UTC
Created attachment 73396 [details] [review]
Bug 19520: Add tests
Comment 14 Josef Moravec 2018-03-28 15:35:33 UTC
Created attachment 73397 [details] [review]
Bug 19520: Add more information about rotating collections

Test plan:
1) Apply the patch
2) Update database
3) prove t/db_dependent/Koha/RotatingCollections.t
Comment 15 Michal Denar 2018-09-19 20:18:32 UTC
Josef, can You rebase this bug?

Thank You


Mike