Bug 8428 - can't save contracts
Summary: can't save contracts
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: 3.10
Hardware: All All
: P5 - low critical (vote)
Assignee: Owen Leonard
QA Contact: Mason James
URL: /cgi-bin/koha/admin/aqcontract.pl?op=...
Keywords:
Depends on:
Blocks: 8181
  Show dependency treegraph
 
Reported: 2012-07-12 12:23 UTC by Nicole C. Engard
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 8428 - can't save contracts (4.01 KB, patch)
2012-08-23 17:06 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8428 - can't save contracts (4.05 KB, patch)
2012-08-23 18:00 UTC, Nicole C. Engard
Details | Diff | Splinter Review
serials claim form messed up (22.37 KB, image/png)
2012-08-23 18:01 UTC, Nicole C. Engard
Details

Note You need to log in before you can comment on or make changes to this bug.
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