Bug 8495 - Javascript error when creating a new order
Summary: Javascript error when creating a new order
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low blocker (vote)
Assignee: Julian Maurice
QA Contact: Mason James
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-24 10:23 UTC by Julian Maurice
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 8495: Fix JS error when creating a new order (1.10 KB, patch)
2012-07-24 10:25 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 8495: Fix JS error when creating a new order (1.17 KB, patch)
2012-07-24 12:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 8495: Fix JS error when creating a new order (1.22 KB, patch)
2012-08-10 07:35 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2012-07-24 10:23:12 UTC
Steps to reproduce:
  - syspref AcqCreateItem='ordering'
  - syspref UniqueItemFields='barcode' (or something else, but not empty)
  - with Firebug, enable the 'persistent' mode, so you can see the error message even after form is submitted
  - create a new order, add 1 item, select a budget and click on save.
  - you should see in firebug an error like this : "Syntax error, unrecognized expression: [value=items.barcode]".

This cause the form to be submitted too early in the validation process.
Patch is coming.
Comment 1 Julian Maurice 2012-07-24 10:25:50 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2012-07-24 12:45:46 UTC Comment hidden (obsolete)
Comment 3 Mason James 2012-08-10 04:20:07 UTC
(In reply to comment #2)
> Created attachment 11106 [details] [review]
> Bug 8495: Fix JS error when creating a new order
> 
> bug introduced by bug 7178
> (http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7178)
> 
> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>


hmmm, we are waiting for a 'non BibLibre' sign-off here, before QA?

i will change status to 'needs-signoff' 
(i hope that is ok?)
Comment 4 Chris Cormack 2012-08-10 07:35:23 UTC
Created attachment 11524 [details] [review]
Bug 8495: Fix JS error when creating a new order

bug introduced by bug 7178
(http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7178)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 5 Mason James 2012-08-10 08:20:59 UTC
(In reply to comment #4)
> Created attachment 11524 [details] [review]
> Bug 8495: Fix JS error when creating a new order
> 
> bug introduced by bug 7178
> (http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7178)
> 
> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

patch looks good, passing QA


mason@xen1:~/git/head$ koha-qa.pl
        * cf863e0 Bug 8495: Fix JS error when creating a new order
                koha-tmpl/intranet-tmpl/prog/en/js/additem.js

- perlcritic-progressive tests... OK
- perl -c syntax tests... OK
- xt/tt_valid.t tests... OK
- xt/author/valid-template.t tests... OK
Comment 6 Paul Poulain 2012-08-28 15:51:57 UTC
patch pushed today
Comment 7 Chris Cormack 2012-08-28 22:03:41 UTC
Pushed to 3.8.x, will be in 3.8.5
Comment 8 Julian Maurice 2012-09-14 14:04:02 UTC
Ok in master and 3.8.x. Marked as RESOLVED.