Patch #6177 ยป migrate_from_trac.rake.diff
| migrate_from_trac.rake 2010-08-19 16:35:45.000000000 +0200 | ||
|---|---|---|
|
# If this attribute is set a milestone has a defined target timepoint
|
||
|
def due
|
||
|
if read_attribute(:due) && read_attribute(:due) > 0
|
||
|
Time.at(read_attribute(:due)).to_date
|
||
|
Time.at(read_attribute(:due) / 1000000).to_date
|
||
|
else
|
||
|
nil
|
||
|
end
|
||
| ... | ... | |
|
# This is the real timepoint at which the milestone has finished.
|
||
|
def completed
|
||
|
if read_attribute(:completed) && read_attribute(:completed) > 0
|
||
|
Time.at(read_attribute(:completed)).to_date
|
||
|
Time.at(read_attribute(:completed) / 1000000).to_date
|
||
|
else
|
||
|
nil
|
||
|
end
|
||
| ... | ... | |
|
set_table_name :attachment
|
||
|
set_inheritance_column :none
|
||
|
def time; Time.at(read_attribute(:time)) end
|
||
|
def time; Time.at(read_attribute(:time) / 1000000) end
|
||
|
def original_filename
|
||
|
filename
|
||
| ... | ... | |
|
read_attribute(:description).blank? ? summary : read_attribute(:description)
|
||
|
end
|
||
|
def time; Time.at(read_attribute(:time)) end
|
||
|
def changetime; Time.at(read_attribute(:changetime)) end
|
||
|
def time; Time.at(read_attribute(:time) / 1000000) end
|
||
|
def changetime; Time.at(read_attribute(:changetime) / 1000000) end
|
||
|
end
|
||
|
class TracTicketChange < ActiveRecord::Base
|
||
|
set_table_name :ticket_change
|
||
|
def time; Time.at(read_attribute(:time)) end
|
||
|
def time; Time.at(read_attribute(:time) / 1000000) end
|
||
|
end
|
||
|
TRAC_WIKI_PAGES = %w(InterMapTxt InterTrac InterWiki RecentChanges SandBox TracAccessibility TracAdmin TracBackup TracBrowser TracCgi TracChangeset \
|
||
| ... | ... | |
|
super.select {|column| column.name.to_s != 'readonly'}
|
||
|
end
|
||
|
def time; Time.at(read_attribute(:time)) end
|
||
|
def time; Time.at(read_attribute(:time) / 1000000) end
|
||
|
end
|
||
|
class TracPermission < ActiveRecord::Base
|
||