Bug 11064

Summary: batch import ignoring framework choice
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: CatalogingAssignee: Jonathan Druart <jonathan.druart+koha>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: abl, david.roberts, gwilliams, indradg, jonathan.druart+koha, katrin.fischer, m.de.rooy, marjorie.barry-vila
Version: master   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10906
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 11064: Hide the framework choice when importing biblio
[SIGNED-OFF] Bug 11064: Hide the framework choice when importing biblio

Description Nicole C. Engard 2013-10-16 21:37:37 UTC
When importing batches of bib records if you choose a framework and no matter what you choose it imports as default. Your choice is ignored.
Comment 1 Jonathan Druart 2015-04-22 10:54:18 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2015-04-22 10:55:13 UTC
This patch does not fix the problem but hide the framework choice.
It will prevent to pretend it works!
Comment 3 Bernardo Gonzalez Kriegel 2015-05-11 18:34:35 UTC
Created attachment 39052 [details] [review]
[SIGNED-OFF] Bug 11064: Hide the framework choice when importing biblio

This choice is ignored, it's preferable to hide it.

Test plan:
0/ Before to apply the patch, confirm the issue
1/ Stage some records for import and on the detail of the batch
(/tools/manage-marc-import.pl?import_batch_id=XXX), confirm the
framework dropdown list does not appear anymore.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Woks as described, no more dropdown.
As stated, is not a fix, only hide the option.
No koha-qa errors
Comment 4 David Roberts 2015-05-18 13:23:45 UTC
Is this related to http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10906?
Comment 5 Jacek Ablewicz 2015-05-19 09:38:51 UTC
(In reply to David Roberts from comment #4)
> Is this related to
> http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10906?

In a way I guess (hard to say for sure, because original bug report is a bit vaque, and over 1.5 years old). It is somehow complicated.. There are 2 possible cases when importing biblio records:

1) some of the biblios in the given import batch do match some existing local record[s], and our choice is to replace such local records contents with imported ones if they match

2) some of the biblios in the import batch do not match any existing record[s] in the local catalogue, or we wish to import them 'as new' even if there are some possible matches found for them

Before Bug 10906 fix, for cases #1, framework choice in import batch commit form was being ignored no matter what (but note that this particular setting is worded as 'Add _new_ bibliographic records into this framework', so it should not apply for records whitch are not imported 'as new' - ?) and also the previousy set framework in the existing recods being replaced by imported ones was getting lost in the process

After Bug 10906, for cases #1, previously set framework in the existing records is not getting lost any longer, but framework choosen in the import batch commit form (if any) is still being ignored for the records which are not imported "as new". But I guess it probably should behave like this = this is an expected behaviour for such cases?

Now, for cases #2 (biblios imported "as new" for whatever reason - there are no matches, or we don't wish to replace any existing records even if there is a match), framework choosen in the import batch commit form _should_ apply.
But it seems to me that it _does_ apply and is not being ignored (at least not for records imported "as new") - ? Note: I tested it only in 3.18 and in ~2 months old master (and it appears to work fine / as expected), but not in the current clean master - perhaps it got somehow broken in more recent versions.
Comment 6 Jacek Ablewicz 2015-05-19 09:49:32 UTC
(In reply to Jonathan Druart from comment #1)
> Created attachment 38319 [details] [review] [review]
> Bug 11064: Hide the framework choice when importing biblio
> 
> This choice is ignored, it's preferable to hide it.
> 
> Test plan:
> 0/ Before to apply the patch, confirm the issue

I'm unable to replicate such issue - framework choice seems to work for me as expected, and it doesn't appear to be ignored (at least not always / not in the cases when it shouldn't be ignored). Can you provide some more details regarding the circumstances when this issue still occurs?
Comment 7 Jonathan Druart 2015-05-26 09:08:06 UTC
(In reply to Jacek Ablewicz from comment #6)
> (In reply to Jonathan Druart from comment #1)
> > Created attachment 38319 [details] [review] [review] [review]
> > Bug 11064: Hide the framework choice when importing biblio
> > 
> > This choice is ignored, it's preferable to hide it.
> > 
> > Test plan:
> > 0/ Before to apply the patch, confirm the issue
> 
> I'm unable to replicate such issue - framework choice seems to work for me
> as expected, and it doesn't appear to be ignored (at least not always / not
> in the cases when it shouldn't be ignored). Can you provide some more
> details regarding the circumstances when this issue still occurs?

Hum, weird.
I don't remember what I tested, but I am pretty sure something was wrong.
I have just retested:
FW1 : 300$a in tab 1
FW2 : ignore 300$a

Create a record with 300$a = "test", export it, import it using the FW2.
On editing the imported record, it used FW2 and 300$a is not displayed. If I select FW1, 300$a does not exist.

This seems to be the expected behavior.

Bernardo, how did you confirm the issue?
Comment 8 Katrin Fischer 2015-06-07 19:46:35 UTC
Moving this to "In dicussion"

Can someone please test this again and document the results please?

Jonathan, I don't understand your last comment - can you try and explain?
Comment 9 Jonathan Druart 2015-06-16 11:36:57 UTC
All seems to work as expected and I suspect that the original report was a duplicate of bug 10906.

Please reopen and detail if I am wrong.

Sorry for the confusion.

*** This bug has been marked as a duplicate of bug 10906 ***