[Koha-bugs] [Bug 1120] Average loan time report returns no data

bugzilla-daemon at wilbur.katipo.co.nz bugzilla-daemon at wilbur.katipo.co.nz
Thu Aug 3 15:53:54 CEST 2006


http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1120


henridamien at koha-fr.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #2 from henridamien at koha-fr.org  2006-08-04 01:53 -------
I have dug into that bug.
This is owed IMO to a design problem and bad parameters.

Let me explain design problem first: 
Koha DOESNOT store any issuedate for an issue. Timestamp is changed whenever an
operation is done. (a return for instance.) And this is a major problem for
this script since we HAVE to GUESS the issue date from a date_due.

I achieved this through an ugly SQL workaround that takes issueingrules from
the issue branch and Calculate SUPPOSED issue_date this way :
due_date - issuelength (for THIS borrowercategory, for THIS itemtype and THIS
branchcode)

So, If the library, HAS NOT filled ALL the proper values for the issuingrules.
Then the GUESS will return no issuedate then no loanlength, then no average...

So To solve this, you can fill in ALL the values for default branch and then
use  this SQL line script to fill ALL the Values for MYBRANCH : 

<Code>
INSERT INTO issuingrules (
`categorycode`,`itemtype`,`restrictedtype`,`rentaldiscount`,`reservecharge`,`fine`,
 `firstremind`,`chargeperiod`,`accountsent` ,`chargename`,`maxissueqty`,
`issuelength`,`branchcode`) SELECT `categorycode`,`itemtype`,`restrictedtype`,
`rentaldiscount`,`reservecharge`,`fine`,`firstremind`,`chargeperiod`,`accountsent`
,`chargename`,`maxissueqty`,`issuelength`,"MYBRANCH"
  FROM issuingrules
</Code>

Maybe we could think for Koha3.0 to store issuedate in issuetable.




------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.





More information about the Koha-bugs mailing list