[Bug 24134] New: improve 008 framework flexibility (autogenerate date)

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] New: improve 008 framework flexibility (autogenerate date)

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

            Bug ID: 24134
           Summary: improve 008 framework flexibility (autogenerate date)
 Change sponsored?: ---
           Product: Koha
           Version: 18.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Cataloging
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email]

When creating a framework for a form type other than book, it does not seem
possible to autogenerate the date correctly. The 00-05 ‘date entered on file’
in the 008 field, can almost be auto-filled by using the code
<<YYYY>><<MM>><<DD>>. However it doesn’t quite work because the 008 field
expects a 6 digit date [YYMMDD] – this code inserts an 8 digit date [YYYYMMDD].

e.g. <<YY>><<MM>><<DD>> b        at |||p  |||||00|   eng d
= entered on the date <<29>><<11>><<25>>

This creates the following data in a record:
<<YY>>1125 b        at |||p  |||||00|   eng d

Is it possible to make this date code work to insert a date comprising 6
digits?

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|improve 008 framework       |Add placeholder for 2 digit
                   |flexibility (autogenerate   |years to allow
                   |date)                       |autogeneration of dates in
                   |                            |008
           See Also|                            |https://bugs.koha-community
                   |                            |.org/bugzilla3/show_bug.cgi
                   |                            |?id=7045
                 CC|                            |[hidden email]
           Keywords|                            |Academy
            Version|18.11                       |master

--- Comment #1 from Katrin Fischer <[hidden email]> ---
See bug 7045 for the other placeholders already available. At the moment we
support:

<<DD>> - 2 digit day of month
<<MM>> - 2 digit number of month
<<YYYY>> - 4 digit year
<<USER>> - user adding the record

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]-commun |[hidden email]
                   |ity.org                     |
             Status|NEW                         |ASSIGNED

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Carlos Lopez <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Patch complexity|---                         |Small patch
             Status|ASSIGNED                    |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

--- Comment #2 from Owen Leonard <[hidden email]> ---
Created attachment 96106
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96106&action=edit
Bug 24134: Add placeholder for 2 digit years to allow autogeneration of dates
in 008

This patch modifies the code for parsing MARC framework configurations
so that the placeholder "<<YY>>" translates to a two-year date.

To test, apply the patch and modify a framework to include placeholders.
For example, in MARC21:

 - Administration -> MARC structure -> 952 -> Edit subfields -> d
 - Expand "Advanced constraints" and add a default value:
   <<YYYY>> <<YY>> <<MM>> <<DD>> <<USER>>
 - Save your configuration and go to Cataloging.
 - Go to the add/edit items page for a record which uses the framework
   you edited.
 - In the "Add item" form, in the "Date aquired" field, you should see
   the correct values. For example: '2019 19 12 03 Leonard'

Perform the same test when adding an item during the Acquisitions
process (depending on your AcqCreateItem setting).

Note that acqui/neworderempty.pl has been modified because the
placeholder-replacement code is repeated there, but I couldn't discover
how to test it (if it is used at all?)

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Lucas Gass <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Lucas Gass <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #96106|0                           |1
        is obsolete|                            |

--- Comment #3 from Lucas Gass <[hidden email]> ---
Created attachment 96113
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96113&action=edit
Bug 24134: Add placeholder for 2 digit years to allow autogeneration of dates
in 008

This patch modifies the code for parsing MARC framework configurations
so that the placeholder "<<YY>>" translates to a two-year date.

To test, apply the patch and modify a framework to include placeholders.
For example, in MARC21:

 - Administration -> MARC structure -> 952 -> Edit subfields -> d
 - Expand "Advanced constraints" and add a default value:
   <<YYYY>> <<YY>> <<MM>> <<DD>> <<USER>>
 - Save your configuration and go to Cataloging.
 - Go to the add/edit items page for a record which uses the framework
   you edited.
 - In the "Add item" form, in the "Date aquired" field, you should see
   the correct values. For example: '2019 19 12 03 Leonard'

Perform the same test when adding an item during the Acquisitions
process (depending on your AcqCreateItem setting).

