[Koha-cvs] koha bull/statecollection.pl C4/Bull.pm [rel_2_2]

Henri-Damien LAURENT laurenthdl at alinto.com
Tue Aug 8 12:01:41 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Henri-Damien LAURENT <hdl>	06/08/08 10:01:41

Modified files:
	bull           : statecollection.pl 
	C4             : Bull.pm 

Log message:
	BugFixing 1124 1125.
	1125 is a bug that seems to me a design error.
	
	To manage all the serials, it may be better to display the list as in full-serial-issue.tmpl and allow to change through a click on the issue. Receiving the next one or a manual one would be in a different part of the screen, short history (missing list and receivedlist) too.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/bull/statecollection.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.3.2.17&r2=1.3.2.18
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Bull.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.6.2.29&r2=1.6.2.30

Patches:
Index: bull/statecollection.pl
===================================================================
RCS file: /sources/koha/koha/bull/statecollection.pl,v
retrieving revision 1.3.2.17
retrieving revision 1.3.2.18
diff -u -b -r1.3.2.17 -r1.3.2.18
--- bull/statecollection.pl	13 Jun 2006 12:34:15 -0000	1.3.2.17
+++ bull/statecollection.pl	8 Aug 2006 10:01:41 -0000	1.3.2.18
@@ -49,7 +49,8 @@
 		
 		my ($oldstatus) = $sth->fetchrow;
 		if ($serialids[$i]) {
-			serialchangestatus($serialids[$i],$serialseqs[$i],format_date_in_iso($publisheddates[$i]),($planneddates[$i]?format_date_in_iso($planneddates[$i]):format_date_in_iso(localtime(time()))),$status[$i],$notes[$i]) unless ($hassubscriptionexpired && $oldstatus == 1);
+            my $planneddate = ($planneddates[$i]?format_date_in_iso($planneddates[$i]):format_date_in_iso("today")) if ($status[$i]==2);
+			serialchangestatus($serialids[$i],$serialseqs[$i],format_date_in_iso($publisheddates[$i]),$planneddate,$status[$i],$notes[$i]) unless ($hassubscriptionexpired && $oldstatus == 1);
 			if (($status[$i]==2) && C4::Context->preference("serialsadditems")){
 				my %info;
 				$info{branch}=$homebranches[$i];

Index: C4/Bull.pm
===================================================================
RCS file: /sources/koha/koha/C4/Attic/Bull.pm,v
retrieving revision 1.6.2.29
retrieving revision 1.6.2.30
diff -u -b -r1.6.2.29 -r1.6.2.30
--- C4/Bull.pm	4 Aug 2006 09:09:56 -0000	1.6.2.29
+++ C4/Bull.pm	8 Aug 2006 10:01:41 -0000	1.6.2.30
@@ -206,7 +206,7 @@
   my $dbh = C4::Context->dbh;
   my $sth = $dbh->prepare('
   SELECT serial.serialseq,serial.planneddate, serial.publisheddate, serial.status, serial.notes,
-    year(serial.publisheddate) as year,
+    year(IF(serial.publisheddate="00-00-0000",serial.planneddate,serial.publisheddate)) as year,
     aqbudget.bookfundid,aqbooksellers.name as aqbooksellername,biblio.title as bibliotitle
   FROM serial 
         LEFT JOIN subscription ON 
@@ -215,7 +215,7 @@
         LEFT JOIN aqbooksellers on subscription.aqbooksellerid=aqbooksellers.id 
         LEFT JOIN biblio on biblio.biblionumber=subscription.biblionumber 
   WHERE subscription.biblionumber = ? 
-  ORDER BY year,serial.publisheddate,serial.subscriptionid,serial.planneddate');
+  ORDER BY year,IF(serial.publisheddate="00-00-0000",serial.planneddate,serial.publisheddate),serial.subscriptionid');
 	$sth->execute($biblionumber);
 	my @res;
     my %tmpresults;
@@ -440,11 +440,11 @@
 		$sth = $dbh->prepare("SELECT missinglist,recievedlist from subscriptionhistory where subscriptionid=?");
 		$sth->execute($subscriptionid);
 		my ($missinglist,$recievedlist) = $sth->fetchrow;
-		if ($status eq 2) {
+		if ($status eq 2 && ($serialseq!~/\(/ && $recievedlist!~/$serialseq/)) {
 			$recievedlist .= ",$serialseq";
 		}
-		$missinglist .= ",$serialseq" if ($status eq 4) ;
-		$missinglist .= ",not issued $serialseq" if ($status eq 5);
+		$missinglist .= ",$serialseq" if ($status eq 4 && ($serialseq!~/\(/ && $missinglist!~/$serialseq/)) ;
+		$missinglist .= ",not issued $serialseq" if ($status eq 5 && ($serialseq!~/\(/ && $missinglist!~/$serialseq/));
 		$sth=$dbh->prepare("update subscriptionhistory set recievedlist=?, missinglist=? where subscriptionid=?");
 		$sth->execute($recievedlist,$missinglist,$subscriptionid);
 	}





More information about the Koha-cvs mailing list