| Summary: | Marc modification template - multivalued subfields | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
| Component: | Tools | Assignee: | Jonathan Druart <jonathan.druart> |
| Status: | RESOLVED LATER | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | paola.rossi |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11319 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | --- | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
|
Description
Jonathan Druart
2014-07-08 08:26:40 UTC
Paola, This is the expected behavior. In master (without bug 11319 and bug 11413), your action will delete *all* 650$x if at least one 650$x matches the condition (even 650$x from other 650 fields). What you try to do is a special case (at least for the code), you want to delete/update/move a multivalued subfield containing a specific value. This special could be take into account later, but it is not in my todo list for now. Tx, Jonathan.
For later works I add the following question about the form.
And in the end I add some cases.
I've applied the following actions (case of 'All" option):
--Delete field 650$x if 650$x matches RegEx m/ ^second 650 /
--Copy field 650$x to 650$y if 650$x matches RegEx m/ ^second 650 /
--Move field 650$x to 650$y if 650$x matches RegEx m/ ^second 650 /
and the following actions (case of "First" option):
--Delete 1st field 650$x if 650$x matches RegEx m/ ^second 650 /
--Copy 1st field 650$x to 650$y if 650$x matches RegEx m/ ^second 650 /
--Move 1st field 650$x to 650$y if 650$x matches RegEx m/ ^second 650 /
to my test biblio record.
No difference has appeared in the results between the corresponding "All/First" actions.
The action "Add/Update" has no "All/First" option. [For example:
--Update field 650$x with value new-value-updated if 650$x matches RegEx m/ ^second 650 / ].
So, no difference for all the 4 actions applying "All" or "First" option.
Is the "All/First" option not usefull?
Is the form wrong?
In the action "Add/Update" the subfield before the "if" is mandatory.
It could be that the "All/First" option be not concerning the subfields [it seemes so at least in cases of rep fields/rep subfields]
The "All/First" option is surely usefull for the fields.
I think the page is not very friendly in some cases.
Perhaps, as for "Add/Update":
*** in case the user fills the subfield before the "if", the option "All/First" could be hidden in COPY/MOVE/DELETE actions
*** otherwise, in case the user doesn't fill the subfield before the "if", the option "All/First" is shown, concerning the fields only.
---------------------------------------------------------
Another way could be change the order of the input fields in the form:
Delete/Copy/Add subfield ? of "All/First" field ? ....
---------------------------------------------------------
Or, perhaps, the fields could be shown in the form as mandatory
-----------------------------------------------------------------------
The 4 actions, run to my test biblio record, give the following results:
********Delete field 650$x if 650$x matches RegEx m/ ^second 650 /
650 0 .....
_x1-650 x 1 Digital techniques 1
_xfirst 650, second $x
_x1-650 x 3 Digital techniques 3
650 0 _....
650 0 _....
_x3-650 x 1 Digital techniques 1
_xthird 650, second $x
_x3-650 x 3 Digital techniques 3
********Copy field 650$x to 650$y if 650$x matches RegEx m/ ^second 650 /
650 0 _aSignal processing
_x1-650 x 1 Digital techniques 1
_xfirst 650, second $x
_x1-650 x 3 Digital techniques 3
_yfirst 650, second $x
650 0 _aImage processing
_x2-650 x 1 Digital techniques 1
_xsecond 650, second $x
_x2-650 x 3 Digital techniques 3
_yfirst 650, second $x
650 0 _x3-650 x 1 Digital techniques 1
_xthird 650, second $x
_x3-650 x 3 Digital techniques 3
_yfirst 650, second $x
********Update field 650$x with value new-value-updated if 650$x matches RegEx m/ ^second 650 /
650 0 _aSignal processing
_x1-650 x 1 Digital techniques 1
_xfirst 650, second $x
_x1-650 x 3 Digital techniques 3
650 0 _aImage processing
_xnew-value-updated
_xsecond 650, second $x
_x2-650 x 3 Digital techniques 3
650 0 _x3-650 x 1 Digital techniques 1
_xthird 650, second $x
_x3-650 x 3 Digital techniques 3
********Move field 650$x to 650$y if 650$x matches RegEx m/ ^second 650 /
650 0 _aSignal processing
_x1-650 x 1 Digital techniques 1
_xfirst 650, second $x
_x1-650 x 3 Digital techniques 3
_yfirst 650, second $x
650 0 _aImage processing
_yfirst 650, second $x
650 0 _x3-650 x 1 Digital techniques 1
_xthird 650, second $x
_x3-650 x 3 Digital techniques 3
_yfirst 650, second $x
|