Bug 6125 - Plugin for date acquired does not work on ACQ framework
Summary: Plugin for date acquired does not work on ACQ framework
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.6
Hardware: All All
: P5 - low normal (vote)
Assignee: Adrien SAURAT
QA Contact: Bugs List
URL: /cgi-bin/koha/acqui/neworderempty.pl?...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 15:22 UTC by Katrin Fischer
Modified: 2013-12-05 19:59 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
proposed patch #1 (3.05 KB, patch)
2012-03-20 13:03 UTC, Adrien SAURAT
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2011-04-07 15:22:38 UTC
It does not work because the plugin dateaccessioned is wrong.
dateaccessioned relies on a javascript sub (set_to_today) that is defined in
additem.pl.
For acquisition (and serials), the set_to_today is not defined.
Comment 1 Katrin Fischer 2011-10-26 22:55:11 UTC
The plugin is still broken in current master/version 3.6
Comment 2 Katrin Fischer 2012-03-19 06:01:05 UTC
This is still a bug in current master. The plugin for accession date does not work, neither in ACQ nor in the Default framework.
Comment 3 Adrien SAURAT 2012-03-20 13:03:00 UTC
Created attachment 8347 [details] [review]
proposed patch #1

Repairs dateaccessioned plugin

1/ It now works with neworderempty.pl
2/ The set_to_today function was moved from
additem.tt to dateaccessioned.pl (so it's
available to all pages using the plugin)
Comment 4 Julien Sicot 2012-03-21 15:07:51 UTC
Hi,

I applied the patch and it works well.
Tested in placing order, in receiving order and in cataloging (attach/edit items), everything is OK.
Tested on sandbox.

Julien
Comment 5 Ian Walls 2012-03-22 13:24:35 UTC
Moves set_to_today from template to script, and that seems fine.  There are now some hardcoded English strings for the error messaging, though... obviously not ideal, but is it a big enough to require a followup?  As an English speaker, I don't feel like I can answer this.  Will someone in a non-English context please advise me on this?
Comment 6 Katrin Fischer 2012-03-22 13:32:41 UTC
I am not sure how a user can make this alerts show - if it's more for debugging than for the end user I think having them in the .pl may be fine for now and it could be improved with a follow up later on.
Comment 7 Ian Walls 2012-03-22 13:33:48 UTC
Alright, that sounds fair.  Marking Passed QA.
Comment 8 Adrien SAURAT 2012-03-22 13:42:51 UTC
Oh, indeed, that's a JS code but included in a pl file, and thus not translated...

As Katrin said, it's not aimed at end user and this message was probably never displayed. Maybe it could have been removed in fact (replaced with something like "If ID exists then do something Else do nothing"). But well, could be useful one day =)
Comment 9 Jared Camins-Esakov 2012-05-09 16:57:30 UTC
This bug will be included in the Koha 3.6.5 release.