backlog 0.35.5 → 0.36.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +19 -0
- data/Gemfile~ +4 -0
- data/History.txt +25 -0
- data/Rakefile +3 -3
- data/app/controllers/{application.rb → application_controller.rb} +1 -2
- data/app/controllers/backlogs_controller.rb +0 -16
- data/app/controllers/search_controller.rb +0 -2
- data/app/controllers/user_controller.rb +7 -7
- data/app/controllers/work_locks_controller.rb +2 -2
- data/app/controllers/works_controller.rb +23 -23
- data/app/helpers/application_helper.rb +9 -6
- data/app/helpers/backlogs_helper.rb +1 -1
- data/app/helpers/periods_helper.rb +1 -1
- data/app/models/backlog.rb +13 -10
- data/app/models/period.rb +0 -5
- data/app/models/sidebar.rb +1 -0
- data/app/models/task.rb +4 -10
- data/app/models/user.rb +5 -6
- data/app/models/user_notify.rb +0 -1
- data/app/models/work.rb +20 -25
- data/app/models/works_report_filter.rb +4 -4
- data/app/views/backlogs/_buttons.rhtml +1 -1
- data/app/views/backlogs/_form.rhtml +5 -9
- data/app/views/layouts/_left_top.rhtml +0 -1
- data/app/views/periods/_form.rhtml +1 -1
- data/app/views/search/results.rhtml +1 -12
- data/app/views/task_notify/{invite_en.rhtml → invite.en.html.erb} +0 -0
- data/app/views/task_notify/{invite_no.rhtml → invite.no.html.erb} +0 -0
- data/app/views/tasks/_task.rhtml +49 -50
- data/app/views/tasks/edit.rhtml +4 -4
- data/app/views/tasks/start_work.rjs +1 -1
- data/app/views/user/_edit.rhtml +1 -1
- data/app/views/user/change_password.rhtml +1 -1
- data/app/views/user/edit.rhtml +4 -4
- data/app/views/user/signup.rhtml +2 -2
- data/app/views/user_notify/{change_password_en.rhtml → change_password.en.html.erb} +0 -0
- data/app/views/user_notify/{change_password_no.rhtml → change_password.no.html.erb} +0 -0
- data/app/views/user_notify/{forgot_password_en.rhtml → forgot_password.en.html.erb} +0 -0
- data/app/views/user_notify/{forgot_password_no.rhtml → forgot_password.no.html.erb} +0 -0
- data/app/views/user_notify/{monitoring_en.rhtml → monitoring.en.html.erb} +0 -0
- data/app/views/user_notify/{monitoring_no.rhtml → monitoring.no.html.erb} +0 -0
- data/app/views/user_notify/{monitoring_invitation_en.rhtml → monitoring_invitation.en.html.erb} +0 -0
- data/app/views/user_notify/{monitoring_invitation_no.rhtml → monitoring_invitation.no.html.erb} +0 -0
- data/app/views/user_notify/{signup_en.rhtml → signup.en.html.erb} +0 -0
- data/app/views/user_notify/{signup_no.rhtml → signup.no.html.erb} +0 -0
- data/app/views/work_lock_notify/{lock_en.rhtml → lock.en.html.erb} +0 -0
- data/app/views/work_lock_notify/{lock_no.rhtml → lock.no.html.erb} +0 -0
- data/app/views/work_lock_notify/{nag_en.rhtml → nag.en.html.erb} +0 -0
- data/app/views/work_lock_notify/{nag_no.rhtml → nag.no.html.erb} +0 -0
- data/app/views/works/_form.rhtml +6 -6
- data/app/views/works/_new_row.rhtml +6 -6
- data/app/views/works/_row.rhtml +2 -2
- data/app/views/works/daily_work_sheet.rhtml +1 -1
- data/app/views/works/list.rhtml +6 -6
- data/app/views/works/list_excel.rhtml +8 -4
- data/app/views/works/timeliste.rhtml +14 -14
- data/app/views/works/update_row.rjs +1 -1
- data/app/views/works/weekly_work_sheet.rhtml +5 -5
- data/app/views/works/weekly_work_sheet_details.rhtml +5 -5
- data/config/boot.rb +108 -27
- data/config/database.yml +3 -26
- data/config/environment.rb +4 -12
- data/config/environments/development.rb +0 -1
- data/config/initializers/jdbc.rb +7 -0
- data/config/initializers/mongrel.rb +83 -0
- data/config/locales/en.yml +189 -0
- data/config/locales/no.yml +192 -0
- data/config/preinitializer.rb +20 -0
- data/cruise_build.sh +10 -0
- data/cruise_config.rb +1 -1
- data/db/migrate/20100720124707_merge_work_account_into_backlog.rb +74 -0
- data/db/schema.rb +93 -127
- data/lib/class_table_inheritance.rb +53 -11
- data/lib/tasks/jdbc.rake +8 -0
- data/lib/user_system.rb +5 -1
- data/public/javascripts/controls.js +76 -79
- data/public/javascripts/dragdrop.js +166 -167
- data/public/javascripts/effects.js +174 -168
- data/public/javascripts/prototype.js +470 -334
- data/public/stylesheets/mwrt002.css +6 -6
- data/script/dbconsole +3 -0
- data/test/fixtures/backlogs.yml +2 -2
- data/test/fixtures/work_lock_subscriptions.yml +2 -2
- data/test/fixtures/works.yml +6 -6
- data/test/functional/absences_controller_test.rb +1 -1
- data/test/functional/backlogs_controller_test.rb +4 -4
- data/test/functional/customers_controller_test.rb +1 -1
- data/test/functional/dashboard_controller_test.rb +1 -1
- data/test/functional/estimates_controller_test.rb +1 -1
- data/test/functional/groups_controller_test.rb +1 -1
- data/test/functional/parties_controller_test.rb +1 -1
- data/test/functional/periods_controller_test.rb +1 -1
- data/test/functional/public_holidays_controller_test.rb +1 -1
- data/test/functional/search_controller_test.rb +1 -1
- data/test/functional/task_files_controller_test.rb +1 -1
- data/test/functional/tasks_controller_test.rb +6 -6
- data/test/functional/user_controller_test.rb +3 -2
- data/test/functional/welcome_controller_test.rb +1 -1
- data/test/functional/work_locks_controller_test.rb +1 -1
- data/test/functional/works_controller_test.rb +11 -11
- data/test/test_helper.rb +2 -2
- data/test/unit/absence_test.rb +1 -1
- data/test/unit/configuration_test.rb +1 -1
- data/test/unit/customer_test.rb +1 -1
- data/test/unit/estimate_test.rb +1 -1
- data/test/unit/group_test.rb +1 -1
- data/test/unit/party_test.rb +1 -1
- data/test/unit/period_test.rb +1 -1
- data/test/unit/public_holiday_test.rb +1 -1
- data/test/unit/task_file_test.rb +1 -1
- data/test/unit/task_test.rb +1 -1
- data/test/unit/user_test.rb +1 -1
- data/test/unit/work_lock_subscription_test.rb +1 -1
- data/test/unit/work_lock_test.rb +1 -1
- data/test/unit/work_test.rb +8 -8
- data/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +3 -3
- data/vendor/plugins/assert_cookie/lib/assert_cookie.rb +2 -2
- data/vendor/plugins/auto_complete/README +23 -0
- data/vendor/plugins/auto_complete/Rakefile +22 -0
- data/vendor/plugins/auto_complete/init.rb +2 -0
- data/vendor/plugins/auto_complete/lib/auto_complete.rb +47 -0
- data/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +143 -0
- data/vendor/plugins/auto_complete/test/auto_complete_test.rb +67 -0
- data/vendor/plugins/backlog_jira/init.rb +4 -0
- data/vendor/plugins/backlog_jira/{tasks → lib/tasks}/backlog_jira_tasks.rake +0 -0
- data/vendor/plugins/has_history/{tasks → lib/tasks}/has_history_tasks.rake +0 -0
- metadata +745 -817
- data/#SearchRequest.xml# +0 -3443
- data/app/controllers/application.rb~ +0 -207
- data/app/controllers/work_accounts_controller.rb +0 -58
- data/app/helpers/work_accounts_helper.rb +0 -2
- data/app/models/work_account.rb +0 -18
- data/app/models/work_lock_subscription.rb +0 -3
- data/app/views/work_accounts/_form.rhtml +0 -16
- data/app/views/work_accounts/_name_list.rhtml +0 -5
- data/app/views/work_accounts/_title.rhtml +0 -5
- data/app/views/work_accounts/edit.rhtml +0 -12
- data/app/views/work_accounts/list.rhtml +0 -31
- data/app/views/work_accounts/new.rhtml +0 -10
- data/app/views/work_accounts/show.rhtml +0 -50
- data/config/environments/localization_environment.rb +0 -10
- data/jira.log +0 -98246
- data/lang/en.yaml +0 -147
- data/lang/localizations.yaml +0 -2
- data/lang/no.yaml +0 -146
- data/lib/localization.rb +0 -88
- data/test/fixtures/work_accounts.yml +0 -7
- data/test/functional/work_accounts_controller_test.rb +0 -94
- data/test/unit/localization_test.rb +0 -47
- data/test/unit/work_account_test.rb +0 -10
@@ -0,0 +1,192 @@
|
|
1
|
+
"no":
|
2
|
+
number:
|
3
|
+
# Used in number_with_delimiter()
|
4
|
+
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
|
5
|
+
format:
|
6
|
+
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
|
7
|
+
separator: ","
|
8
|
+
# Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three)
|
9
|
+
delimiter: "."
|
10
|
+
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
|
11
|
+
precision: 3
|
12
|
+
|
13
|
+
# Used in number_to_currency()
|
14
|
+
currency:
|
15
|
+
format:
|
16
|
+
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
|
17
|
+
format: "%n %u"
|
18
|
+
unit: "NOK"
|
19
|
+
# These three are to override number.format and are optional
|
20
|
+
separator: ","
|
21
|
+
delimiter: "."
|
22
|
+
precision: 2
|
23
|
+
|
24
|
+
# Used in number_to_percentage()
|
25
|
+
percentage:
|
26
|
+
format:
|
27
|
+
# These three are to override number.format and are optional
|
28
|
+
# separator:
|
29
|
+
delimiter: ""
|
30
|
+
# precision:
|
31
|
+
|
32
|
+
# Used in number_to_precision()
|
33
|
+
precision:
|
34
|
+
format:
|
35
|
+
# These three are to override number.format and are optional
|
36
|
+
# separator:
|
37
|
+
delimiter: ""
|
38
|
+
# precision:
|
39
|
+
|
40
|
+
# date:
|
41
|
+
# formats:
|
42
|
+
# default: "%Y-%m-%d"
|
43
|
+
# short: "%b %d"
|
44
|
+
# long: "%B %d, %Y"
|
45
|
+
|
46
|
+
abort: Avbryt
|
47
|
+
aborted: Avbrutt
|
48
|
+
absent: Fravær
|
49
|
+
account: Konto
|
50
|
+
active: Aktiv
|
51
|
+
administration: Administrasjon
|
52
|
+
all: All
|
53
|
+
all_accounts: alle konti
|
54
|
+
assigned_to: Tilordnet
|
55
|
+
back: Tilbake
|
56
|
+
backlog: Oppgaveliste
|
57
|
+
backlog_description: Oppgaveliste med sortering og statussporing
|
58
|
+
backlogs: Oppgavelister
|
59
|
+
burn_down_chart: Fremdriftsgraf
|
60
|
+
cannot_find_user: Kan ikke finne bruker %s
|
61
|
+
change_password: Bytt Passord
|
62
|
+
complete: Fullfør
|
63
|
+
completed: Fullført
|
64
|
+
completed_at: Stop tid
|
65
|
+
completed_tasks: Fullførte Oppgaver
|
66
|
+
confirmation: Er du sikker?
|
67
|
+
created_by: Opprettet av
|
68
|
+
customer: Kunde
|
69
|
+
daily_work_sheet: Timeføringsskjema
|
70
|
+
dashboard: Dashboard
|
71
|
+
delete: Slett
|
72
|
+
description: Beskrivelse
|
73
|
+
details: Detaljer
|
74
|
+
done: Utført
|
75
|
+
down: Ned
|
76
|
+
edit: Rediger
|
77
|
+
edit_task: Rediger oppgave
|
78
|
+
editing: Redigerer
|
79
|
+
empty_work_record: Tom arbeidslinje
|
80
|
+
enable_customer: Tillat kunder
|
81
|
+
enable_invoicing: Tillat fakturering
|
82
|
+
enable_periods: Tillat sprinter
|
83
|
+
enable_subtasks: Tillat underoppgaver
|
84
|
+
enable_users: Tillat brukere
|
85
|
+
end_on: Avslutt på
|
86
|
+
end_work: Stopp
|
87
|
+
estimate: Estimat
|
88
|
+
experimental: Eksperimentell!
|
89
|
+
files: Files
|
90
|
+
friday: Fredag
|
91
|
+
grab_task: Grip oppgave
|
92
|
+
grabbed_by_you: Tatt av deg
|
93
|
+
group: Gruppe
|
94
|
+
groups: Grupper
|
95
|
+
holiday: Ferie
|
96
|
+
holidays_used: Brukte feriedager
|
97
|
+
home: Hjem
|
98
|
+
hours: Timer
|
99
|
+
hours_last_month: Timer forrige måned
|
100
|
+
hours_last_week: Timer forrige uke
|
101
|
+
hours_this_month: Timer denne måned
|
102
|
+
hours_this_week: Timer denne uke
|
103
|
+
hours_today: Timer i dag
|
104
|
+
invite: Invitèr
|
105
|
+
invoice: Fakturerbart
|
106
|
+
invoice_code: Faktureringskode
|
107
|
+
invoice_short: Fakt
|
108
|
+
left: Venstre
|
109
|
+
listing_works: Registrert arbeid
|
110
|
+
lock: Lås
|
111
|
+
log_in: Log inn
|
112
|
+
log_out: Log ut
|
113
|
+
main_backlog: Hovedliste
|
114
|
+
members: Medlemmer
|
115
|
+
monday: Mandag
|
116
|
+
move_to_bottom: Flytt oppgaven til slutten av listen
|
117
|
+
move_to_next_period: Flytt oppgaven til neste periode
|
118
|
+
move_to_top: Flytt oppgaven til toppen av listen
|
119
|
+
moved: Flyttet
|
120
|
+
name: Navn
|
121
|
+
new_backlog: Start ny oppgaveliste
|
122
|
+
new_customer: Legg til ny kunde
|
123
|
+
new_group: Start ny gruppe
|
124
|
+
new_period: Start ny periode
|
125
|
+
new_task: Legg til ny oppgave
|
126
|
+
new_work: Registrer arbeid
|
127
|
+
new_work_account: Legg til timeføringskonto
|
128
|
+
next: Neste
|
129
|
+
no: Nei
|
130
|
+
no_backlog: Uten oppgaveliste
|
131
|
+
no_pending_tasks: Det er ingen ventende oppgaver i denne perioden.
|
132
|
+
no_pending_tasks_in_backlog: Det er ingen ventende oppgaver i denne oppgavelisten.
|
133
|
+
not_grabbed: Ikke tatt av noen
|
134
|
+
notes: Notater
|
135
|
+
ownership: Eierskap
|
136
|
+
paging: Del opp i flere sider
|
137
|
+
password: Passord
|
138
|
+
period: Periode
|
139
|
+
periods: Perioder
|
140
|
+
please_login: Vennligst logg på
|
141
|
+
position: Posisjon
|
142
|
+
postponed: Utsatt
|
143
|
+
previous: Forrige
|
144
|
+
previous_abr: Forrige
|
145
|
+
projection: Projeksjon
|
146
|
+
public_holiday: Offentlig fridag
|
147
|
+
release_task: Slipp oppgave
|
148
|
+
reopen: Gjenåpne
|
149
|
+
resolution: Avslutningsmåte
|
150
|
+
resolution_abr: Avsl.
|
151
|
+
right: Høyre
|
152
|
+
saturday: Lørdag
|
153
|
+
save: Lagre
|
154
|
+
search: Søk
|
155
|
+
search_results_for: "Søkeresultater for '{{query}}'"
|
156
|
+
select: Velg
|
157
|
+
shortcuts: Knapper
|
158
|
+
sick_days_used: Sykedager
|
159
|
+
signup: Innmelding
|
160
|
+
specify: Spesifisèr
|
161
|
+
spreadsheet: Regneark
|
162
|
+
start: Start
|
163
|
+
start_on: Start på
|
164
|
+
start_work: Start arbeid
|
165
|
+
started_at: Start tid
|
166
|
+
stop: Stopp
|
167
|
+
work_lock_subscriptions: Abonenter på timelister
|
168
|
+
sunday: Søndag
|
169
|
+
task: Oppgave
|
170
|
+
tasks: Oppgaver
|
171
|
+
thursday: Torsdag
|
172
|
+
todo: Igjen
|
173
|
+
total: Totalt
|
174
|
+
totals: Totalt
|
175
|
+
track_todo: Estimater
|
176
|
+
track_done: Spor utført arbeid
|
177
|
+
track_times: Spor start- og stopptider
|
178
|
+
tuesday: Tirsdag
|
179
|
+
unlock: Lås opp
|
180
|
+
unplanned_tasks: Ikke planlagte oppgaver
|
181
|
+
up: Opp
|
182
|
+
updated_by: Oppdatert av
|
183
|
+
user: Bruker
|
184
|
+
view_fullscreen: Vis fullskjerm
|
185
|
+
wednesday: Onsdag
|
186
|
+
week: Uke
|
187
|
+
weekly_work_sheet: Timeoversikt for uke
|
188
|
+
welcome_link: Få ting gjort.
|
189
|
+
work: Arbeid
|
190
|
+
work_account: Timeføringskonto
|
191
|
+
work_accounts: Timeføringskonti
|
192
|
+
yes: Ja
|
@@ -0,0 +1,20 @@
|
|
1
|
+
begin
|
2
|
+
require "rubygems"
|
3
|
+
require "bundler"
|
4
|
+
rescue LoadError
|
5
|
+
raise "Could not load the bundler gem. Install it with `gem install bundler`."
|
6
|
+
end
|
7
|
+
|
8
|
+
if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24")
|
9
|
+
raise RuntimeError, "Your bundler version is too old for Rails 2.3." +
|
10
|
+
"Run `gem install bundler` to upgrade."
|
11
|
+
end
|
12
|
+
|
13
|
+
begin
|
14
|
+
# Set up load paths for all bundled gems
|
15
|
+
ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
|
16
|
+
Bundler.setup
|
17
|
+
rescue Bundler::GemNotFound
|
18
|
+
raise RuntimeError, "Bundler couldn't find some gems." +
|
19
|
+
"Did you run `bundle install`?"
|
20
|
+
end
|
data/cruise_build.sh
ADDED
data/cruise_config.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Project.configure do |project|
|
2
2
|
project.email_notifier.emails = ['arndt@datek.no', 'espen@datek.no', 'uwe@datek.no']
|
3
3
|
project.scheduler.polling_interval = 5.minutes
|
4
|
-
project.build_command = '
|
4
|
+
project.build_command = './cruise_build.sh'
|
5
5
|
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
class MergeWorkAccountIntoBacklog < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :backlogs, :track_times, :boolean
|
4
|
+
add_column :works, :backlog_id, :integer
|
5
|
+
add_column :work_lock_subscriptions, :backlog_id, :integer
|
6
|
+
|
7
|
+
load_classes
|
8
|
+
|
9
|
+
work_account_to_backlog_map = {}
|
10
|
+
backlog_to_work_acountmap = {}
|
11
|
+
|
12
|
+
work_accounts = WorkAccount.all(:include => :backlogs)
|
13
|
+
work_accounts.each{|wa| raise "Data errror" unless wa.backlogs.size == 1}
|
14
|
+
|
15
|
+
backlogs = Backlog.all(:include => :work_account)
|
16
|
+
faulty_backlogs = backlogs.select{|bl| bl.work_account.nil?}
|
17
|
+
raise "Work account missing for: #{faulty_backlogs.map{|bl| bl.name}.join(', ')}" if faulty_backlogs.size > 0
|
18
|
+
backlogs.each{|bl| work_account_to_backlog_map[bl.work_account_id] = bl ; backlog_to_work_acountmap[bl.id] = bl.work_account}
|
19
|
+
|
20
|
+
backlogs.each{|bl| bl.update_attributes! :track_times => backlog_to_work_acountmap[bl.id].track_times || false}
|
21
|
+
change_column_null :backlogs, :track_times, false
|
22
|
+
|
23
|
+
Work.all.each{|w| w.update_attributes! :backlog_id => work_account_to_backlog_map[w.work_account.id].id || raise("Missing backlog for work account #{w.id} #{w.work_account.name} #{w.work_account.id}")}
|
24
|
+
change_column_null :works, :backlog_id, false
|
25
|
+
|
26
|
+
work_accounts.each{|wa| execute "UPDATE work_lock_subscriptions SET backlog_id = #{work_account_to_backlog_map[wa.id].id} WHERE work_account_id = #{wa.id}"}
|
27
|
+
change_column_null :work_lock_subscriptions, :backlog_id, false
|
28
|
+
|
29
|
+
remove_column :backlogs, :work_account_id
|
30
|
+
remove_column :tasks, :work_account_id
|
31
|
+
remove_column :works, :work_account_id
|
32
|
+
remove_column :work_lock_subscriptions, :work_account_id
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.down
|
36
|
+
raise "Not implemented, yet."
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.load_classes
|
40
|
+
class_eval <<-EOF
|
41
|
+
class WorkAccount < ActiveRecord::Base
|
42
|
+
has_many :backlogs
|
43
|
+
end
|
44
|
+
|
45
|
+
class Backlog < ActiveRecord::Base
|
46
|
+
belongs_to :work_account
|
47
|
+
end
|
48
|
+
|
49
|
+
class Work < ActiveRecord::Base
|
50
|
+
belongs_to :task
|
51
|
+
belongs_to :work_account
|
52
|
+
|
53
|
+
alias_method :old_work_account, :work_account
|
54
|
+
def work_account
|
55
|
+
self.old_work_account || (task && task.work_account)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# class WorkLockSubscription < ActiveRecord::Base ; end
|
60
|
+
|
61
|
+
class Task < ActiveRecord::Base
|
62
|
+
belongs_to :backlog
|
63
|
+
belongs_to :work_account
|
64
|
+
acts_as_tree :order => 'position'
|
65
|
+
|
66
|
+
alias_method :old_work_account, :work_account
|
67
|
+
def work_account
|
68
|
+
self.old_work_account || (parent ? parent.work_account : backlog.work_account)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
EOF
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
data/db/schema.rb
CHANGED
@@ -1,196 +1,162 @@
|
|
1
|
-
# This file is
|
2
|
-
# migrations feature of
|
1
|
+
# This file is auto-generated from the current state of the database. Instead of editing this file,
|
2
|
+
# please use the migrations feature of Active Record to incrementally modify your database, and
|
3
3
|
# then regenerate this schema definition.
|
4
|
+
#
|
5
|
+
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
|
6
|
+
# to create the application database on another system, you should be using db:schema:load, not running
|
7
|
+
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
8
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
9
|
+
#
|
10
|
+
# It's strongly recommended to check this file into your version control system.
|
4
11
|
|
5
|
-
ActiveRecord::Schema.define(:version =>
|
12
|
+
ActiveRecord::Schema.define(:version => 20100720124707) do
|
6
13
|
|
7
14
|
create_table "absences", :force => true do |t|
|
8
|
-
t.
|
9
|
-
t.
|
10
|
-
t.
|
15
|
+
t.integer "user_id", :null => false
|
16
|
+
t.date "on", :null => false
|
17
|
+
t.string "reason", :null => false
|
11
18
|
end
|
12
19
|
|
13
20
|
create_table "backlogs", :force => true do |t|
|
14
|
-
t.
|
15
|
-
t.
|
16
|
-
t.
|
17
|
-
t.
|
18
|
-
t.
|
19
|
-
t.
|
20
|
-
t.
|
21
|
-
t.
|
21
|
+
t.string "name", :limit => 64, :null => false
|
22
|
+
t.boolean "track_todo"
|
23
|
+
t.boolean "enable_subtasks", :default => false, :null => false
|
24
|
+
t.boolean "enable_customer"
|
25
|
+
t.boolean "enable_users"
|
26
|
+
t.integer "customer_id"
|
27
|
+
t.boolean "enable_periods"
|
28
|
+
t.boolean "track_times", :null => false
|
22
29
|
end
|
23
30
|
|
24
31
|
create_table "configurations", :force => true do |t|
|
25
|
-
t.
|
32
|
+
t.boolean "time_keeper"
|
26
33
|
end
|
27
34
|
|
28
35
|
create_table "customers", :force => true do |t|
|
29
|
-
t.
|
36
|
+
t.string "name", :limit => 64, :null => false
|
30
37
|
end
|
31
38
|
|
32
39
|
create_table "estimates", :force => true do |t|
|
33
|
-
t.
|
34
|
-
t.
|
35
|
-
t.
|
36
|
-
t.
|
40
|
+
t.integer "task_id", :null => false
|
41
|
+
t.decimal "todo", :precision => 6, :scale => 2, :default => 1.0, :null => false
|
42
|
+
t.datetime "created_at", :null => false
|
43
|
+
t.integer "user_id"
|
37
44
|
end
|
38
45
|
|
39
46
|
add_index "estimates", ["task_id", "created_at"], :name => "index_estimates_on_task_id_and_created_at"
|
40
47
|
|
41
48
|
create_table "groups", :primary_key => "party_id", :force => true do |t|
|
42
|
-
t.
|
49
|
+
t.string "name", :null => false
|
43
50
|
end
|
44
51
|
|
45
52
|
create_table "groups_users", :id => false, :force => true do |t|
|
46
|
-
t.
|
47
|
-
t.
|
53
|
+
t.integer "group_id", :null => false
|
54
|
+
t.integer "user_id", :null => false
|
48
55
|
end
|
49
56
|
|
50
57
|
add_index "groups_users", ["group_id", "user_id"], :name => "index_groups_users_on_group_id_and_user_id", :unique => true
|
51
58
|
|
52
59
|
create_table "parties", :force => true do |t|
|
53
|
-
t.
|
60
|
+
t.string "type"
|
54
61
|
end
|
55
62
|
|
56
63
|
create_table "periods", :force => true do |t|
|
57
|
-
t.
|
58
|
-
t.
|
59
|
-
t.
|
60
|
-
t.
|
64
|
+
t.integer "position", :null => false
|
65
|
+
t.date "start_on", :null => false
|
66
|
+
t.date "end_on", :null => false
|
67
|
+
t.integer "party_id"
|
61
68
|
end
|
62
69
|
|
63
70
|
create_table "public_holidays", :force => true do |t|
|
64
|
-
t.
|
71
|
+
t.date "on", :null => false
|
72
|
+
end
|
73
|
+
|
74
|
+
create_table "schema_info", :id => false, :force => true do |t|
|
75
|
+
t.integer "version"
|
65
76
|
end
|
66
77
|
|
67
78
|
create_table "task_files", :force => true do |t|
|
68
|
-
t.
|
69
|
-
t.
|
70
|
-
t.
|
71
|
-
t.
|
79
|
+
t.integer "task_id", :null => false
|
80
|
+
t.string "name", :limit => 64, :null => false
|
81
|
+
t.string "content_type", :null => false
|
82
|
+
t.binary "content_data", :null => false
|
72
83
|
end
|
73
84
|
|
74
85
|
create_table "tasks", :force => true do |t|
|
75
|
-
t.
|
76
|
-
t.
|
77
|
-
t.
|
78
|
-
t.
|
79
|
-
t.
|
80
|
-
t.
|
81
|
-
t.
|
82
|
-
t.
|
83
|
-
t.
|
84
|
-
t.
|
85
|
-
t.
|
86
|
-
t.
|
87
|
-
t.
|
88
|
-
t.
|
89
|
-
t.
|
90
|
-
t.column "updated_at", :datetime
|
86
|
+
t.integer "position"
|
87
|
+
t.string "description", :limit => 80, :null => false
|
88
|
+
t.datetime "finished_at"
|
89
|
+
t.integer "initial_estimate", :default => 1, :null => false
|
90
|
+
t.integer "period_id"
|
91
|
+
t.datetime "created_at"
|
92
|
+
t.integer "parent_id"
|
93
|
+
t.string "resolution", :limit => 16
|
94
|
+
t.integer "previous_task_id"
|
95
|
+
t.integer "backlog_id"
|
96
|
+
t.text "notes"
|
97
|
+
t.integer "customer_id"
|
98
|
+
t.integer "created_by"
|
99
|
+
t.integer "updated_by"
|
100
|
+
t.datetime "updated_at"
|
91
101
|
end
|
92
102
|
|
93
103
|
add_index "tasks", ["parent_id"], :name => "index_tasks_on_parent_id"
|
94
104
|
|
95
105
|
create_table "tasks_users", :id => false, :force => true do |t|
|
96
|
-
t.
|
97
|
-
t.
|
106
|
+
t.integer "task_id", :null => false
|
107
|
+
t.integer "user_id", :null => false
|
98
108
|
end
|
99
109
|
|
100
110
|
create_table "user_work_lock_subscriptions", :id => false, :force => true do |t|
|
101
|
-
t.
|
102
|
-
t.
|
111
|
+
t.integer "subscriber_user_id", :null => false
|
112
|
+
t.integer "user_id", :null => false
|
103
113
|
end
|
104
114
|
|
105
115
|
create_table "users", :primary_key => "party_id", :force => true do |t|
|
106
|
-
t.
|
107
|
-
t.
|
108
|
-
t.
|
109
|
-
t.
|
110
|
-
t.
|
111
|
-
t.
|
112
|
-
t.
|
113
|
-
t.
|
114
|
-
t.
|
115
|
-
t.
|
116
|
-
t.
|
116
|
+
t.string "login", :limit => 80, :null => false
|
117
|
+
t.string "salted_password", :limit => 40, :null => false
|
118
|
+
t.string "email", :limit => 60, :null => false
|
119
|
+
t.string "first_name", :limit => 40
|
120
|
+
t.string "last_name", :limit => 40
|
121
|
+
t.string "salt", :limit => 40, :null => false
|
122
|
+
t.boolean "verified", :default => false
|
123
|
+
t.string "role", :limit => 40
|
124
|
+
t.string "security_token", :limit => 40
|
125
|
+
t.datetime "token_expiry"
|
126
|
+
t.boolean "deleted", :default => false
|
117
127
|
end
|
118
128
|
|
119
129
|
create_table "work_accounts", :force => true do |t|
|
120
|
-
t.
|
121
|
-
t.
|
122
|
-
t.
|
130
|
+
t.string "name", :limit => 64, :null => false
|
131
|
+
t.boolean "track_times"
|
132
|
+
t.string "invoice_code"
|
123
133
|
end
|
124
134
|
|
125
135
|
create_table "work_lock_subscriptions", :id => false, :force => true do |t|
|
126
|
-
t.
|
127
|
-
t.
|
136
|
+
t.integer "subscriber_user_id", :null => false
|
137
|
+
t.integer "backlog_id", :null => false
|
128
138
|
end
|
129
139
|
|
130
140
|
create_table "work_locks", :force => true do |t|
|
131
|
-
t.
|
132
|
-
t.
|
133
|
-
t.
|
141
|
+
t.integer "user_id", :null => false
|
142
|
+
t.date "start_on", :null => false
|
143
|
+
t.date "end_on", :null => false
|
134
144
|
end
|
135
145
|
|
136
146
|
create_table "works", :force => true do |t|
|
137
|
-
t.
|
138
|
-
t.
|
139
|
-
t.
|
140
|
-
t.
|
141
|
-
t.
|
142
|
-
t.
|
143
|
-
t.
|
144
|
-
t.
|
145
|
-
t.
|
146
|
-
t.
|
147
|
-
t.
|
147
|
+
t.integer "task_id"
|
148
|
+
t.decimal "hours", :precision => 6, :scale => 3, :default => 0.0, :null => false
|
149
|
+
t.datetime "completed_at"
|
150
|
+
t.integer "user_id"
|
151
|
+
t.boolean "invoice"
|
152
|
+
t.integer "customer_id"
|
153
|
+
t.string "description"
|
154
|
+
t.date "started_on", :null => false
|
155
|
+
t.time "start_time"
|
156
|
+
t.text "notes"
|
157
|
+
t.integer "backlog_id", :null => false
|
148
158
|
end
|
149
159
|
|
150
160
|
add_index "works", ["task_id", "completed_at"], :name => "index_works_on_task_id_and_completed_at"
|
151
161
|
|
152
|
-
add_foreign_key "absences", ["user_id"], "users", ["party_id"], :name => "absences_user_id_fkey"
|
153
|
-
|
154
|
-
add_foreign_key "backlogs", ["work_account_id"], "work_accounts", ["id"], :name => "backlogs_work_account_id_fkey"
|
155
|
-
add_foreign_key "backlogs", ["customer_id"], "customers", ["id"], :name => "backlogs_customer_id_fkey"
|
156
|
-
|
157
|
-
add_foreign_key "estimates", ["task_id"], "tasks", ["id"], :name => "estimates_task_id_fkey"
|
158
|
-
add_foreign_key "estimates", ["user_id"], "users", ["party_id"], :name => "estimates_user_id_fkey"
|
159
|
-
|
160
|
-
add_foreign_key "groups", ["party_id"], "parties", ["id"], :name => "groups_party_id_fkey"
|
161
|
-
|
162
|
-
add_foreign_key "groups_users", ["group_id"], "groups", ["party_id"], :name => "groups_users_group_id_fkey"
|
163
|
-
add_foreign_key "groups_users", ["user_id"], "users", ["party_id"], :name => "groups_users_user_id_fkey"
|
164
|
-
|
165
|
-
add_foreign_key "periods", ["party_id"], "parties", ["id"], :name => "periods_party_id_fkey"
|
166
|
-
|
167
|
-
add_foreign_key "task_files", ["task_id"], "tasks", ["id"], :name => "task_files_task_id_fkey"
|
168
|
-
|
169
|
-
add_foreign_key "tasks", ["period_id"], "periods", ["id"], :name => "tasks_period_id_fkey"
|
170
|
-
add_foreign_key "tasks", ["parent_id"], "tasks", ["id"], :name => "tasks_parent_id_fkey"
|
171
|
-
add_foreign_key "tasks", ["previous_task_id"], "tasks", ["id"], :name => "tasks_previous_task_id_fkey"
|
172
|
-
add_foreign_key "tasks", ["backlog_id"], "backlogs", ["id"], :name => "tasks_backlog_id_fkey"
|
173
|
-
add_foreign_key "tasks", ["work_account_id"], "work_accounts", ["id"], :name => "tasks_work_account_id_fkey"
|
174
|
-
add_foreign_key "tasks", ["customer_id"], "customers", ["id"], :name => "tasks_customer_id_fkey"
|
175
|
-
add_foreign_key "tasks", ["created_by"], "users", ["party_id"], :name => "tasks_created_by_fkey"
|
176
|
-
add_foreign_key "tasks", ["updated_by"], "users", ["party_id"], :name => "tasks_updated_by_fkey"
|
177
|
-
|
178
|
-
add_foreign_key "tasks_users", ["task_id"], "tasks", ["id"], :name => "tasks_users_task_id_fkey"
|
179
|
-
add_foreign_key "tasks_users", ["user_id"], "users", ["party_id"], :name => "tasks_users_user_id_fkey"
|
180
|
-
|
181
|
-
add_foreign_key "user_work_lock_subscriptions", ["subscriber_user_id"], "users", ["party_id"], :name => "user_work_lock_subscriptions_subscriber_user_id_fkey"
|
182
|
-
add_foreign_key "user_work_lock_subscriptions", ["user_id"], "users", ["party_id"], :name => "user_work_lock_subscriptions_user_id_fkey"
|
183
|
-
|
184
|
-
add_foreign_key "users", ["party_id"], "parties", ["id"], :name => "users_party_id_fkey"
|
185
|
-
|
186
|
-
add_foreign_key "work_lock_subscriptions", ["subscriber_user_id"], "users", ["party_id"], :name => "work_lock_subscriptions_subscriber_user_id_fkey"
|
187
|
-
add_foreign_key "work_lock_subscriptions", ["work_account_id"], "work_accounts", ["id"], :name => "work_lock_subscriptions_work_account_id_fkey"
|
188
|
-
|
189
|
-
add_foreign_key "work_locks", ["user_id"], "users", ["party_id"], :name => "work_locks_user_id_fkey"
|
190
|
-
|
191
|
-
add_foreign_key "works", ["task_id"], "tasks", ["id"], :name => "works_task_id_fkey"
|
192
|
-
add_foreign_key "works", ["user_id"], "users", ["party_id"], :name => "works_user_id_fkey"
|
193
|
-
add_foreign_key "works", ["customer_id"], "customers", ["id"], :name => "works_customer_id_fkey"
|
194
|
-
add_foreign_key "works", ["work_account_id"], "work_accounts", ["id"], :name => "works_work_account_id_fkey"
|
195
|
-
|
196
162
|
end
|