Bug 8428

Summary: can't save contracts
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Mason James <mtj>
Severity: critical    
Priority: P5 - low CC: chris, katrin.fischer, mtj, paul.poulain
Version: 3.10   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=1
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 8181    
Attachments: Bug 8428 - can't save contracts
[SIGNED-OFF] Bug 8428 - can't save contracts
serials claim form messed up

Description Nicole C. Engard 2012-07-12 12:23:49 UTC
I'm trying to create a contract and no matter how many times I click the save button nothing happens.  I get no errors, no saving, no confirmation, just nothing.
Comment 1 Katrin Fischer 2012-08-23 05:44:50 UTC
I can confirm this bug. Firebug shows a Javascript error:

ReferenceError: Date_from_syspref is not defined
[Bei diesem Fehler anhalten] 	

var startDate = Date_from_syspref($("#contractstartdate").val());
Comment 2 Katrin Fischer 2012-08-23 05:56:06 UTC
I think the problem was caused by the switch to the new calendar, because the new calendar.inc file is missing the function. Date_from_syspref.

The function is also used in claim.tt
Comment 3 Owen Leonard 2012-08-23 17:06:26 UTC Comment hidden (obsolete)
Comment 4 Nicole C. Engard 2012-08-23 18:00:39 UTC
Created attachment 11800 [details] [review]
[SIGNED-OFF] Bug 8428 - can't save contracts

When I replaced the old calendar widget with the jQueryUI version
we lost a JavaScript function which is required by a couple of
pages: Date_from_syspref. This patch adds the function back
to the calendar include and corrects variables in the two
affected templates to make it work again.

To test:

- create a new contract. Submitting should work properly and
  without JavaScript errors.
- Open the serials claims page (serials/claims.pl) and filter
  the results by date. Submitting the filter form should
  work properly and without JavaScript errors.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Both tests passed.
Comment 5 Nicole C. Engard 2012-08-23 18:01:37 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2012-08-23 18:23:34 UTC
(In reply to comment #5)
> A follow up should be submitted to make it so that the title
> search box appears next to the Title label instead of the Library label like
> it does now.

This issue is unrelated to the changes made in this patch.
Comment 7 Nicole C. Engard 2012-08-23 18:45:09 UTC
Design issue submitted in Bug 8681
Comment 8 Nicole C. Engard 2012-08-23 18:45:44 UTC
Comment on attachment 11801 [details]
serials claim form messed up

removing - now on Bug 8681
Comment 9 Mason James 2012-09-14 12:23:00 UTC
(In reply to comment #4)
> Created attachment 11800 [details] [review]
> [SIGNED-OFF] Bug 8428 - can't save contracts
> Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
> Both tests passed.

passing QA...

$ koha-qa.pl  

testing 1 commit(s) (applied to commit 0acebb8)
 * d4f2940 Bug 8428 - can't save contracts
      koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt
      koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt

* koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc                    OK
* koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt              OK
* koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt                OK
Comment 10 Paul Poulain 2012-09-14 15:32:47 UTC
Patch pushed to master
Comment 11 Chris Cormack 2012-09-16 08:44:25 UTC
Doesn't apply on 3.8.x please reformat if needed
Comment 12 Owen Leonard 2012-09-17 12:45:52 UTC
(In reply to comment #11)
> Doesn't apply on 3.8.x please reformat if needed

Not needed. The bug is related to the addition of the jQueryUI datepicker which isn't in 3.8.x.
Comment 13 Chris Cormack 2013-04-20 22:36:23 UTC
Resolved in 3.10.0