Bug 30037 - Set default profile when staging MARC records on import
Summary: Set default profile when staging MARC records on import
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic record staging/import (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Florian
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-07 14:26 UTC by Florian
Modified: 2024-02-27 13:49 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 30037: Select profile when staging notices (2.43 KB, patch)
2022-03-03 15:05 UTC, Florian
Details | Diff | Splinter Review
[PATCH] Bug 30037: Select profile when staging records (2.53 KB, patch)
2022-04-28 15:18 UTC, Florian
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Florian 2022-02-07 14:26:43 UTC
When staging MARC notices on import, the default profile will always be "Do not use profile", even if you have multiple profiles already set up.

It would be more intuitive to have a way for the users to set up their own default profile so it shows up on page load. That way, it would also reduce the chances of accidently making a duplicate profile.

On our side, we have a fix with a function that makes the profile input search and automatically pick any profile labeled 'default', but this isn't ideal.
Comment 1 Florian 2022-03-03 15:05:56 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2022-03-06 13:02:35 UTC
Just a note, I have seen notices used a lot by French devs when they mean 'records', so it might be a false friend in French maybe?
Comment 3 Katrin Fischer 2022-03-06 13:03:22 UTC
Is this ready for testing/review yet?
Comment 4 Florian 2022-04-06 08:27:41 UTC Comment hidden (obsolete)
Comment 5 Florian 2022-04-06 08:28:36 UTC
(In reply to Katrin Fischer from comment #2)
> Just a note, I have seen notices used a lot by French devs when they mean
> 'records', so it might be a false friend in French maybe?

You're absolutely right, thank you for the correction

And also yes, this is ready for testing.
Comment 6 Florian 2022-04-28 15:18:52 UTC
Created attachment 134280 [details] [review]
[PATCH] Bug 30037: Select profile when staging records

This is a second draft for making the profile selection process easier. Currently, if you have multiple profiles set up when staging Records on import, the defaut selection will always be "Do not use profile".
With this patch, if at least one profile is already set up, the first one in the list (in alphabetical order) will be selected by default.

To test:
1) You will need a Marc record to stage.
2) If you don't have any, create multiple profiles for staging Marc records for import (in the Tools section); two should be enough, they should have different settings.
3) See that "Do not use profile" is always preselected.
4) Apply patch.
5) Reload the page : Now, the first profile of your list should be preselected.
6) Confirm that manually picking a different profile still loads different settings
7) Sign off.

Now rebased.

Thanks-to: Didier Gautheron <didier.gautheron@biblibre.com>
Comment 7 Owen Leonard 2022-04-28 16:34:47 UTC
I think this change goes against the way we generally do things. In fact, we've been patching similar fields elsewhere because it was too easy for the user to accept a possibly incorrect default.

I think if we want to define a default profile we should have it be an additional setting in the profile.
Comment 8 Katrin Fischer 2022-04-28 16:43:00 UTC
(In reply to Owen Leonard from comment #7)
> I think this change goes against the way we generally do things. In fact,
> we've been patching similar fields elsewhere because it was too easy for the
> user to accept a possibly incorrect default.
> 
> I think if we want to define a default profile we should have it be an
> additional setting in the profile.

+1 

I agree with Owen here, this was making me feel uneasy and I think the suggested solution would be a much better fit.
Comment 9 Florian 2022-04-29 07:35:30 UTC
Oh I fully agree, my proposition was just a first step toward making this form more user-friendly.

Owen, do you have exemples of these similar fields? Just to check the proper format we've been aiming for.
Comment 10 Caroline Cyr La Rose 2022-09-09 20:27:32 UTC
Hi Florian,

I'm not sure exactly which one Owen was referring to, but there is something similar that is done for Z39.50 servers. You can check a box when adding/editing a server in Administration to say that you want it selected by default.

Of course, in the case of import profiles, you can only have one selected by default. So there would have to be some sort of warning if you try to make two default.
Comment 11 Noémie Labine 2024-02-27 13:49:14 UTC
+1