Bug 22408 - Subscription entry form cleanup
Summary: Subscription entry form cleanup
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 22250
Blocks: 25696
  Show dependency treegraph
 
Reported: 2019-02-25 16:08 UTC by Owen Leonard
Modified: 2020-06-15 08:34 UTC (History)
6 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:
19.05.00


Attachments
Screenshot showing the proposed interface (40.34 KB, image/png)
2019-02-25 16:08 UTC, Owen Leonard
Details
Bug 22408: Subscription entry form cleanup (31.19 KB, patch)
2019-02-25 17:45 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22408: Subscription entry form cleanup (31.18 KB, patch)
2019-04-17 12:20 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22408: Subscription entry form cleanup (31.25 KB, patch)
2019-04-26 18:42 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 22408: Subscription entry form cleanup (31.25 KB, patch)
2019-04-27 14:21 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2019-02-25 16:08:41 UTC
Created attachment 85629 [details]
Screenshot showing the proposed interface

I would like to make a number of changes to the subscription entry form

 - Make the default layout single-column (like patron entry)
 - Switch the layout to two-column only when testing prediction pattern
 - Change the style of some buttons and links
 - Clean up some issues with capitalization and spacing
 - Make it clearer when form fields are read-only
Comment 1 Owen Leonard 2019-02-25 17:45:00 UTC Comment hidden (obsolete)
Comment 2 Séverine Queune 2019-02-27 14:45:29 UTC
Hi Owen,
This is the mail I've received form the sandbox : 

The sandbox you've requested is not ready.
Some problems occurred applying patches from bug 22408:
<h1>Something went wrong !</h1>Applying: Bug 22408: Subscription entry form cleanup
fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt).
Patch failed at 0001 Bug 22408: Subscription entry form cleanup
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run git bz apply --continue.
If you would prefer to skip this patch, instead run git bz apply --skip.
To restore the original branch and stop patching run git bz apply --abort.
error: could not build fake ancestor
Bug 22408 - Subscription entry form cleanup

85630 - Bug 22408: Subscription entry form cleanup

Apply? [(y)es, (n)o, (i)nteractive] Patch left in /tmp/Bug-22408-Subscription-entry-form-cleanup-wLHUqi.patch .
Comment 3 Owen Leonard 2019-02-27 15:41:34 UTC
I rebased Bug 22250, which I think was causing the problem. Thanks for testing!
Comment 4 Hayley Pelham 2019-04-16 04:34:54 UTC
Applying: Bug 22408: Subscription entry form cleanup
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt).
error: could not build fake ancestor
Patch failed at 0001 Bug 22408: Subscription entry form cleanup

Setting to Patch doesn't apply
Comment 5 Owen Leonard 2019-04-17 12:20:34 UTC
Created attachment 88189 [details] [review]
Bug 22408: Subscription entry form cleanup

This patch makes a number of changes to the subscription entry form:

  - Make the default layout single-column.
  - Switch the layout to two-column only when testing prediction
    pattern.
    - Add a button to hide the prediction pattern test pane.
  - Change the style of some buttons and links. Add Font Awesome icons
    to some.
  - Clean up some issues with capitalization and spacing.
  - Make it clearer when form fields are read-only: Move "locked" form
    field style from addbiblio.css to staff-global.css and improve it
    with regard to mouse interactions

To test, apply the patch and regenerate the staff client CSS. Clear your
browser cache if necessary.

 - Go to Serials -> New subscription.
 - Readonly fields under "Vendor" and "Record" should show a small
   padlock icon.
 - Test the process of adding a subscription, paying special attention
   to the advanced pattern controls: Showing, hiding, modifying,
   canceling.
 - Test the process of editing a subscription in the same way.
Comment 6 Hayley Pelham 2019-04-17 23:21:00 UTC
Failed QA

Steps taken
- Set Record for New Subscription and clicked Next, clicking Okay to continue without a Vendor.
- Set Issue publication date, set Frequency 1 week, did not specify subscription length
- Set subscription start date and end date.
- Created an advanced pattern and named it, then created another advanced pattern and chose it as the Numbering pattern above
- Clicked test prediction pattern and selected two dates to not publish randomly
- Clicked Save subscription
- Error!

