Changeset 20 for bug.py

Show
Ignore:
Timestamp:
07/07/06 23:02:21 (3 years ago)
Author:
ploum
Message:

#22 : comments are not displayed in a bug

Yehaah ! Initial comments support. Not as easy as I thought

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • bug.py

    r18 r20  
    5454                return self.assignee 
    5555 
    56         def setAllComments () : 
    57                 print "hello" 
     56        def setAllComments (self,array) : 
     57                self.comments = array 
    5858 
    59         def getAllComments () : 
    60                 print "hello" 
     59        def getAllComments (self) : 
     60                return self.comments 
    6161 
    62         def addComment () : 
    63                 print "hello" 
     62        def addComment (self,to_add) : 
     63                self.comments.append(to_add) 
     64 
     65        def comNbr(self) : 
     66                return len(self.comments) 
    6467 
    6568         
     
    7376                self.package="" 
    7477                self.assignee="" 
     78                self.comments=[] 
    7579 
    7680class comment: 
    7781 
    78         def __init__(self,n,c,a): 
     82        def __init__(self,n,c,a,t,d): 
    7983                self.nbr=n 
    8084                self.content=c 
    81                 self.author=a    
     85                self.author=a 
     86                self.title=t 
     87                self.date=d      
     88         
     89        def getNumber(self): 
     90                return self.nbr 
     91 
     92        def getContent(self): 
     93                return self.content 
     94 
     95        def getAuthor(self): 
     96                return self.author 
     97 
     98        def getTitle(self): 
     99                return self.title 
     100 
     101        def getDate(self): 
     102                return self.date