﻿id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
3000,Search fails when the Wiki _and_ Doxygen has results for a keyword,mgerth@…,cboos,"The problem is a ""datetime.datetime <-> int comparision error"" because:

1. The default date-format of the ISearchSource is datetime[[BR]]

2. DoxygenPlugin returns the filedate (ctime) as int.[[BR]]

3. Trac compares both time-types to sort them, but fails because type datetime can not be compared with type int.[[BR]]


Here are the patch instructions for doxygentrac.py using the trac function to_datetime:

{{{
...
from trac.util.datefmt import to_timestamp, to_datetime, utc
...
def get_search_results(self, req, keywords, filters):
...
      if os.path.isdir(path):
                index = os.path.join(path, 'search.idx')
                if os.path.exists(index):
>>>>                creation = to_datetime(os.path.getctime(index))     <<<< 
                    for result in  self._search_in_documentation(doc, keywords):
                        result['url'] =  req.href.doxygen(doc) + '/' \
                          
...
 if os.path.exists(index):
>>>>                creation = to_datetime(os.path.getctime(index))  <<<< 
                for result in self._search_in_documentation('', keywords):
             
}}}

",defect,closed,normal,DoxygenPlugin,normal,fixed,doxygen search datetime,,0.11