Error trace:

Can't call method "title" on an undefined value at /home/vagrant/kohaclone/Koha/Subscription.pm line 165

1.    in Koha::Subscription::get_sharable_info at /home/vagrant/kohaclone/Koha/Subscription.pm line 165

      162:     my $sub_numberpatteern =
      163:       Koha::Subscription::Numberpatterns->find( $subscription->numberpattern );
      164: 
      165:     my $sub_mana_info = {
      166:         'title'           => $biblio->title,
      167:         'sfdescription'   => $sub_frequency->description,
      168:         'unit'            => $sub_frequency->unit,

2.   in Koha::SharedContent::prepare_entity_data at /home/vagrant/kohaclone/Koha/SharedContent.pm line 123

      120:     my $ressource_mana_info;
      121:     my $packages = "Koha::".ucfirst($ressourcetype)."s";
      122:     my $package = "Koha::".ucfirst($ressourcetype);
      123:     $ressource_mana_info = $package->get_sharable_info($ressourceid);
      124:     $ressource_mana_info = { %$ressource_mana_info, %$mana_info };
      125: 
      126:     return $ressource_mana_info;

3.    in Koha::SharedContent::send_entity at /home/vagrant/kohaclone/Koha/SharedContent.pm line 82

       79:     my ($lang, $loggedinuser, $resourceid, $resourcetype, $content) = @_;
       80: 
       81:     unless ( $content ) {
       82:         $content = prepare_entity_data($lang, $loggedinuser, $resourceid, $resourcetype);
       83:     }
       84: 
       85:     my $result = process_request(build_request('post', $resourcetype, $content));
Comment 7 Owen Leonard 2019-04-26 12:47:51 UTC
Sorry, I couldn't reproduce this problem. Do you have Mana turned on and configured? Did you test the same process in master?

Thank you for testing!
Comment 8 Michal Denar 2019-04-26 18:42:20 UTC
Created attachment 88953 [details] [review]
Bug 22408: Subscription entry form cleanup

This patch makes a number of changes to the subscription entry form:

  - Make the default layout single-column.
  - Switch the layout to two-column only when testing prediction
    pattern.
    - Add a button to hide the prediction pattern test pane.
  - Change the style of some buttons and links. Add Font Awesome icons
    to some.
  - Clean up some issues with capitalization and spacing.
  - Make it clearer when form fields are read-only: Move "locked" form
    field style from addbiblio.css to staff-global.css and improve it
    with regard to mouse interactions

To test, apply the patch and regenerate the staff client CSS. Clear your
browser cache if necessary.

 - Go to Serials -> New subscription.
 - Readonly fields under "Vendor" and "Record" should show a small
   padlock icon.
 - Test the process of adding a subscription, paying special attention
   to the advanced pattern controls: Showing, hiding, modifying,
   canceling.
 - Test the process of editing a subscription in the same way.

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 9 Katrin Fischer 2019-04-27 14:21:56 UTC
Created attachment 88984 [details] [review]
Bug 22408: Subscription entry form cleanup

This patch makes a number of changes to the subscription entry form:

  - Make the default layout single-column.
  - Switch the layout to two-column only when testing prediction
    pattern.
    - Add a button to hide the prediction pattern test pane.
  - Change the style of some buttons and links. Add Font Awesome icons
    to some.
  - Clean up some issues with capitalization and spacing.
  - Make it clearer when form fields are read-only: Move "locked" form
    field style from addbiblio.css to staff-global.css and improve it
    with regard to mouse interactions

To test, apply the patch and regenerate the staff client CSS. Clear your
browser cache if necessary.

 - Go to Serials -> New subscription.
 - Readonly fields under "Vendor" and "Record" should show a small
   padlock icon.
 - Test the process of adding a subscription, paying special attention
   to the advanced pattern controls: Showing, hiding, modifying,
   canceling.
 - Test the process of editing a subscription in the same way.

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 10 Nick Clemens 2019-04-30 13:43:47 UTC
Awesome work all!

Pushed to master for 19.05
Comment 11 Martin Renvoize 2019-05-08 14:12:58 UTC
Enhancement will not be backported to 18.11.x series.