Note that acqui/neworderempty.pl has been modified because the
placeholder-replacement code is repeated there, but I couldn't discover
how to test it (if it is used at all?)

Signed-off-by: Lucas Gass <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA
                 CC|                            |[hidden email]

--- Comment #4 from Katrin Fischer <[hidden email]> ---
This works great int he cataloguing editor, but the replacement doesn't work in
the ACQ framework.

To test:
- Activate UseACQFrameworkForBiblioRecords
- Add 008 with a default using placeholders to the ACQ framework
- Add a basket
- Add a new po line to the basket using 'new record'
- Verify that the default is printed as is

And we have a log full of those - but before the patch too:
Use of uninitialized value $value in substitution (s///) at
/home/vagrant/kohaclone/acqui/neworderempty.pl line 236.
Use of uninitialized value $value in substitution (s///) at
/home/vagrant/kohaclone/acqui/neworderempty.pl line 237.
Use of uninitialized value $value in substitution (s///) at
/home/vagrant/kohaclone/acqui/neworderempty.pl line 238.
Use of uninitialized value $value in substitution (s///) at
/home/vagrant/kohaclone/acqui/neworderempty.pl line 239.
Use of uninitialized value $value in substitution (s///) at
/home/vagrant/kohaclone/acqui/neworderempty.pl line 246.

It would be great if it could be fixed, but also contemplating if we should
move this into another bug?

Adding Tomas for the connection to UseACQFrameworkForBiblioRecords.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.koha-community
                   |                            |.org/bugzilla3/show_bug.cgi
                   |                            |?id=24294

--- Comment #5 from Katrin Fischer <[hidden email]> ---
I'd really like to see this one moving.

Jonathan fixes the default value behaviour on controlfields in bug 24294, but
the placeholders are not replaced. Maybe we could treat this as a preexisting
bug - meaning, we let this move in, but file a new bug for fixing the
placeholder behaviour in acquisitions?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.koha-community
                   |                            |.org/bugzilla3/show_bug.cgi
                   |                            |?id=25599

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

--- Comment #6 from Katrin Fischer <[hidden email]> ---
I've filed bug 25599 for the issue with the ACQ framework.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Signed Off

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |25599


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25599
[Bug 25599] Allow use of cataloguing placeholders when ACQ framework is used
creating new record (UseACQFrameworkForBiblioRecords)
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Passed QA

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #96113|0                           |1
        is obsolete|                            |

--- Comment #7 from Katrin Fischer <[hidden email]> ---
Created attachment 105430
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105430&action=edit
Bug 24134: Add placeholder for 2 digit years to allow autogeneration of dates
in 008

This patch modifies the code for parsing MARC framework configurations
so that the placeholder "<<YY>>" translates to a two-year date.

To test, apply the patch and modify a framework to include placeholders.
For example, in MARC21:

 - Administration -> MARC structure -> 952 -> Edit subfields -> d
 - Expand "Advanced constraints" and add a default value:
   <<YYYY>> <<YY>> <<MM>> <<DD>> <<USER>>
 - Save your configuration and go to Cataloging.
 - Go to the add/edit items page for a record which uses the framework
   you edited.
 - In the "Add item" form, in the "Date aquired" field, you should see
   the correct values. For example: '2019 19 12 03 Leonard'

Perform the same test when adding an item during the Acquisitions
process (depending on your AcqCreateItem setting).

Note that acqui/neworderempty.pl has been modified because the
placeholder-replacement code is repeated there, but I couldn't discover
how to test it (if it is used at all?)

Signed-off-by: Lucas Gass <[hidden email]>

Signed-off-by: Katrin Fischer <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |BLOCKED

--- Comment #8 from Katrin Fischer <[hidden email]> ---
Ok, so with bug 25599 fixing neworderempty, we can now move this one on as
well. It applies cleanly on top and I have verified it works. Moving to blocked
until the dependency moves to PQA.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|BLOCKED                     |Signed Off

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

--- Comment #9 from Katrin Fischer <[hidden email]> ---
Unblocking as dependency is in now.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/