backlog 0.7.12 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +9 -0
- data/Rakefile +2 -2
- data/app/controllers/estimates_controller.rb +20 -3
- data/app/controllers/task_files_controller.rb +19 -0
- data/app/controllers/tasks_controller.rb +7 -2
- data/app/helpers/task_files_helper.rb +2 -0
- data/app/models/task.rb +3 -3
- data/app/models/task_file.rb +7 -0
- data/app/views/layouts/_left_top.rhtml +12 -2
- data/app/views/tasks/_form.rhtml +16 -1
- data/app/views/tasks/edit.rhtml +1 -1
- data/db/migrate/020_create_task_files.rb +17 -0
- data/db/schema.rb +11 -21
- data/doc/classes/ActiveRecord/Base.html +40 -40
- data/doc/classes/ActiveRecord/Base.src/M000432.html +13 -56
- data/doc/classes/ActiveRecord/Base.src/M000433.html +14 -3
- data/doc/classes/ActiveRecord/Base.src/{M000428.html → M000434.html} +0 -0
- data/doc/classes/ActiveRecord/Base.src/{M000429.html → M000435.html} +0 -0
- data/doc/classes/ActiveRecord/Base.src/{M000426.html → M000436.html} +0 -0
- data/doc/classes/ActiveRecord/Base.src/{M000427.html → M000437.html} +0 -0
- data/doc/classes/ActiveRecord/Base.src/M000438.html +72 -0
- data/doc/classes/ActiveRecord/Base.src/M000439.html +16 -0
- data/doc/classes/ApplicationController.html +18 -18
- data/doc/classes/ApplicationController.src/{M000318.html → M000322.html} +0 -0
- data/doc/classes/ApplicationController.src/{M000319.html → M000323.html} +0 -0
- data/doc/classes/ApplicationHelper.html +91 -91
- data/doc/classes/ApplicationHelper.src/M000440.html +7 -4
- data/doc/classes/ApplicationHelper.src/M000441.html +4 -8
- data/doc/classes/ApplicationHelper.src/M000442.html +11 -15
- data/doc/classes/ApplicationHelper.src/M000443.html +6 -7
- data/doc/classes/ApplicationHelper.src/M000444.html +6 -4
- data/doc/classes/ApplicationHelper.src/M000445.html +7 -11
- data/doc/classes/ApplicationHelper.src/M000446.html +4 -6
- data/doc/classes/ApplicationHelper.src/M000447.html +8 -6
- data/doc/classes/ApplicationHelper.src/M000448.html +15 -7
- data/doc/classes/ApplicationHelper.src/M000449.html +7 -4
- data/doc/classes/ApplicationHelper.src/M000450.html +4 -8
- data/doc/classes/ApplicationHelper.src/M000451.html +11 -15
- data/doc/classes/ApplicationHelper.src/{M000437.html → M000452.html} +0 -0
- data/doc/classes/ApplicationHelper.src/{M000438.html → M000453.html} +0 -0
- data/doc/classes/ApplicationHelper.src/{M000439.html → M000454.html} +0 -0
- data/doc/classes/ApplicationHelper.src/M000455.html +18 -0
- data/doc/classes/ApplicationHelper.src/M000456.html +22 -0
- data/doc/classes/ApplicationHelper.src/M000457.html +30 -0
- data/doc/classes/Backlog.html +1 -1
- data/doc/classes/BacklogsHelper.html +1 -1
- data/doc/classes/BigDecimal.html +10 -10
- data/doc/classes/BigDecimal.src/{M000364.html → M000366.html} +0 -0
- data/doc/classes/BigDecimal.src/{M000365.html → M000367.html} +0 -0
- data/doc/classes/Chart.html +1 -1
- data/doc/classes/Clock.html +30 -30
- data/doc/classes/Clock.src/{M000394.html → M000400.html} +0 -0
- data/doc/classes/Clock.src/{M000395.html → M000401.html} +0 -0
- data/doc/classes/Clock.src/{M000396.html → M000402.html} +0 -0
- data/doc/classes/Clock.src/{M000397.html → M000403.html} +0 -0
- data/doc/classes/Clock.src/{M000398.html → M000404.html} +0 -0
- data/doc/classes/Clock.src/{M000399.html → M000405.html} +0 -0
- data/doc/classes/Estimate.html +11 -11
- data/doc/classes/Estimate.src/{M000400.html → M000406.html} +0 -0
- data/doc/classes/Estimate.src/{M000401.html → M000407.html} +0 -0
- data/doc/classes/EstimatesController.html +10 -10
- data/doc/classes/EstimatesController.src/M000398.html +39 -0
- data/doc/classes/EstimatesController.src/M000399.html +39 -0
- data/doc/classes/EstimatesHelper.html +1 -1
- data/doc/classes/Group.html +1 -1
- data/doc/classes/GroupsController.html +80 -80
- data/doc/classes/GroupsController.src/M000324.html +5 -4
- data/doc/classes/GroupsController.src/M000325.html +4 -10
- data/doc/classes/GroupsController.src/M000326.html +4 -7
- data/doc/classes/GroupsController.src/M000327.html +8 -8
- data/doc/classes/GroupsController.src/M000328.html +7 -5
- data/doc/classes/GroupsController.src/M000329.html +7 -9
- data/doc/classes/GroupsController.src/M000330.html +5 -5
- data/doc/classes/GroupsController.src/M000331.html +12 -4
- data/doc/classes/GroupsController.src/M000332.html +5 -4
- data/doc/classes/GroupsController.src/M000333.html +4 -10
- data/doc/classes/GroupsController.src/M000334.html +4 -7
- data/doc/classes/GroupsController.src/M000335.html +8 -8
- data/doc/classes/GroupsController.src/M000336.html +7 -5
- data/doc/classes/GroupsController.src/M000337.html +7 -9
- data/doc/classes/GroupsController.src/{M000323.html → M000338.html} +5 -4
- data/doc/classes/GroupsController.src/M000339.html +26 -0
- data/doc/classes/GroupsHelper.html +1 -1
- data/doc/classes/Localization.html +30 -30
- data/doc/classes/Localization.src/{M000414.html → M000420.html} +0 -0
- data/doc/classes/Localization.src/{M000415.html → M000421.html} +0 -0
- data/doc/classes/Localization.src/{M000416.html → M000422.html} +0 -0
- data/doc/classes/Localization.src/{M000417.html → M000423.html} +0 -0
- data/doc/classes/Localization.src/{M000418.html → M000424.html} +0 -0
- data/doc/classes/Localization.src/{M000419.html → M000425.html} +0 -0
- data/doc/classes/Localization/LString.html +20 -20
- data/doc/classes/Localization/LString.src/{M000420.html → M000426.html} +0 -0
- data/doc/classes/Localization/LString.src/{M000421.html → M000427.html} +0 -0
- data/doc/classes/Localization/LString.src/{M000422.html → M000428.html} +0 -0
- data/doc/classes/Localization/LString.src/{M000423.html → M000429.html} +0 -0
- data/doc/classes/PartiesHelper.html +1 -1
- data/doc/classes/Party.html +41 -41
- data/doc/classes/Party.src/M000340.html +4 -4
- data/doc/classes/Party.src/M000341.html +4 -11
- data/doc/classes/Party.src/M000342.html +4 -4
- data/doc/classes/Party.src/M000343.html +11 -4
- data/doc/classes/Party.src/M000344.html +4 -4
- data/doc/classes/Party.src/M000345.html +4 -11
- data/doc/classes/Party.src/{M000338.html → M000346.html} +4 -4
- data/doc/classes/Party.src/M000347.html +25 -0
- data/doc/classes/Period.html +1 -1
- data/doc/classes/PeriodsController.html +130 -130
- data/doc/classes/PeriodsController.src/M000372.html +9 -8
- data/doc/classes/PeriodsController.src/M000373.html +19 -6
- data/doc/classes/PeriodsController.src/M000374.html +5 -4
- data/doc/classes/PeriodsController.src/M000375.html +15 -4
- data/doc/classes/PeriodsController.src/M000376.html +11 -4
- data/doc/classes/PeriodsController.src/M000377.html +3 -5
- data/doc/classes/PeriodsController.src/M000378.html +8 -6
- data/doc/classes/PeriodsController.src/M000379.html +6 -11
- data/doc/classes/PeriodsController.src/M000380.html +4 -19
- data/doc/classes/PeriodsController.src/M000381.html +4 -5
- data/doc/classes/PeriodsController.src/M000382.html +4 -15
- data/doc/classes/PeriodsController.src/M000383.html +6 -11
- data/doc/classes/PeriodsController.src/M000384.html +8 -4
- data/doc/classes/PeriodsController.src/M000385.html +9 -8
- data/doc/classes/PeriodsController.src/M000386.html +19 -6
- data/doc/classes/PeriodsController.src/M000387.html +5 -4
- data/doc/classes/PeriodsController.src/M000388.html +15 -4
- data/doc/classes/PeriodsController.src/M000389.html +11 -4
- data/doc/classes/PeriodsController.src/M000390.html +3 -5
- data/doc/classes/PeriodsController.src/M000391.html +8 -6
- data/doc/classes/PeriodsController.src/M000392.html +20 -0
- data/doc/classes/{GroupsController.src/M000322.html → PeriodsController.src/M000393.html} +4 -5
- data/doc/classes/PeriodsController.src/{M000371.html → M000394.html} +4 -4
- data/doc/classes/{Party.src/M000339.html → PeriodsController.src/M000395.html} +4 -4
- data/doc/classes/PeriodsController.src/M000396.html +20 -0
- data/doc/classes/PeriodsController.src/M000397.html +22 -0
- data/doc/classes/PeriodsHelper.html +1 -1
- data/doc/classes/SearchHelper.html +1 -1
- data/doc/classes/SearchResult.html +11 -11
- data/doc/classes/SearchResult.src/{M000239.html → M000241.html} +0 -0
- data/doc/classes/SearchResult.src/{M000240.html → M000242.html} +0 -0
- data/doc/classes/Task.html +385 -385
- data/doc/classes/Task.src/M000243.html +7 -14
- data/doc/classes/Task.src/M000244.html +4 -4
- data/doc/classes/Task.src/M000245.html +16 -4
- data/doc/classes/Task.src/M000246.html +4 -24
- data/doc/classes/Task.src/M000247.html +4 -4
- data/doc/classes/Task.src/M000248.html +24 -11
- data/doc/classes/Task.src/M000249.html +4 -6
- data/doc/classes/Task.src/M000250.html +11 -12
- data/doc/classes/Task.src/M000251.html +6 -10
- data/doc/classes/Task.src/M000252.html +9 -40
- data/doc/classes/Task.src/M000253.html +8 -10
- data/doc/classes/Task.src/M000254.html +42 -7
- data/doc/classes/Task.src/M000255.html +12 -4
- data/doc/classes/Task.src/M000256.html +8 -4
- data/doc/classes/Task.src/M000257.html +4 -4
- data/doc/classes/Task.src/M000258.html +4 -4
- data/doc/classes/Task.src/M000259.html +4 -4
- data/doc/classes/Task.src/M000260.html +4 -4
- data/doc/classes/Task.src/M000261.html +4 -4
- data/doc/classes/Task.src/M000262.html +4 -6
- data/doc/classes/Task.src/M000263.html +4 -4
- data/doc/classes/Task.src/M000264.html +6 -4
- data/doc/classes/Task.src/M000265.html +4 -4
- data/doc/classes/Task.src/M000266.html +4 -4
- data/doc/classes/Task.src/M000267.html +4 -4
- data/doc/classes/Task.src/M000268.html +4 -4
- data/doc/classes/Task.src/M000269.html +4 -4
- data/doc/classes/Task.src/M000270.html +4 -4
- data/doc/classes/Task.src/M000271.html +4 -10
- data/doc/classes/Task.src/M000272.html +4 -19
- data/doc/classes/Task.src/M000273.html +9 -9
- data/doc/classes/Task.src/M000274.html +17 -18
- data/doc/classes/Task.src/M000275.html +10 -4
- data/doc/classes/Task.src/M000276.html +20 -4
- data/doc/classes/Task.src/M000277.html +4 -4
- data/doc/classes/Task.src/M000278.html +4 -9
- data/doc/classes/Task.src/M000279.html +4 -9
- data/doc/classes/Task.src/M000280.html +9 -4
- data/doc/classes/Task.src/M000281.html +7 -14
- data/doc/classes/Task.src/M000282.html +4 -4
- data/doc/classes/Task.src/M000283.html +16 -4
- data/doc/classes/Task.src/M000284.html +4 -24
- data/doc/classes/Task.src/M000285.html +4 -4
- data/doc/classes/Task.src/M000286.html +24 -11
- data/doc/classes/Task.src/M000287.html +4 -6
- data/doc/classes/Task.src/M000288.html +11 -12
- data/doc/classes/Task.src/M000289.html +6 -10
- data/doc/classes/Task.src/M000290.html +9 -40
- data/doc/classes/Task.src/M000291.html +8 -10
- data/doc/classes/Task.src/M000292.html +42 -7
- data/doc/classes/Task.src/M000293.html +12 -4
- data/doc/classes/Task.src/M000294.html +8 -4
- data/doc/classes/Task.src/M000295.html +4 -4
- data/doc/classes/Task.src/M000296.html +4 -4
- data/doc/classes/Task.src/M000297.html +4 -4
- data/doc/classes/Task.src/M000298.html +4 -4
- data/doc/classes/Task.src/M000299.html +4 -4
- data/doc/classes/Task.src/M000300.html +4 -6
- data/doc/classes/Task.src/M000301.html +4 -4
- data/doc/classes/Task.src/M000302.html +6 -4
- data/doc/classes/Task.src/M000303.html +4 -4
- data/doc/classes/Task.src/M000304.html +4 -4
- data/doc/classes/Task.src/M000305.html +4 -4
- data/doc/classes/Task.src/M000306.html +4 -4
- data/doc/classes/Task.src/M000307.html +4 -4
- data/doc/classes/Task.src/M000308.html +18 -0
- data/doc/classes/Task.src/M000309.html +4 -4
- data/doc/classes/Task.src/M000311.html +4 -19
- data/doc/classes/Task.src/M000312.html +9 -9
- data/doc/classes/Task.src/M000313.html +17 -18
- data/doc/classes/Task.src/M000314.html +10 -4
- data/doc/classes/Task.src/M000315.html +20 -4
- data/doc/classes/Task.src/M000316.html +4 -4
- data/doc/classes/Task.src/M000317.html +4 -9
- data/doc/classes/Task.src/M000318.html +18 -0
- data/doc/classes/Task.src/M000319.html +23 -0
- data/doc/classes/TaskFile.html +165 -0
- data/doc/classes/TaskFile.src/M000239.html +18 -0
- data/doc/classes/TaskFile.src/M000240.html +18 -0
- data/doc/classes/TaskFilesController.html +195 -0
- data/doc/classes/TaskFilesController.src/M000368.html +22 -0
- data/doc/classes/TaskFilesController.src/M000369.html +24 -0
- data/doc/classes/TaskFilesController.src/M000370.html +22 -0
- data/doc/classes/TaskFilesController.src/M000371.html +24 -0
- data/doc/classes/TaskFilesHelper.html +115 -0
- data/doc/classes/TasksController.src/M000107.html +6 -1
- data/doc/classes/TasksController.src/M000108.html +1 -1
- data/doc/classes/TasksController.src/M000109.html +1 -1
- data/doc/classes/TasksController.src/M000110.html +1 -1
- data/doc/classes/TasksController.src/M000111.html +1 -1
- data/doc/classes/TasksController.src/M000112.html +1 -1
- data/doc/classes/TasksController.src/M000113.html +1 -1
- data/doc/classes/TasksController.src/M000114.html +1 -1
- data/doc/classes/TasksController.src/M000115.html +1 -1
- data/doc/classes/TasksController.src/M000116.html +1 -1
- data/doc/classes/TasksController.src/M000117.html +1 -1
- data/doc/classes/TasksController.src/M000118.html +1 -1
- data/doc/classes/TasksController.src/M000119.html +1 -1
- data/doc/classes/TasksController.src/M000120.html +1 -1
- data/doc/classes/TasksController.src/M000121.html +2 -2
- data/doc/classes/TasksController.src/M000122.html +1 -1
- data/doc/classes/TasksController.src/M000127.html +6 -1
- data/doc/classes/TasksController.src/M000128.html +1 -1
- data/doc/classes/TasksController.src/M000129.html +1 -1
- data/doc/classes/TasksController.src/M000130.html +1 -1
- data/doc/classes/TasksController.src/M000131.html +1 -1
- data/doc/classes/TasksController.src/M000132.html +1 -1
- data/doc/classes/TasksController.src/M000133.html +1 -1
- data/doc/classes/TasksController.src/M000134.html +1 -1
- data/doc/classes/TasksController.src/M000135.html +1 -1
- data/doc/classes/TasksController.src/M000136.html +1 -1
- data/doc/classes/TasksController.src/M000137.html +1 -1
- data/doc/classes/TasksController.src/M000138.html +1 -1
- data/doc/classes/TasksController.src/M000139.html +1 -1
- data/doc/classes/TasksController.src/M000140.html +1 -1
- data/doc/classes/TasksController.src/M000141.html +2 -2
- data/doc/classes/TasksController.src/M000142.html +1 -1
- data/doc/classes/TasksHelper.html +1 -1
- data/doc/classes/Time.html +1 -1
- data/doc/classes/User.html +1 -1
- data/doc/classes/UserHelper.html +55 -55
- data/doc/classes/UserHelper.src/{M000402.html → M000414.html} +0 -0
- data/doc/classes/UserHelper.src/{M000403.html → M000415.html} +0 -0
- data/doc/classes/UserHelper.src/{M000404.html → M000416.html} +0 -0
- data/doc/classes/UserHelper.src/{M000405.html → M000417.html} +0 -0
- data/doc/classes/UserHelper.src/{M000406.html → M000418.html} +0 -0
- data/doc/classes/UserHelper.src/{M000407.html → M000419.html} +0 -0
- data/doc/classes/UserNotify.html +1 -1
- data/doc/classes/UserSystem.html +56 -56
- data/doc/classes/UserSystem.src/{M000452.html → M000464.html} +0 -0
- data/doc/classes/UserSystem.src/{M000453.html → M000465.html} +0 -0
- data/doc/classes/UserSystem.src/{M000454.html → M000466.html} +0 -0
- data/doc/classes/UserSystem.src/{M000455.html → M000467.html} +0 -0
- data/doc/classes/UserSystem.src/{M000456.html → M000468.html} +0 -0
- data/doc/classes/UserSystem.src/{M000457.html → M000469.html} +0 -0
- data/doc/classes/Work.html +91 -91
- data/doc/classes/Work.src/M000348.html +4 -14
- data/doc/classes/Work.src/M000349.html +4 -24
- data/doc/classes/Work.src/M000350.html +14 -4
- data/doc/classes/Work.src/M000351.html +24 -4
- data/doc/classes/Work.src/M000352.html +4 -7
- data/doc/classes/Work.src/M000353.html +4 -4
- data/doc/classes/Work.src/M000354.html +5 -5
- data/doc/classes/Work.src/M000355.html +4 -4
- data/doc/classes/Work.src/M000356.html +7 -4
- data/doc/classes/Work.src/M000357.html +4 -14
- data/doc/classes/Work.src/M000358.html +4 -24
- data/doc/classes/Work.src/M000359.html +14 -4
- data/doc/classes/Work.src/M000360.html +24 -4
- data/doc/classes/Work.src/M000361.html +4 -7
- data/doc/classes/Work.src/M000362.html +4 -4
- data/doc/classes/Work.src/M000363.html +5 -5
- data/doc/classes/Work.src/{M000346.html → M000364.html} +4 -4
- data/doc/classes/Work.src/M000365.html +21 -0
- data/doc/classes/WorksHelper.html +11 -11
- data/doc/classes/WorksHelper.src/{M000424.html → M000430.html} +0 -0
- data/doc/classes/WorksHelper.src/{M000425.html → M000431.html} +0 -0
- data/doc/created.rid +1 -1
- data/doc/dot/f_0.png +0 -0
- data/doc/dot/f_1.png +0 -0
- data/doc/dot/f_2.png +0 -0
- data/doc/dot/f_24.png +0 -0
- data/doc/dot/f_25.png +0 -0
- data/doc/dot/f_26.png +0 -0
- data/doc/dot/f_27.png +0 -0
- data/doc/dot/f_28.png +0 -0
- data/doc/dot/f_29.png +0 -0
- data/doc/dot/f_3.png +0 -0
- data/doc/dot/f_30.png +0 -0
- data/doc/dot/f_31.png +0 -0
- data/doc/dot/f_32.png +0 -0
- data/doc/dot/f_33.png +0 -0
- data/doc/dot/f_34.dot +32 -0
- data/doc/dot/f_34.png +0 -0
- data/doc/dot/f_4.png +0 -0
- data/doc/dot/f_46.dot +4 -4
- data/doc/dot/f_46.png +0 -0
- data/doc/dot/f_47.dot +4 -18
- data/doc/dot/f_47.png +0 -0
- data/doc/dot/f_48.dot +4 -13
- data/doc/dot/f_48.png +0 -0
- data/doc/dot/f_49.dot +18 -4
- data/doc/dot/f_49.png +0 -0
- data/doc/dot/f_5.png +0 -0
- data/doc/dot/f_50.dot +13 -4
- data/doc/dot/f_50.png +0 -0
- data/doc/dot/f_51.dot +4 -4
- data/doc/dot/f_51.png +0 -0
- data/doc/dot/f_52.dot +4 -4
- data/doc/dot/f_52.png +0 -0
- data/doc/dot/f_53.dot +4 -4
- data/doc/dot/f_53.png +0 -0
- data/doc/dot/{f_44.dot → f_54.dot} +4 -4
- data/doc/dot/f_54.png +0 -0
- data/doc/dot/{f_65.dot → f_55.dot} +4 -4
- data/doc/dot/f_55.png +0 -0
- data/doc/dot/{f_45.dot → f_56.dot} +4 -4
- data/doc/dot/f_56.png +0 -0
- data/doc/dot/f_6.png +0 -0
- data/doc/dot/f_68.dot +4 -4
- data/doc/dot/f_68.png +0 -0
- data/doc/dot/f_69.dot +15 -31
- data/doc/dot/f_69.png +0 -0
- data/doc/dot/f_7.png +0 -0
- data/doc/dot/f_70.dot +12 -3
- data/doc/dot/f_70.png +0 -0
- data/doc/dot/f_71.dot +7 -7
- data/doc/dot/f_71.png +0 -0
- data/doc/dot/f_72.dot +4 -4
- data/doc/dot/f_72.png +0 -0
- data/doc/dot/f_73.dot +9 -9
- data/doc/dot/f_73.png +0 -0
- data/doc/dot/f_74.dot +3 -12
- data/doc/dot/f_74.png +0 -0
- data/doc/dot/{f_64.dot → f_75.dot} +4 -4
- data/doc/dot/f_75.png +0 -0
- data/doc/dot/{f_67.dot → f_76.dot} +7 -7
- data/doc/dot/f_76.png +0 -0
- data/doc/dot/f_77.dot +32 -0
- data/doc/dot/f_77.png +0 -0
- data/doc/dot/f_78.dot +46 -0
- data/doc/dot/f_78.png +0 -0
- data/doc/dot/{f_66.dot → f_79.dot} +4 -4
- data/doc/dot/f_79.png +0 -0
- data/doc/dot/{m_48_0.dot → m_50_0.dot} +0 -0
- data/doc/dot/{m_48_0.png → m_50_0.png} +0 -0
- data/doc/files/History_txt.html +23 -2
- data/doc/files/app/controllers/estimates_controller_rb.html +1 -1
- data/doc/files/app/controllers/task_files_controller_rb.html +108 -0
- data/doc/files/app/controllers/tasks_controller_rb.html +1 -1
- data/doc/files/app/helpers/application_helper_rb.html +1 -1
- data/doc/files/app/helpers/backlogs_helper_rb.html +1 -1
- data/doc/files/app/helpers/estimates_helper_rb.html +1 -1
- data/doc/files/app/helpers/groups_helper_rb.html +1 -1
- data/doc/files/app/helpers/parties_helper_rb.html +1 -1
- data/doc/files/app/helpers/periods_helper_rb.html +1 -1
- data/doc/files/app/helpers/search_helper_rb.html +1 -1
- data/doc/files/app/helpers/task_files_helper_rb.html +107 -0
- data/doc/files/app/helpers/tasks_helper_rb.html +1 -1
- data/doc/files/app/helpers/user_helper_rb.html +1 -1
- data/doc/files/app/helpers/works_helper_rb.html +1 -1
- data/doc/files/app/models/backlog_rb.html +1 -1
- data/doc/files/app/models/chart_rb.html +1 -1
- data/doc/files/app/models/estimate_rb.html +1 -1
- data/doc/files/app/models/group_rb.html +1 -1
- data/doc/files/app/models/party_rb.html +1 -1
- data/doc/files/app/models/period_rb.html +1 -1
- data/doc/files/app/models/search_result_rb.html +1 -1
- data/doc/files/app/models/task_file_rb.html +108 -0
- data/doc/files/app/models/task_rb.html +2 -2
- data/doc/files/app/models/user_notify_rb.html +1 -1
- data/doc/files/app/models/user_rb.html +1 -1
- data/doc/files/app/models/work_rb.html +1 -1
- data/doc/fr_class_index.html +3 -0
- data/doc/fr_file_index.html +6 -0
- data/doc/fr_method_index.html +295 -289
- data/doc/index.html +2 -2
- data/lang/en.yaml +2 -0
- data/lang/no.yaml +2 -0
- data/post-clean.rb +12 -0
- data/post-install.rb +51 -0
- data/post-setup.rb +254 -0
- data/public/500.html +2 -1
- data/public/images/text-x-generic.png +0 -0
- data/public/stylesheets/backlog.css +15 -2
- data/public/stylesheets/mwrt002.css +1 -1
- data/public/stylesheets/user.css +1 -1
- data/test/fixtures/task_files.yml +13 -0
- data/test/functional/backlogs_controller_test.rb +2 -1
- data/test/functional/estimates_controller_test.rb +2 -0
- data/test/functional/groups_controller_test.rb +1 -1
- data/test/functional/periods_controller_test.rb +1 -1
- data/test/functional/task_files_controller_test.rb +29 -0
- data/test/functional/tasks_controller_test.rb +2 -2
- data/test/functional/user_controller_test.rb +1 -1
- data/test/functional/works_controller_test.rb +1 -1
- data/test/unit/estimate_test.rb +1 -1
- data/test/unit/period_test.rb +1 -1
- data/test/unit/task_file_test.rb +10 -0
- data/test/unit/task_test.rb +1 -1
- metadata +115 -88
- data/doc/classes/ActiveRecord/Base.src/M000430.html +0 -29
- data/doc/classes/ActiveRecord/Base.src/M000431.html +0 -27
- data/doc/classes/ApplicationHelper.src/M000434.html +0 -21
- data/doc/classes/ApplicationHelper.src/M000435.html +0 -18
- data/doc/classes/ApplicationHelper.src/M000436.html +0 -26
- data/doc/classes/EstimatesController.src/M000392.html +0 -22
- data/doc/classes/EstimatesController.src/M000393.html +0 -22
- data/doc/classes/PeriodsController.src/M000366.html +0 -25
- data/doc/classes/PeriodsController.src/M000367.html +0 -33
- data/doc/classes/PeriodsController.src/M000368.html +0 -19
- data/doc/classes/PeriodsController.src/M000369.html +0 -29
- data/doc/classes/PeriodsController.src/M000370.html +0 -25
- data/doc/classes/Task.src/M000241.html +0 -23
- data/doc/classes/Task.src/M000242.html +0 -18
- data/doc/classes/Task.src/M000310.html +0 -24
- data/doc/classes/Work.src/M000347.html +0 -18
- data/doc/dot/f_44.png +0 -0
- data/doc/dot/f_45.png +0 -0
- data/doc/dot/f_64.png +0 -0
- data/doc/dot/f_65.png +0 -0
- data/doc/dot/f_66.png +0 -0
- data/doc/dot/f_67.png +0 -0
- data/vendor/plugins/activerecord_foreign_key_extensions/init.rb +0 -2
- data/vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb +0 -215
@@ -5,14 +5,20 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>work_data (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 299</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">work_data</span>(<span class="ruby-identifier">date</span>)
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resolution</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ABORTED</span>
|
16
|
+
<span class="ruby-identifier">relevant_works</span> = <span class="ruby-constant">Work</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">:all</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-node">"task_id = #{id} AND completed_at < '#{(date+1).to_s}'"</span>)
|
17
|
+
<span class="ruby-identifier">total</span> = <span class="ruby-constant">BigDecimal</span>(<span class="ruby-value str">'0'</span>)
|
18
|
+
<span class="ruby-identifier">relevant_works</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span>
|
19
|
+
<span class="ruby-identifier">total</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">hours</span>
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
21
|
+
<span class="ruby-identifier">total</span>
|
16
22
|
<span class="ruby-keyword kw">end</span></pre>
|
17
23
|
</body>
|
18
24
|
</html>
|
@@ -5,14 +5,30 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>start_work (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 309</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_work</span>
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">work_started?</span>
|
16
|
+
<span class="ruby-identifier">open</span>
|
17
|
+
<span class="ruby-identifier">new_work</span> = <span class="ruby-identifier">works</span>.<span class="ruby-identifier">new</span>
|
18
|
+
<span class="ruby-identifier">new_work</span>.<span class="ruby-identifier">started_at</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">previous_quarter</span>
|
19
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">works</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
20
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current_user</span>
|
21
|
+
<span class="ruby-identifier">last_work</span> = <span class="ruby-identifier">works</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">user</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">current_user</span>}.<span class="ruby-identifier">last</span>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
23
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">last_work</span>
|
24
|
+
<span class="ruby-identifier">last_work</span> = <span class="ruby-identifier">works</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">nil?</span>}.<span class="ruby-identifier">last</span>
|
25
|
+
<span class="ruby-keyword kw">end</span>
|
26
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">last_work</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">last_work</span>.<span class="ruby-identifier">completed_at</span> <span class="ruby-operator">></span> <span class="ruby-identifier">new_work</span>.<span class="ruby-identifier">started_at</span>
|
27
|
+
<span class="ruby-identifier">new_work</span>.<span class="ruby-identifier">started_at</span> = <span class="ruby-identifier">last_work</span>.<span class="ruby-identifier">completed_at</span>
|
28
|
+
<span class="ruby-keyword kw">end</span>
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
30
|
+
<span class="ruby-identifier">new_work</span>.<span class="ruby-identifier">user</span> = <span class="ruby-identifier">current_user</span>
|
31
|
+
<span class="ruby-identifier">new_work</span>.<span class="ruby-identifier">save!</span>
|
16
32
|
<span class="ruby-keyword kw">end</span></pre>
|
17
33
|
</body>
|
18
34
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>works_with_children (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-operator"
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 329</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">works_with_children</span>
|
15
|
+
<span class="ruby-identifier">works</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">children</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">works_with_children</span>}.<span class="ruby-identifier">flatten</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,19 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>abort (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
16
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current_user</span>
|
17
|
-
<span class="ruby-identifier">started_by_user</span> = <span class="ruby-identifier">started_works</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">user</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">current_user</span>}.<span class="ruby-identifier">last</span>
|
18
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">started_by_user</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">started_by_user</span>
|
19
|
-
<span class="ruby-keyword kw">end</span>
|
20
|
-
<span class="ruby-identifier">started_works</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">nil?</span>}.<span class="ruby-identifier">last</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 333</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abort</span>(<span class="ruby-identifier">user</span>)
|
15
|
+
<span class="ruby-identifier">finish</span>(<span class="ruby-constant">Task</span><span class="ruby-operator">::</span><span class="ruby-constant">ABORTED</span>, <span class="ruby-keyword kw">false</span>)
|
21
16
|
<span class="ruby-keyword kw">end</span></pre>
|
22
17
|
</body>
|
23
18
|
</html>
|
@@ -5,19 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>work_started? (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
16
|
-
<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span> <span class="ruby-identifier">:parent_id</span>, <span class="ruby-value str">"A subtask may not have neither period nor backlog set."</span>
|
17
|
-
<span class="ruby-keyword kw">end</span>
|
18
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_record?</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">period</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">period</span>.<span class="ruby-identifier">passed?</span>
|
19
|
-
<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span> <span class="ruby-identifier">:period_id</span>, <span class="ruby-value str">"You may not add a task to a past period."</span>
|
20
|
-
<span class="ruby-keyword kw">end</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 337</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">work_started?</span>
|
15
|
+
<span class="ruby-operator">!</span><span class="ruby-identifier">started_work</span>.<span class="ruby-identifier">nil?</span>
|
21
16
|
<span class="ruby-keyword kw">end</span></pre>
|
22
17
|
</body>
|
23
18
|
</html>
|
@@ -5,14 +5,19 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>started_work (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-
|
15
|
-
<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 341</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">started_work</span>
|
15
|
+
<span class="ruby-identifier">started_works</span> = <span class="ruby-identifier">works</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">completed_at</span>.<span class="ruby-identifier">nil?</span>}
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current_user</span>
|
17
|
+
<span class="ruby-identifier">started_by_user</span> = <span class="ruby-identifier">started_works</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">user</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">current_user</span>}.<span class="ruby-identifier">last</span>
|
18
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">started_by_user</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">started_by_user</span>
|
19
|
+
<span class="ruby-keyword kw">end</span>
|
20
|
+
<span class="ruby-identifier">started_works</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">nil?</span>}.<span class="ruby-identifier">last</span>
|
16
21
|
<span class="ruby-keyword kw">end</span></pre>
|
17
22
|
</body>
|
18
23
|
</html>
|
@@ -5,25 +5,18 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>validate (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-
|
15
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">
|
16
|
-
<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 36</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate</span>
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">parent_id</span> <span class="ruby-operator">&&</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">period_id</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">backlog_id</span>)
|
16
|
+
<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span> <span class="ruby-identifier">:parent_id</span>, <span class="ruby-value str">"A subtask may not have neither period nor backlog set."</span>
|
17
17
|
<span class="ruby-keyword kw">end</span>
|
18
|
-
<span class="ruby-
|
19
|
-
|
20
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">backlog_sort</span> = <span class="ruby-identifier">t1</span>.<span class="ruby-identifier">backlog</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">t2</span>.<span class="ruby-identifier">backlog</span>.<span class="ruby-identifier">name</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
21
|
-
<span class="ruby-identifier">backlog_sort</span>
|
22
|
-
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">period_sort</span> = <span class="ruby-identifier">t1</span>.<span class="ruby-identifier">period</span>.<span class="ruby-identifier">end_on</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">t2</span>.<span class="ruby-identifier">period</span>.<span class="ruby-identifier">end_on</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
23
|
-
<span class="ruby-identifier">period_sort</span>
|
24
|
-
<span class="ruby-keyword kw">else</span>
|
25
|
-
<span class="ruby-identifier">t1</span>.<span class="ruby-identifier">position</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">t2</span>.<span class="ruby-identifier">position</span>
|
26
|
-
<span class="ruby-keyword kw">end</span>
|
18
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_record?</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">period</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">period</span>.<span class="ruby-identifier">passed?</span>
|
19
|
+
<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span> <span class="ruby-identifier">:period_id</span>, <span class="ruby-value str">"You may not add a task to a past period."</span>
|
27
20
|
<span class="ruby-keyword kw">end</span>
|
28
21
|
<span class="ruby-keyword kw">end</span></pre>
|
29
22
|
</body>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>find_open (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 45</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">find_open</span>
|
15
|
+
<span class="ruby-identifier">find</span>(<span class="ruby-identifier">:all</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'finished_at IS NULL'</span>, <span class="ruby-identifier">:order</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'description'</span>)
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,26 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>find_started (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 49</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">find_started</span>
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current_user</span>
|
16
|
+
<span class="ruby-identifier">user_clause</span> = <span class="ruby-node">" OR user_id = #{current_user.id}"</span>
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
18
|
+
<span class="ruby-identifier">conditions</span> = <span class="ruby-node">"completed_at IS NULL AND (user_id IS NULL#{user_clause})"</span>
|
19
|
+
<span class="ruby-constant">Work</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">:all</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">conditions</span>).<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">task</span>}.<span class="ruby-identifier">sort</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t1</span>, <span class="ruby-identifier">t2</span><span class="ruby-operator">|</span>
|
20
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">backlog_sort</span> = <span class="ruby-identifier">t1</span>.<span class="ruby-identifier">backlog</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">t2</span>.<span class="ruby-identifier">backlog</span>.<span class="ruby-identifier">name</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
21
|
+
<span class="ruby-identifier">backlog_sort</span>
|
22
|
+
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">period_sort</span> = <span class="ruby-identifier">t1</span>.<span class="ruby-identifier">period</span>.<span class="ruby-identifier">end_on</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">t2</span>.<span class="ruby-identifier">period</span>.<span class="ruby-identifier">end_on</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
23
|
+
<span class="ruby-identifier">period_sort</span>
|
24
|
+
<span class="ruby-keyword kw">else</span>
|
25
|
+
<span class="ruby-identifier">t1</span>.<span class="ruby-identifier">position</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">t2</span>.<span class="ruby-identifier">position</span>
|
26
|
+
<span class="ruby-keyword kw">end</span>
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
16
28
|
<span class="ruby-keyword kw">end</span></pre>
|
17
29
|
</body>
|
18
30
|
</html>
|
@@ -5,34 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>recent_conditions (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-
|
15
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-
|
16
|
-
<span class="ruby-identifier">previous_estimate</span> = <span class="ruby-identifier">estimates</span>.<span class="ruby-identifier">last</span>
|
17
|
-
<span class="ruby-identifier">new_estimate</span> = <span class="ruby-constant">Estimate</span>.<span class="ruby-identifier">new</span>
|
18
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">previous_estimate</span>
|
19
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_todo</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">todo</span>
|
20
|
-
<span class="ruby-keyword kw">else</span>
|
21
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_todo</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">initial_estimate</span>
|
22
|
-
<span class="ruby-keyword kw">end</span>
|
23
|
-
<span class="ruby-identifier">now</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
24
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">previous_estimate</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">now</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">created_at</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">now</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">'%Y-%m-%DT%H:%M:%S'</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">created_at</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">'%Y-%m-%DT%H:%M:%S'</span>))
|
25
|
-
<span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">todo</span> = <span class="ruby-identifier">new_todo</span>
|
26
|
-
<span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">user</span> = <span class="ruby-identifier">current_user</span>
|
27
|
-
<span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">save!</span>
|
28
|
-
<span class="ruby-keyword kw">else</span>
|
29
|
-
<span class="ruby-identifier">new_estimate</span>.<span class="ruby-identifier">task_id</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">id</span>
|
30
|
-
<span class="ruby-identifier">new_estimate</span>.<span class="ruby-identifier">todo</span> = <span class="ruby-identifier">new_todo</span>
|
31
|
-
<span class="ruby-identifier">new_estimate</span>.<span class="ruby-identifier">created_at</span> = <span class="ruby-identifier">now</span>
|
32
|
-
<span class="ruby-identifier">new_estimate</span>.<span class="ruby-identifier">user</span> = <span class="ruby-identifier">current_user</span>
|
33
|
-
<span class="ruby-identifier">new_estimate</span>.<span class="ruby-identifier">save!</span>
|
34
|
-
<span class="ruby-identifier">estimates</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">new_estimate</span>
|
35
|
-
<span class="ruby-keyword kw">end</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 65</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">recent_conditions</span>
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"finished_at >= '#{1.week.ago.iso8601}'"</span>
|
36
16
|
<span class="ruby-keyword kw">end</span></pre>
|
37
17
|
</body>
|
38
18
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>todo (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 69</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">todo</span>
|
15
|
+
<span class="ruby-identifier">estimates</span>.<span class="ruby-identifier">last</span> <span class="ruby-value">? </span><span class="ruby-identifier">estimates</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">todo</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">initial_estimate</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,21 +5,34 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>estimate (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">
|
16
|
-
<span class="ruby-
|
17
|
-
<span class="ruby-identifier">
|
18
|
-
<span class="ruby-
|
19
|
-
|
20
|
-
<span class="ruby-
|
21
|
-
|
22
|
-
<span class="ruby-
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 73</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">estimate</span>(<span class="ruby-identifier">new_todo</span>)
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">new_todo</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">new_todo</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">''</span>
|
16
|
+
<span class="ruby-identifier">previous_estimate</span> = <span class="ruby-identifier">estimates</span>.<span class="ruby-identifier">last</span>
|
17
|
+
<span class="ruby-identifier">new_estimate</span> = <span class="ruby-constant">Estimate</span>.<span class="ruby-identifier">new</span>
|
18
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">previous_estimate</span>
|
19
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_todo</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">todo</span>
|
20
|
+
<span class="ruby-keyword kw">else</span>
|
21
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_todo</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">initial_estimate</span>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
23
|
+
<span class="ruby-identifier">now</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
24
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">previous_estimate</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">now</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">created_at</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">now</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">'%Y-%m-%DT%H:%M:%S'</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">created_at</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">'%Y-%m-%DT%H:%M:%S'</span>))
|
25
|
+
<span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">todo</span> = <span class="ruby-identifier">new_todo</span>
|
26
|
+
<span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">user</span> = <span class="ruby-identifier">current_user</span>
|
27
|
+
<span class="ruby-identifier">previous_estimate</span>.<span class="ruby-identifier">save!</span>
|
28
|
+
<span class="ruby-keyword kw">else</span>
|
29
|
+
<span class="ruby-identifier">new_estimate</span>.<span class="ruby-identifier">task_id</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">id</span>
|
30
|
+
<span class="ruby-identifier">new_estimate</span>.<span class="ruby-identifier">todo</span> = <span class="ruby-identifier">new_todo</span>
|
31
|
+
<span class="ruby-identifier">new_estimate</span>.<span class="ruby-identifier">created_at</span> = <span class="ruby-identifier">now</span>
|
32
|
+
<span class="ruby-identifier">new_estimate</span>.<span class="ruby-identifier">user</span> = <span class="ruby-identifier">current_user</span>
|
33
|
+
<span class="ruby-identifier">new_estimate</span>.<span class="ruby-identifier">save!</span>
|
34
|
+
<span class="ruby-identifier">estimates</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">new_estimate</span>
|
35
|
+
<span class="ruby-keyword kw">end</span>
|
23
36
|
<span class="ruby-keyword kw">end</span></pre>
|
24
37
|
</body>
|
25
38
|
</html>
|
@@ -5,16 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>done (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
16
|
-
<span class="ruby-identifier">works</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span> <span class="ruby-identifier">total</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">hours</span>}
|
17
|
-
<span class="ruby-identifier">total</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 97</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">done</span>
|
15
|
+
<span class="ruby-keyword kw">nil</span>
|
18
16
|
<span class="ruby-keyword kw">end</span></pre>
|
19
17
|
</body>
|
20
18
|
</html>
|
@@ -5,22 +5,21 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>done= (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<span class="ruby-keyword kw">end</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 101</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">done=</span>(<span class="ruby-identifier">hours_done</span>)
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">hours_done</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">hours_done</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">''</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">BigDecimal</span>(<span class="ruby-identifier">hours_done</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
16
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">end_work</span>(<span class="ruby-identifier">hours_done</span>)
|
17
|
+
<span class="ruby-identifier">new_work</span> = <span class="ruby-constant">Work</span>.<span class="ruby-identifier">new</span>
|
18
|
+
<span class="ruby-identifier">new_work</span>.<span class="ruby-identifier">hours</span> = <span class="ruby-identifier">hours_done</span>
|
19
|
+
<span class="ruby-identifier">new_work</span>.<span class="ruby-identifier">task_id</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">id</span>
|
20
|
+
<span class="ruby-identifier">new_work</span>.<span class="ruby-identifier">completed_at</span> = <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">now</span>
|
21
|
+
<span class="ruby-identifier">new_work</span>.<span class="ruby-identifier">save!</span>
|
22
|
+
<span class="ruby-identifier">works</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">new_work</span>
|
24
23
|
<span class="ruby-keyword kw">end</span></pre>
|
25
24
|
</body>
|
26
25
|
</html>
|
@@ -5,20 +5,16 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>total_done (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
16
|
-
|
17
|
-
<span class="ruby-
|
18
|
-
<span class="ruby-identifier">open</span>
|
19
|
-
<span class="ruby-identifier">save!</span>
|
20
|
-
<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">child_task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">child_task</span>.<span class="ruby-identifier">reopen</span>}
|
21
|
-
<span class="ruby-keyword kw">end</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 112</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">total_done</span>
|
15
|
+
<span class="ruby-identifier">total</span> = <span class="ruby-constant">BigDecimal</span>(<span class="ruby-value str">'0'</span>)
|
16
|
+
<span class="ruby-identifier">works</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">work</span><span class="ruby-operator">|</span> <span class="ruby-identifier">total</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">work</span>.<span class="ruby-identifier">hours</span>}
|
17
|
+
<span class="ruby-identifier">total</span>
|
22
18
|
<span class="ruby-keyword kw">end</span></pre>
|
23
19
|
</body>
|
24
20
|
</html>
|
@@ -5,52 +5,21 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>open (Task)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">remove_from_list</span>
|
20
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">position</span> = <span class="ruby-keyword kw">nil</span>
|
21
|
-
|
22
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">period</span>
|
23
|
-
<span class="ruby-identifier">old_todo</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">todo</span>
|
24
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">finish</span>(<span class="ruby-identifier">new_period</span>.<span class="ruby-identifier">party</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">period</span>.<span class="ruby-identifier">party</span> <span class="ruby-value">? </span><span class="ruby-constant">Task</span><span class="ruby-operator">::</span><span class="ruby-constant">POSTPONED</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Task</span><span class="ruby-operator">::</span><span class="ruby-constant">MOVED</span>, <span class="ruby-keyword kw">true</span>)
|
25
|
-
<span class="ruby-identifier">ancestor_id</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">previous_task_id</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">id</span>
|
26
|
-
<span class="ruby-identifier">existing_task</span> = <span class="ruby-constant">Task</span>.<span class="ruby-identifier">find_by_period_id_and_id</span>(<span class="ruby-identifier">new_period</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">ancestor_id</span>)
|
27
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">existing_task</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Task</span>.<span class="ruby-identifier">find_by_period_id_and_previous_task_id</span>(<span class="ruby-identifier">new_period</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">ancestor_id</span>)
|
28
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"mismatch"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">existing_task</span>.<span class="ruby-identifier">backlog</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">root_task</span>.<span class="ruby-identifier">backlog</span>
|
29
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"Mismatch"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">existing_task</span>.<span class="ruby-identifier">period</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">new_period</span>
|
30
|
-
<span class="ruby-identifier">existing_task</span>.<span class="ruby-identifier">open</span>
|
31
|
-
<span class="ruby-identifier">existing_task</span>.<span class="ruby-identifier">previous_task_id</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">previous_task_id</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">id</span>
|
32
|
-
<span class="ruby-identifier">existing_task</span>.<span class="ruby-identifier">description</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">description</span>
|
33
|
-
<span class="ruby-identifier">existing_task</span>.<span class="ruby-identifier">save!</span>
|
34
|
-
<span class="ruby-identifier">existing_task</span>.<span class="ruby-identifier">estimate</span>(<span class="ruby-identifier">old_todo</span>)
|
35
|
-
<span class="ruby-keyword kw">else</span>
|
36
|
-
<span class="ruby-identifier">new_task</span> = <span class="ruby-constant">Task</span>.<span class="ruby-identifier">new</span>
|
37
|
-
<span class="ruby-identifier">new_task</span>.<span class="ruby-identifier">previous_task_id</span> = <span class="ruby-identifier">ancestor_id</span>
|
38
|
-
<span class="ruby-identifier">new_task</span>.<span class="ruby-identifier">backlog</span> = <span class="ruby-identifier">root_task</span>.<span class="ruby-identifier">backlog</span>
|
39
|
-
<span class="ruby-identifier">new_task</span>.<span class="ruby-identifier">period</span> = <span class="ruby-identifier">new_period</span>
|
40
|
-
<span class="ruby-identifier">new_task</span>.<span class="ruby-identifier">description</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">description</span>
|
41
|
-
<span class="ruby-identifier">new_task</span>.<span class="ruby-identifier">initial_estimate</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">initial_estimate</span>
|
42
|
-
<span class="ruby-identifier">new_task</span>.<span class="ruby-identifier">insert_at</span> <span class="ruby-value">1</span>
|
43
|
-
<span class="ruby-identifier">new_task</span>.<span class="ruby-identifier">position</span> = <span class="ruby-value">1</span>
|
44
|
-
<span class="ruby-identifier">new_task</span>.<span class="ruby-identifier">save!</span>
|
45
|
-
<span class="ruby-identifier">new_task</span>.<span class="ruby-identifier">estimate</span>(<span class="ruby-identifier">old_todo</span>)
|
46
|
-
<span class="ruby-keyword kw">end</span>
|
47
|
-
<span class="ruby-keyword kw">else</span>
|
48
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">period_id</span> = <span class="ruby-identifier">new_period</span>.<span class="ruby-identifier">id</span>
|
49
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">period</span> = <span class="ruby-identifier">new_period</span>
|
50
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">insert_at</span>(<span class="ruby-value">1</span>)
|
13
|
+
<pre><span class="ruby-comment cmt"># File app/models/task.rb, line 118</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">finished_at</span>
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">finished_at</span> = <span class="ruby-keyword kw">nil</span>
|
17
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">resolution</span> = <span class="ruby-keyword kw">nil</span>
|
18
|
+
<span class="ruby-identifier">insert_at</span> <span class="ruby-value">1</span>
|
51
19
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">position</span> = <span class="ruby-value">1</span>
|
52
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">move_to_bottom</span>
|
53
20
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">save!</span>
|
21
|
+
<span class="ruby-identifier">estimate</span>(<span class="ruby-identifier">initial_estimate</span>)
|
22
|
+
<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">open</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parent</span>
|
54
23
|
<span class="ruby-keyword kw">end</span>
|
55
24
|
<span class="ruby-keyword kw">end</span></pre>
|
56
25
|
</body>
|