Bug 8495

Summary: Javascript error when creating a new order
Product: Koha Reporter: Julian Maurice <julian.maurice>
Component: AcquisitionsAssignee: Julian Maurice <julian.maurice>
Status: CLOSED FIXED QA Contact: Mason James <mtj>
Severity: blocker    
Priority: P5 - low CC: chris, jonathan.druart, mtj, paul.poulain
Version: 3.8   
Hardware: All   
OS: All   
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
Bug 8495: Fix JS error when creating a new order
Bug 8495: Fix JS error when creating a new order

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.