├── .gitignore ├── README ├── README.deutsch ├── app ├── controllers │ ├── diagrams_controller.rb │ ├── documentations_controller.rb │ ├── issue_sprints_controller.rb │ ├── milestones_controller.rb │ ├── sprints_controller.rb │ ├── tasks_controller.rb │ └── user_stories_controller.rb ├── helpers │ ├── diagrams_helper.rb │ ├── documentations_helper.rb │ ├── milestones_helper.rb │ ├── sprints_helper.rb │ ├── tasks_helper.rb │ └── user_stories_helper.rb ├── models │ ├── burndown.rb │ ├── diagram.rb │ ├── documentation.rb │ ├── milestone.rb │ ├── sprint_issue.rb │ ├── sprints_setup.rb │ ├── task_log.rb │ ├── time_estimate.rb │ └── user_story.rb └── views │ ├── diagrams │ ├── edit.html.erb │ ├── index.html.erb │ ├── new.html.erb │ └── show.html.erb │ ├── documentations │ ├── _documentation.html.erb │ └── languages │ │ ├── _java.html.erb │ │ └── _ruby.html.erb │ ├── issue_sprints │ ├── _form.rhtml │ ├── _new.rhtml │ ├── _redirect_after_create.rhtml │ └── _user_story_field.rhtml │ ├── milestones │ ├── _edit.html.erb │ ├── _milestone.erb │ ├── _milestones.html.erb │ └── _new.html.erb │ ├── shared │ ├── _burndown_chart.html.erb │ ├── _percent_done.erb │ ├── _project_stats.erb │ ├── _stats_form.erb │ └── _task_view.html.erb │ ├── sprints │ ├── _edit.html.erb │ ├── _form.rhtml │ ├── _new.html.erb │ ├── _product_backlog.html.erb │ ├── _sprint.erb │ ├── _sprint_dates_and_points.erb │ ├── edit.html.erb │ ├── index.html.erb │ ├── new.html.erb │ └── show.html.erb │ ├── tasks │ ├── edit.html.erb │ ├── index.html.erb │ ├── issues.html.erb │ ├── new.html.erb │ └── show.html.erb │ └── user_stories │ ├── _backlog_item.erb │ ├── _edit.erb │ ├── _milestone_item.erb │ ├── _new.erb │ ├── _sprint_item.html.erb │ ├── _us_for_show.html.erb │ ├── edit.html.erb │ ├── index.html.erb │ ├── new.html.erb │ └── show.html.erb ├── assets ├── attachments │ └── .svn │ │ ├── all-wcprops │ │ └── entries ├── images │ ├── Thumbs.db │ ├── accept.png │ ├── add.png │ ├── api.png │ ├── back.png │ ├── backlog.png │ ├── blank.gif │ ├── cancel.png │ ├── charts.png │ ├── close.gif │ ├── closelabel.gif │ ├── controller.png │ ├── dashboard.png │ ├── delete.png │ ├── diagram_add.png │ ├── done.png │ ├── down.gif │ ├── down.png │ ├── edit.png │ ├── estimation.png │ ├── files │ │ ├── Thumbs.db │ │ ├── c.png │ │ ├── csharp.png │ │ ├── default.png │ │ ├── image.png │ │ ├── pdf.png │ │ ├── php.png │ │ ├── ruby.png │ │ ├── text.png │ │ ├── xml.png │ │ └── zip.png │ ├── inprogress.png │ ├── milestone_add.png │ ├── milestone_edit.png │ ├── milestones.png │ ├── model.png │ ├── next.gif │ ├── nextlabel.gif │ ├── pending.png │ ├── prev.gif │ ├── prevlabel.gif │ ├── repo_edit.png │ ├── repo_update.png │ ├── show.png │ ├── spinbtn_updn.gif │ ├── spinner.gif │ ├── story.png │ ├── story_add.png │ ├── story_delete.png │ ├── story_edit.png │ ├── sub.gif │ ├── sum.png │ ├── task_add.png │ ├── task_delete.png │ ├── task_edit.png │ ├── task_show.png │ ├── time.png │ ├── time_add.png │ ├── time_end.png │ ├── tooltip │ │ ├── Thumbs.db │ │ ├── bottom.png │ │ ├── bottom_left.png │ │ ├── bottom_right.png │ │ ├── left.png │ │ ├── pin.png │ │ ├── right.png │ │ ├── top.png │ │ ├── top_left.png │ │ └── top_right.png │ ├── up.gif │ ├── up.png │ ├── us-bottom.png │ ├── us-top.png │ └── user.png ├── javascripts │ ├── fastinit.js │ ├── lightbox.js │ ├── modalbox.js │ ├── scriptaculous.js │ ├── slider.js │ ├── sound.js │ ├── spinbutton.js │ ├── swfobject.js │ ├── tablesort.js │ └── unittest.js ├── open-flash-chart-bar-clicking.swf ├── open-flash-chart.swf └── stylesheets │ ├── lightbox.css │ ├── modalbox.css │ ├── scrum.css │ ├── spinbutton.css │ ├── styles.css │ ├── tablesort.css │ └── tooltip.css ├── config ├── locales │ ├── de.yml │ ├── en.yml │ ├── es.yml │ ├── fr.yml │ ├── pl.yml │ ├── pt-BR.yml │ └── zh.yml └── routes.rb ├── db └── migrate │ ├── 001_create_sprints.rb │ ├── 002_create_user_stories.rb │ ├── 003_create_statuses.rb │ ├── 004_create_tasks.rb │ ├── 005_create_time_estimates.rb │ ├── 006_create_diagrams.rb │ ├── 007_create_task_logs.rb │ ├── 008_add_user_id_to_tasks.rb │ ├── 009_create_documentations.rb │ ├── 010_create_sprints_setups.rb │ ├── 011_add_revision_to_documentation.rb │ ├── 012_add_project_ids.rb │ ├── 013_add_priority_to_us.rb │ ├── 014_create_milestones.rb │ ├── 015_add_project_to_milestone.rb │ ├── 016_add_user_story_id_to_issues.rb │ ├── 017_remove_sprints_and_tasks.rb │ ├── 018_add_duration_to_version.rb │ ├── 019_replace_sprint_with_version.rb │ └── 020_add_redirection_to_issue.rb ├── init.rb ├── lang ├── de.yml ├── en.yml └── pl.yml ├── lib ├── form_helper_extensions.rb ├── hooks.rb ├── issue_patch.rb ├── software_project │ └── redmine │ │ └── current_version_extension.rb ├── sprints │ ├── Documentation │ │ ├── base.rb │ │ ├── java.rb │ │ └── ruby.rb │ └── scm_controller.rb └── version_patch.rb └── test ├── fixtures ├── documentations.yml ├── milestones.yml ├── sprints.yml └── sprints_setups.yml ├── functional ├── documentations_controller_test.rb ├── milestones_controller_test.rb └── sprints_controller_test.rb ├── test_helper.rb └── unit ├── documentation_test.rb ├── milestone_test.rb ├── sprint_test.rb └── sprints_setup_test.rb /.gitignore: -------------------------------------------------------------------------------- 1 | ~/.svn 2 | .idea 3 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Unfortunetelly this project will no longer be supported. Last version of Redmin that I worked with it was 1.0.3 but some further versions may also work. 2 | Please let me know how do you use Scrum and fill out this survey: http://www.surveymonkey.com/s/339S5CB 3 | 4 | We are working on great tool for managing projects with Scrum and Kanban. You can check it out here: http://tacticsapp.com 5 | 6 | 7 | Scrum PM v. 0.1.6 8 | 9 | This version is compatibile with Redmine 0.9 stable. Previous versions may not work due to differences in new Issue form. 10 | 11 | Scrum PM is a plugin for Redmine for Scrum project management. Redmine Version class becomes a sprint and issue becomes task. Most actions support drag and drop, eg. dashboard where you can change status of your task simply by draging it to another column. 12 | Some more interesting stuff planned: 13 | 14 | # Support for uml driagram generators railroad(Rails) and umlgraph (JAVA). 15 | # One click documentation generation (rdoc and javadoc) 16 | # Continous integration with cruisecontrol 17 | # Velocity planing 18 | 19 | 20 | HOW TO INSTALL: 21 | 1. Install plugin `git clone git://github.com/software-project/scrum-pm.git vendor/plugins/redmine_sprints` 22 | 2. Install Attachment_fu `git clone git://github.com/technoweenie/attachment_fu.git vendor/plugins/attachment_fu` 23 | 3. Install Googlecharts gem `sudo gem install googlecharts` (note. uninstall GCharts if installed) 24 | 4. Run the usual plugin migration `rake db:migrate_plugins RAILS_ENV=production` 25 | 26 | Change log 27 | 28 | 0.1.6 29 | 30 | # Updates for Redmine 1.0.3. Changed behavior of adding tasks in dashboard. 31 | 32 | 0.1.4 33 | 34 | # Added in place edititors for user assignment to issue, added unassigned issues assignment to user stories, added stats to dashboard, small clean up. 35 | 36 | 0.1.3 37 | 38 | # Added burndown chart. User story is done when all dependent issues are done. 39 | 40 | 0.1.2 41 | 42 | # Added compatibility with Redmine 0.9 stable 43 | 44 | 0.1.1 45 | 46 | # Fixed issues with reassignment issues to version 47 | # Fixed most links(edit/delete/show) 48 | # Added status panel 49 | 50 | 0.1.0 51 | 52 | # fixed sprint <=> user story assignment bug, 53 | # added proper i18n for english and polish 54 | -------------------------------------------------------------------------------- /README.deutsch: -------------------------------------------------------------------------------- 1 | Scrum PM v. 0.1.3 2 | 3 | 4 | Diese Version ist kompatibel mit Redmine 0.9 stable. 5 | Vorherige Versionen funktionieren unter Umständen nicht, auf Grund von Unterschieden im neuen Issue-Formular. 6 | Scrum PM ist ein plugin für Redmine das Unterstützung für Scrum Projekt Management bereitstellt. 7 | 8 | "Versionen" werden zu Sprints und "Issues" werden zu Aufgaben. 9 | Die meisten Aktionen unterstützen drag and drop. 10 | So ist es zum Beispiel im Dashboard möglich den Status einer Aufgabe zu ändern, indem die Aufgabe in eine andere Spalte gezogen wird. 11 | 12 | 13 | Weitere interessante Features sind geplant: 14 | 15 | # Unterstützung für uml Driagramm Generatoren railroad(Rails) und umlgraph (JAVA). 16 | # Ein-Klick Dokumentations-generation (rdoc and javadoc) 17 | # Fortlaufende Integration mit cruisecontrol 18 | # Velocity planing 19 | 20 | 21 | 22 | INSTALLATION: 23 | ============= 24 | 25 | Vorraussetzungen: googlechart plugin muss installiert sein 26 | 27 | 28 | 1. Scrum-pm Plugin installieren 29 | 30 | Sie beötigen git. Unter Debian zu installieren mit: apt-get install git-core 31 | Die folgenden Schritte müssen im RAILS_ROOT von Redmine ausgeführt werden, zum Beispiel in /var/www/redmine 32 | 33 | git clone git://github.com/software-project/scrum-pm.git vendor/plugins/redmine_sprints 34 | 35 | 2. Attachment_fu Plugin installieren 36 | 37 | git clone git://github.com/technoweenie/attachment_fu.git vendor/plugins/attachment_fu 38 | 39 | 3. Googlecharts gem installieren 40 | 41 | sudo gem install googlecharts 42 | 43 | 4. Plugin Migration starten 44 | 45 | rake db:migrate_plugins RAILS_ENV=production 46 | 47 | 48 | 49 | BEKANNTE FEHLER 50 | =============== 51 | 52 | 53 | 54 | 55 | CHANGE LOG 56 | ========== 57 | 58 | 0.1.3 59 | 60 | # Added burndown chart. User story is done when all dependent issues are done. 61 | 62 | 0.1.2 63 | 64 | # Added compatibility with Redmine 0.9 stable 65 | 66 | 0.1.1 67 | 68 | # Fixed issues with reassignment issues to version 69 | # Fixed most links(edit/delete/show) 70 | # Added status panel 71 | 72 | 0.1.0 73 | 74 | # fixed sprint <=> user story assignment bug, 75 | # added proper i18n for english and polish 76 | 77 | -------------------------------------------------------------------------------- /app/controllers/diagrams_controller.rb: -------------------------------------------------------------------------------- 1 | class DiagramsController < ApplicationController 2 | unloadable 3 | before_filter :find_project, :only => [:index, :new, :create, :show] 4 | 5 | # def index 6 | # @diagrams = Diagram.find(:all, :conditions => "thumbnail is null") 7 | # 8 | # respond_to do |format| 9 | # format.html # index.html.erb 10 | # format.xml { render :xml => @diagrams } 11 | # end 12 | # end 13 | # 14 | # # GET /diagrams/1 15 | # # GET /diagrams/1.xml 16 | # def show 17 | # @diagram = Diagram.find(params[:id]) 18 | # 19 | # respond_to do |format| 20 | # format.html # show.html.erb 21 | # format.xml { render :xml => @diagram } 22 | # end 23 | # end 24 | 25 | # GET /diagrams/new 26 | # GET /diagrams/new.xml 27 | def new 28 | @diagram = Diagram.new 29 | @diagram.user_story_id = params[:userstory_id] 30 | 31 | respond_to do |format| 32 | format.html # new.html.erb 33 | format.xml { render :xml => @diagram } 34 | end 35 | end 36 | 37 | # GET /diagrams/1/edit 38 | # def edit 39 | # @diagram = Diagram.find(params[:id]) 40 | # end 41 | 42 | # POST /diagrams 43 | # POST /diagrams.xml 44 | def create 45 | @diagram = Diagram.new(params[:diagram]) 46 | @diagram.project_id = @project_id 47 | 48 | if @diagram.save 49 | redirect_to sprint_path(@diagram.user_story.sprint, @project.id) 50 | else 51 | render :action => :new 52 | end 53 | end 54 | 55 | 56 | # PUT /diagrams/1 57 | # PUT /diagrams/1.xml 58 | # def update 59 | # @diagram = Diagram.find(params[:id]) 60 | # 61 | # respond_to do |format| 62 | # if @diagram.update_attributes(params[:diagram]) 63 | # format.html { redirect_to(@diagram) } 64 | # format.xml { head :ok } 65 | # else 66 | # format.html { render :action => "edit" } 67 | # format.xml { render :xml => @diagram.errors, :status => :unprocessable_entity } 68 | # end 69 | # end 70 | # end 71 | # 72 | # # DELETE /diagrams/1 73 | # # DELETE /diagrams/1.xml 74 | def destroy 75 | @diagram = Diagram.find(params[:id]) 76 | @diagram.destroy 77 | 78 | redirect_to :back 79 | end 80 | 81 | private 82 | def find_project 83 | @project = Project.find(params[:project_id]) 84 | rescue ActiveRecord::RecordNotFound 85 | render_404 86 | end 87 | end 88 | -------------------------------------------------------------------------------- /app/controllers/documentations_controller.rb: -------------------------------------------------------------------------------- 1 | class DocumentationsController < ApplicationController 2 | unloadable 3 | before_filter :find_project 4 | before_filter :find_sprint_setup, :except => [:setup] 5 | 6 | 7 | def setup 8 | @sprint_setup = SprintsSetup.new 9 | @sprint_setup.language = params[:SprintSetup] 10 | @sprint_setup.path = @project.identifier 11 | @sprint_setup.project_id = @project.id 12 | respond_to do |format| 13 | if @sprint_setup.save 14 | scm_ctr = Sprints::ScmController.new(Repository.find_by_project_id(@project.id),@sprint_setup) 15 | begin 16 | scm_ctr.download 17 | rescue 18 | @sprint_setup.destroy 19 | Dir.delete(scm_ctr.project_path) 20 | end 21 | format.html { redirect_to :back } 22 | end 23 | end 24 | end 25 | 26 | def show_api 27 | version = 1 28 | if params[:version] == nil 29 | version = Documentation.find_by_project_id(@project.id, :order => "version DESC").version 30 | else 31 | version = params[:version] 32 | end 33 | session[:version] = version 34 | render :file => "public/projects/#{@project.identifier}/doc/#{version}/app/index.html", :use_full_path => true 35 | end 36 | 37 | def show_doc 38 | path="" 39 | params[:path].each { |item| 40 | path += item +"/" 41 | } 42 | path = path[0..(path.size-2)] 43 | render :file => "public/projects/#{@project.identifier}/doc/#{session[:version]}/app/#{path}", :use_full_path => true 44 | end 45 | 46 | def generate_documentation 47 | generate_doc 48 | respond_to do |format| 49 | format.html { redirect_to :back } 50 | end 51 | end 52 | 53 | def update_repo 54 | unless @sprint_setup.nil? 55 | scm_ctr = Sprints::ScmController.new(Repository.find_by_project_id(@project.id),@sprint_setup) 56 | scm_ctr.update 57 | respond_to do |format| 58 | 59 | format.html { redirect_to :back } 60 | end 61 | else 62 | end 63 | end 64 | 65 | def edit 66 | 67 | end 68 | 69 | private 70 | 71 | def generate_doc 72 | # TODO fix documentation versioning and folders 73 | documentation = Documentation.new 74 | case @sprint_setup.language 75 | when 'Ruby' 76 | doc = Sprints::Documentation::Ruby.new(@sprint_setup) 77 | when 'Java' 78 | doc = Sprints::Documentation::Java.new(@sprint_setup) 79 | end 80 | 81 | documentation.project_id = @project.id 82 | documentation.revision = Repository.find_by_project_id(@project.id).changesets.first.revision 83 | last_doc = Documentation.find_all_by_project_id(@project.id, :order => "version ASC") 84 | documentation.version = last_doc.nil? || last_doc.size == 0 ? 1 : (last_doc.last.version + 1) 85 | 86 | documentation.save 87 | 88 | doc.generate_api(documentation.version) 89 | doc.generate_charts 90 | end 91 | 92 | def find_project 93 | @project = Project.find(params[:project_id]) 94 | rescue ActiveRecord::RecordNotFound 95 | render_404 96 | end 97 | 98 | def find_sprint_setup 99 | @sprint_setup = SprintsSetup.find_by_project_id(@project.id) 100 | rescue ActiveRecord::RecordNotFound 101 | render_404 102 | end 103 | 104 | end 105 | -------------------------------------------------------------------------------- /app/controllers/issue_sprints_controller.rb: -------------------------------------------------------------------------------- 1 | class IssueSprintsController < IssuesController 2 | unloadable 3 | before_filter :find_project, :only => [:new, :create, :update_task, :status_change, :status_delete] 4 | helper SprintsHelper 5 | helper CustomFieldsHelper 6 | 7 | 8 | # Add a new issue 9 | # The new issue will be created from an existing one if copy_from parameter is given 10 | def new 11 | @issue.user_story_id = params[:user_story_id] unless params[:user_story_id].blank? 12 | @issue.fixed_version_id = @issue.user_story.version_id 13 | render :template => "issues/new", :layout => false 14 | end 15 | 16 | def update_task 17 | obj = Object.const_get(params[:model]) 18 | value = nil 19 | value = obj.find(params[:value]) unless params[:value].blank? 20 | task = Issue.find(params[:task_id]) 21 | eval "task.#{params[:field]}=#{value ? value.id : "nil"}" 22 | if task.save 23 | @issue_statuses = IssueStatus.find(:all) 24 | @project_users = User.find(:all, :joins => :members, :conditions => ["members.project_id = ?", @project.id]) 25 | status = done_ratio_to_status(task) 26 | 27 | render :update do |page| 28 | page.replace "task_wrap_#{task.id}", "" 29 | page.insert_html :bottom, "tasks_#{ status }_us_#{task.user_story_id}", :partial => "shared/task_view", 30 | :locals => {:task => task, :issue_statuses => @issue_statuses, 31 | :project_users => @project_users} 32 | end 33 | else 34 | render :update do |page| 35 | page.insert_html :top, "content", content_tag('div', t(:error_changing_status), :class => "error", :id => "errorExplanation") 36 | end 37 | end 38 | end 39 | 40 | def status_change 41 | issue = Issue.find(params[:task_id]) 42 | 43 | if User.current.allowed_to?(:edit_issues, @project) 44 | journal = issue.init_journal(User.current, nil) 45 | 46 | if !issue.nil? && (done_ratio_to_status(issue) != params[:status_id] || issue.user_story_id != params[:user_story_id]) 47 | if done_ratio_to_status(issue) != params[:status_id] 48 | issue.done_ratio = status_to_done_ratio(params[:status_id]) 49 | end 50 | issue.status = issue_status(issue) 51 | issue.user_story_id = params[:user_story_id] 52 | end 53 | 54 | if issue.save 55 | @issue_statuses = IssueStatus.find(:all) 56 | @project_users = User.find(:all, :joins => :members, :conditions => ["members.project_id = ?", @project.id]) 57 | render :update do |p| 58 | p.replace "task_wrap_#{issue.id}", "" 59 | p.insert_html :bottom, "tasks_#{params[:status_id]}_us_#{issue.user_story_id}", :partial => "shared/task_view", 60 | :locals => {:task => issue, :issue_statuses => @issue_statuses, 61 | :project_users => @project_users} 62 | end 63 | else 64 | render :update do |page| 65 | page.insert_html :top, "content", content_tag('div', t(:error_changing_status), :class => "error", :id => "errorExplanation") 66 | end 67 | end 68 | end 69 | end 70 | 71 | def status_delete 72 | issue = Issue.find(params[:task_id]) 73 | 74 | if !issue.user_story_id.nil? && User.current.allowed_to?(:edit_issues, @project) 75 | journal = issue.init_journal(User.current, nil) 76 | 77 | if !issue.nil? 78 | issue.user_story_id = nil 79 | end 80 | 81 | if issue.save 82 | else 83 | render :update do |page| 84 | page.insert_html :top, "content", content_tag('div', t(:error_changing_status), :class => "error", :id => "errorExplanation") 85 | end 86 | end 87 | end 88 | render :text => nil 89 | end 90 | 91 | private 92 | 93 | def find_project 94 | @project = Project.find(params[:project_id]) 95 | rescue ActiveRecord::RecordNotFound 96 | render_404 97 | end 98 | 99 | def issue_status(issue) 100 | 101 | case issue.done_ratio 102 | when 0 103 | if issue.status_id.nil? || !issue.status_id.nil? && issue.status.position == 3 104 | IssueStatus.find_by_position(1) 105 | else 106 | issue.status 107 | end 108 | when 100 109 | IssueStatus.find_by_position(3) 110 | else 111 | IssueStatus.find_by_position(2) 112 | end 113 | end 114 | 115 | def done_ratio_to_status(issue) 116 | case issue.done_ratio 117 | when 0 118 | "1" 119 | when 100 120 | "3" 121 | else 122 | "2" 123 | end 124 | end 125 | 126 | def status_to_done_ratio(status) 127 | 128 | case status 129 | when "1" 130 | 0 131 | when "3" 132 | 100 133 | else 134 | 50 135 | end 136 | end 137 | 138 | end 139 | -------------------------------------------------------------------------------- /app/controllers/milestones_controller.rb: -------------------------------------------------------------------------------- 1 | class MilestonesController < ApplicationController 2 | unloadable 3 | before_filter :find_project 4 | helper :sprints 5 | 6 | def new 7 | @milestone = Milestone.new 8 | @milestone.project_id = @project.id 9 | 10 | render :partial => "milestones/new", :locals => {:milestone => @milestone} 11 | end 12 | 13 | 14 | def create 15 | @milestone = Milestone.new(params[:milestone]) 16 | @milestone.project_id = @project.id 17 | 18 | if @milestone.save 19 | render :update do |p| 20 | p.insert_html :bottom, 'milestones', :partial => "milestones/milestone",:locals => {:milestone => @milestone} 21 | end 22 | else 23 | respond_to do |format| 24 | format.html { render :action => "new" } 25 | format.xml { render :xml => @milestone.errors, :status => :unprocessable_entity } 26 | end 27 | end 28 | end 29 | 30 | 31 | def edit 32 | @milestone = Milestone.find(params[:id]) 33 | render :partial => "milestones/edit", :locals => {:milestone => @milestone} 34 | end 35 | 36 | 37 | def update 38 | @milestone = Milestone.find(params[:id]) 39 | 40 | if @milestone.update_attributes(params[:milestone]) 41 | render :update do |p| 42 | p.replace "milestone_frame_#{@milestone.id}", :partial => "milestones/milestone",:locals => {:milestone => @milestone} 43 | p["milestone_frame_#{@milestone.id}"].visual_effect :highlight, :duration => 2 44 | end 45 | else 46 | respond_to do |format| 47 | format.html { render :action => "edit" } 48 | format.xml { render :xml => @milestone.errors, :status => :unprocessable_entity } 49 | end 50 | end 51 | end 52 | 53 | 54 | def destroy 55 | @milestone = Milestone.find(params[:id]) 56 | milestone_id = @milestone.id 57 | @milestone.destroy 58 | render :update do |p| 59 | p["milestone_frame_#{milestone_id}"].visual_effect :blind_up, :duration => 1 60 | end 61 | end 62 | 63 | private 64 | def find_project 65 | @project = Project.find(params[:project_id]) 66 | rescue ActiveRecord::RecordNotFound 67 | render_404 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /app/controllers/tasks_controller.rb: -------------------------------------------------------------------------------- 1 | class TasksController < ApplicationController 2 | unloadable 3 | before_filter :find_project, :except => [:destroy] 4 | helper :queries 5 | include QueriesHelper 6 | helper :sort 7 | include SortHelper 8 | include IssuesHelper 9 | # GET /tasks 10 | # GET /tasks.xml 11 | def index 12 | @tasks = Task.find(:all) 13 | 14 | respond_to do |format| 15 | format.html # index.html.erb 16 | format.xml { render :xml => @tasks } 17 | end 18 | end 19 | 20 | def issues 21 | retrieve_query 22 | sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria) 23 | sort_update({'id' => "#{Issue.table_name}.id"}.merge(@query.available_columns.inject({}) {|h, c| h[c.name.to_s] = c.sortable; h})) 24 | @unassigned_tasks = [] 25 | if @query.valid? 26 | limit = per_page_option 27 | 28 | @issue_count = @query.issue_count 29 | @issue_pages = Paginator.new self, @issue_count, limit, params['page'] 30 | @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version], 31 | :order => sort_clause, 32 | :offset => @issue_pages.current.offset, 33 | :limit => limit) 34 | @issue_count_by_group = @query.issue_count_by_group 35 | # @unassigned_tasks = Issue.find(:all, :joins => :status, 36 | # :conditions => ["issue_statuses.is_closed = ? AND user_story_id IS NULL AND project_id = ?", false, @project.id ]) 37 | @unassigned_tasks = @issues 38 | @issue_statuses = IssueStatus.find(:all) 39 | @project_users = User.find(:all, :joins => :members, :conditions => ["members.project_id = ?", @project.id]) 40 | end 41 | render :layout => false 42 | rescue ActiveRecord::RecordNotFound 43 | render_404 44 | end 45 | 46 | 47 | # GET /tasks/1 48 | # GET /tasks/1.xml 49 | def show 50 | @task = Task.find(params[:id]) 51 | 52 | respond_to do |format| 53 | format.html # show.html.erb 54 | format.xml { render :xml => @task } 55 | end 56 | end 57 | 58 | # GET /tasks/new 59 | # GET /tasks/new.xml 60 | def new 61 | @task = Task.new 62 | session[:selected_user_story] = params[:user_story_id] 63 | respond_to do |format| 64 | format.html # new.html.erb 65 | format.xml { render :xml => @task } 66 | end 67 | end 68 | 69 | # GET /tasks/1/edit 70 | def edit 71 | @task = Task.find(params[:id]) 72 | end 73 | 74 | # POST /tasks 75 | # POST /tasks.xml 76 | def create 77 | @task = Task.new(params[:task]) 78 | @task.user_story_id = params[:userstory_id] 79 | @task.author = User.current 80 | 81 | devs = [] 82 | @task.users = [] 83 | for developer in params[:task][:user_ids] do 84 | if developer != "" 85 | devs += [User.find(developer)] 86 | end 87 | end 88 | @task.users << devs 89 | 90 | if @task.save 91 | log_task(@task) 92 | redirect_to url_for_object(@task.user_story.sprint,@project,"show") 93 | else 94 | respond_to do |format| 95 | format.html { render :action => "new" } 96 | format.xml { render :xml => @task.errors, :status => :unprocessable_entity } 97 | end 98 | end 99 | end 100 | 101 | def status_change 102 | task = Task.find(params[:id]) 103 | unless task.nil? 104 | # if (task.status_id.to_s != params[:status_id].to_s || (!params[:user_story_id].nil? && params[:user_story_id].to_s != task.user_story_id.to_s )) 105 | task.status_id = params[:status_id] 106 | task.author = User.current 107 | if !params[:user_story_id].nil? and params[:user_story_id].to_s != task.user_story_id.to_s and !UserStory.find(params[:user_story_id]).nil? 108 | task.user_story_id = params[:user_story_id] 109 | end 110 | if task.save 111 | log_task(task) 112 | render :update do |p| 113 | # p.replace_html("task_wrap_#{task.id}", "") 114 | @issue_statuses = IssueStatus.find(:all) 115 | p.insert_html :bottom, "tasks_#{task.status_id }_us_#{task.user_story_id}", :partial => "shared/task_view", 116 | :locals => {:task => @issue, :issue_statuses => @issue_statuses} 117 | end 118 | end 119 | # end 120 | end 121 | end 122 | 123 | # PUT /tasks/1 124 | # PUT /tasks/1.xml 125 | def update 126 | @task = Task.find(params[:id]) 127 | 128 | devs = [] 129 | @task.users = [] 130 | for developer in params[:task][:user_ids] do 131 | if developer != "" 132 | devs += [User.find(developer)] 133 | end 134 | end 135 | @task.users << devs 136 | @task.author = User.current 137 | 138 | if @task.update_attributes(params[:task]) 139 | log_task(@task) 140 | redirect_to url_for_object(@task.user_story.sprint,@project,"show") 141 | else 142 | respond_to do |format| 143 | format.html { render :action => "edit" } 144 | format.xml { render :xml => @task.errors, :status => :unprocessable_entity } 145 | end 146 | end 147 | end 148 | 149 | # DELETE /tasks/1 150 | # DELETE /tasks/1.xml 151 | def destroy 152 | @task = Task.find(params[:id]) 153 | @task.destroy 154 | 155 | respond_to do |format| 156 | format.html { redirect_to :back } 157 | format.xml { head :ok } 158 | end 159 | end 160 | 161 | private 162 | def log_task(task) 163 | log = TaskLog.new 164 | log.user_id = User.current 165 | log.status_id= task.status_id 166 | log.task_id = task.id 167 | log.sprint_id = task.user_story.sprint.id 168 | log.save! 169 | end 170 | 171 | def find_project 172 | @project = Project.find(params[:project_id]) 173 | rescue ActiveRecord::RecordNotFound 174 | render_404 175 | end 176 | 177 | def retrieve_query 178 | if !params[:query_id].blank? 179 | cond = "project_id IS NULL" 180 | cond << " OR project_id = #{@project.id}" if @project 181 | @query = Query.find(params[:query_id], :conditions => cond) 182 | @query.project = @project 183 | session[:query] = {:id => @query.id, :project_id => @query.project_id} 184 | sort_clear 185 | else 186 | if params[:set_filter] || session[:query].nil? || session[:query][:project_id] != (@project ? @project.id : nil) 187 | # Give it a name, required to be valid 188 | @query = Query.new(:name => "_") 189 | @query.project = @project 190 | if params[:fields] and params[:fields].is_a? Array 191 | params[:fields].each do |field| 192 | @query.add_filter(field, params[:operators][field], params[:values][field]) 193 | end 194 | else 195 | @query.available_filters.keys.each do |field| 196 | @query.add_short_filter(field, params[field]) if params[field] 197 | end 198 | end 199 | @query.group_by = params[:group_by] 200 | @query.column_names = params[:query] && params[:query][:column_names] 201 | session[:query] = {:project_id => @query.project_id, :filters => @query.filters, :group_by => @query.group_by, :column_names => @query.column_names} 202 | else 203 | @query = Query.find_by_id(session[:query][:id]) if session[:query][:id] 204 | @query ||= Query.new(:name => "_", :project => @project, :filters => session[:query][:filters], :group_by => session[:query][:group_by], :column_names => session[:query][:column_names]) 205 | @query.project = @project 206 | end 207 | end 208 | end 209 | end 210 | -------------------------------------------------------------------------------- /app/controllers/user_stories_controller.rb: -------------------------------------------------------------------------------- 1 | class UserStoriesController < ApplicationController 2 | unloadable 3 | before_filter :find_project,:authorize, :only => [:new, :create, :edit, :update, :destroy] 4 | helper :sprints 5 | 6 | # GET /user_stories/1 7 | # GET /user_stories/1.xml 8 | def show 9 | @user_story = UserStory.find(params[:id]) 10 | @project = Project.find(@user_story.project_id) 11 | 12 | respond_to do |format| 13 | format.html # show.html.erb 14 | format.xml #{ render :xml => @user_story(:include => ) } 15 | end 16 | end 17 | 18 | # GET /user_stories/new 19 | # GET /user_stories/new.xml 20 | def new 21 | @user_story = UserStory.new 22 | @user_story.project_id = @project.id 23 | unless params[:sprint_id].nil? 24 | sprint = Version.find(params[:sprint_id]) 25 | unless sprint.nil? 26 | @user_story.version_id = sprint.id 27 | end 28 | else 29 | 30 | end 31 | render :partial => "user_stories/new", :locals => {:user_story => @user_story, :target => params[:target]} 32 | end 33 | 34 | # GET /user_stories/1/edit 35 | def edit 36 | @user_story = UserStory.find(params[:id]) 37 | render :partial => "user_stories/edit", :locals => {:user_story => @user_story, :target => params[:target]} 38 | end 39 | 40 | # POST /user_stories 41 | # POST /user_stories.xml 42 | def create 43 | @user_story = UserStory.new(params[:user_story]) 44 | @user_story.project_id = @project.id 45 | last_us =UserStory.find(:first, :conditions => ["project_id = ?",@project.id], :order => "us_number DESC") 46 | @user_story.us_number = last_us.nil? ? 1 : last_us.us_number + 1 47 | 48 | if @user_story.save 49 | render :update do |p| 50 | if @user_story.sprint.nil? 51 | unassigned_us = UserStory.find(:all, :conditions => ["version_id is null and project_id = ?", @project.id]) 52 | p.replace "no_US_0", "" if UserStory.find(:all, :conditions => ["version_id is null and project_id = ?",@project.id], :order => "priority ASC").size == 1 53 | p.insert_html :bottom, 'sprint_0', :partial => "user_stories/backlog_item", :locals => {:user_story => @user_story, :count => unassigned_us.size + 1} 54 | p["tab_us_#{@user_story.id}"].visual_effect :highlight, :duration => 2 55 | else 56 | if params[:target].blank? 57 | p.insert_html :bottom, "sprint_#{@user_story.version_id}", :partial => "user_stories/sprint_item", :locals => {:user_story => @user_story, :count => @user_story.sprint.user_stories.size + 1} 58 | p["tab_us_#{@user_story.id}"].visual_effect :highlight, :duration => 2 59 | p["no_US_#{@user_story.version_id}"].visual_effect :blind_up, :duration => 1 60 | else 61 | if params[:target].eql? "show" 62 | p.insert_html :bottom, "dashboard_main_table", :partial => "user_stories/us_for_show", :locals => {:user_story => @user_story, :count => (@user_story.sprint.user_stories.count + 1)} 63 | end 64 | end 65 | end 66 | end 67 | else 68 | respond_to do |format| 69 | format.html { render :action => "new" } 70 | format.xml { render :xml => @user_story.errors, :status => :unprocessable_entity } 71 | end 72 | end 73 | end 74 | 75 | # PUT /user_stories/1 76 | # PUT /user_stories/1.xml 77 | def update 78 | @user_story = UserStory.find(params[:id]) 79 | 80 | if @user_story.update_attributes(params[:user_story]) 81 | render :update do |p| 82 | # p.replace "tab_milestone_#{@user_story.id}", :partial => "user_stories/milestone_item", :locals => {:user_story => @user_story, :count => @user_story.milestone.user_stories.index(@user_story)} unless @user_story.milestone.nil? 83 | unless @user_story.sprint.nil? 84 | if params[:target].blank? 85 | p.replace "tab_us_#{@user_story.id}", :partial => "user_stories/sprint_item", :locals => {:user_story => @user_story, :count => @user_story.sprint.user_stories.index(@user_story)} 86 | else 87 | if params[:target].eql? "show" 88 | p.replace "tab_us_#{@user_story.id}", :partial => "user_stories/us_for_show", :locals => {:user_story => @user_story, :count => @user_story.sprint.user_stories.index(@user_story)} 89 | end 90 | end 91 | else 92 | unassigned_us = UserStory.find(:all, :conditions => ["version_id is null and project_id = ?", @project.id]) 93 | p.replace "tab_us_#{@user_story.id}", :partial => "user_stories/backlog_item", :locals => {:user_story => @user_story, :count => unassigned_us.size + 1} 94 | p["tab_us_#{@user_story.id}"].visual_effect :highlight, :duration => 2 95 | end 96 | end 97 | else 98 | respond_to do |format| 99 | format.html { render :action => "edit" } 100 | format.xml { render :xml => @user_story.errors, :status => :unprocessable_entity } 101 | end 102 | end 103 | end 104 | 105 | # DELETE /user_stories/1 106 | # DELETE /user_stories/1.xml 107 | def destroy 108 | sprint_id = -1 109 | @user_story = UserStory.find(params[:id]) 110 | user_story_id = @user_story.id 111 | unless @user_story.sprint.nil? 112 | sprint_id = @user_story.version_id if @user_story.sprint.user_stories.size == 1 113 | else 114 | unassigned_us = UserStory.find(:all, :conditions => ["version_id is null and project_id = ?", @project.id]) 115 | if unassigned_us.size == 1 116 | sprint_id = 0 117 | end 118 | end 119 | @user_story.destroy 120 | 121 | render :update do |p| 122 | p["tab_us_#{user_story_id}"].visual_effect :blind_up, :duration => 1 123 | if sprint_id != -1 124 | p.insert_html :bottom, "sprint_"+sprint_id.to_s, "
7 | <%= f.label :user_story_id %>
8 | <%= f.text_field :user_story_id %>
9 |
11 | <%= f.label :project_id %>
12 | <%= f.text_field :project_id %>
13 |
15 | <%= f.label :content_type %>
16 | <%= f.text_field :content_type %>
17 |
19 | <%= f.label :filename %>
20 | <%= f.text_field :filename %>
21 |
23 | <%= f.label :thumbnail %>
24 | <%= f.text_field :thumbnail %>
25 |
27 | <%= f.label :size %>
28 | <%= f.text_field :size %>
29 |
31 | <%= f.label :width %>
32 | <%= f.text_field :width %>
33 |
35 | <%= f.label :height %>
36 | <%= f.text_field :height %>
37 |
39 | <%= f.submit "Update" %> 40 |
41 | <% end %> 42 | 43 | <%= link_to 'Show', @diagram %> | 44 | <%= link_to 'Back', diagrams_path %> 45 | -------------------------------------------------------------------------------- /app/views/diagrams/index.html.erb: -------------------------------------------------------------------------------- 1 |User story | 6 |Project | 7 |Content type | 8 |Filename | 9 |Thumbnail | 10 |Size | 11 |Width | 12 |Height | 13 |||||
---|---|---|---|---|---|---|---|---|---|---|---|
<%=h diagram.user_story_id %> | 18 |<%=h diagram.project_id %> | 19 |<%=h diagram.content_type %> | 20 |<%=h diagram.filename %> | 21 |<%=h diagram.thumbnail %> | 22 |<%=h diagram.size %> | 23 |<%=h diagram.width %> | 24 |<%=h diagram.height %> | 25 |<%= link_to 'Show', diagram %> | 26 |<%= link_to 'Edit', edit_diagram_path(diagram) %> | 27 |<%= link_to 'Destroy', diagram, :confirm => 'Are you sure?', :method => :delete %> | 28 |<%= link_to image_tag(diagram.public_filename(:thumb)), diagram.public_filename %> | 29 |
9 | <%= f.label l('name') %>
10 | <%= f.text_field :name %>
11 |
13 |
14 | <%= f.file_field :uploaded_data %>
15 |
17 | <%= submit_tag l('create') %> 18 |
19 | <% end -%> 20 | 21 | 22 | <%# form_for(@diagram) do |f| %> 23 | <%#= f.error_messages %> 24 | 25 | <%#*%>
26 | <%#= f.label :user_story_id %>
27 | <%#= f.text_field :user_story_id %>
28 | <%#*
%>
30 | <%#= f.label :project_id %>
31 | <%#= f.text_field :project_id %>
32 | <%#*
%>
34 | <%#= f.label :content_type %>
35 | <%#= f.text_field :content_type %>
36 | <%#*
%>
38 | <%#= f.label :filename %>
39 | <%#= f.text_field :filename %>
40 | <%#*
%>
42 | <%#= f.label :thumbnail %>
43 | <%#= f.text_field :thumbnail %>
44 | <%#*
%>
46 | <%#= f.label :size %>
47 | <%#= f.text_field :size %>
48 | <%#*
%>
50 | <%#= f.label :width %>
51 | <%#= f.text_field :width %>
52 | <%#*
%>
54 | <%#= f.label :height %>
55 | <%#= f.text_field :height %>
56 | <%#*
%> 58 | <%#= f.submit "Create" %> 59 | <%#*
%> 60 | <%# end %> 61 | 62 | <%= link_to 'Back', :back %> 63 | -------------------------------------------------------------------------------- /app/views/diagrams/show.html.erb: -------------------------------------------------------------------------------- 1 |2 | User story: 3 | <%=h @diagram.user_story_id %> 4 |
5 | 6 |7 | Project: 8 | <%=h @diagram.project_id %> 9 |
10 | 11 |12 | Content type: 13 | <%=h @diagram.content_type %> 14 |
15 | 16 |17 | Filename: 18 | <%=h @diagram.filename %> 19 |
20 | 21 |22 | Thumbnail: 23 | <%=h @diagram.thumbnail %> 24 |
25 | 26 |27 | Size: 28 | <%=h @diagram.size %> 29 |
30 | 31 |32 | Width: 33 | <%=h @diagram.width %> 34 |
35 | 36 |37 | Height: 38 | <%=h @diagram.height %> 39 |
40 | 41 | 42 | <%= link_to 'Edit', edit_diagram_path(@diagram) %> | 43 | <%= link_to 'Back', diagrams_path %> 44 | -------------------------------------------------------------------------------- /app/views/documentations/_documentation.html.erb: -------------------------------------------------------------------------------- 1 |Proszę wybrać język programowania projektu:
10 | 14 | <%= submit_tag 'Ustaw' %> 15 | <% end %> 16 | <% else %> 17 |18 | Repozytorium jest w wersji: <%= repo.changesets.first.revision %> 19 |
20 |21 | Akcje: 22 | <%= link_to image_tag("/plugin_assets/redmine_sprints/images/repo_update.png", :title => "Uaktualnij lokalne repozytorium"), 23 | {:controller => "documentations", :action => :update_repo, :project_id => project.identifier}, :method => :post %> 24 | <%= link_to image_tag("/plugin_assets/redmine_sprints/images/doc_generate.png", :title => "Generuj dokumentację"), 25 | {:controller => "documentations", :action => :generate_documentation, :project_id => project.identifier}, :method => :post %> 26 |
27 | <%= render(:partial => "documentations/languages/#{setup.language.downcase}", :locals => {:project => project, :setup => setup}) %> 28 | <% end %> 29 | <% else %> 30 |31 | Skonfigurój najpierw repozytorium. 32 |
33 | <% end %> 34 |3 | Dokumentacja: 4 | <%= link_to image_tag("/plugin_assets/redmine_sprints/images/api.png", :title => "API projektu"), 5 | {:controller => "documentations", :action => :show_api, :project_id => project.identifier} %> 6 |
7 |
8 | <%= lightbox_link_to image_tag("/plugin_assets/redmine_sprints/images/model.png")+ "Diagram modelu", "/projects/#{project.identifier}/chart/models.png" %>
9 | <%= lightbox_link_to image_tag("/plugin_assets/redmine_sprints/images/controller.png")+ "Diagram kontrolerów", "/projects/#{project.identifier}/chart/controllers.png" %>
10 |
<%= f.select :tracker_id, @project.trackers.collect {|t| [t.name, t.id]}, :required => true %>
3 | <%= observe_field :issue_tracker_id, :url => { :action => :new, :project_id => @project, :user_story_id => @issue.user_story, :reload => true }, 4 | :update => :new_issue_remote_form, 5 | :with => "Form.serialize('issue-form')" %> 6 | <% end %> 7 | 8 | <%= f.hidden_field :user_story_id %> 9 |<%= f.text_field :subject, :size => 80, :required => true %>
11 |<%= f.text_area :description, 12 | :cols => 60, 13 | :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min), 14 | :accesskey => accesskey(:edit) %>
15 |<%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %>
20 | <% else %> 21 |<%= @issue.status.name %>
22 | <% end %> 23 | 24 |<%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %>
25 |<%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %>
26 | <% unless @project.issue_categories.empty? %> 27 |<%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %> 28 | <%= prompt_to_remote(l(:label_issue_category_new), 29 | l(:label_issue_category_new), 'category[name]', 30 | {:controller => 'projects', :action => 'add_issue_category', :id => @project}, 31 | :class => 'small', :tabindex => 199) if authorize_for('projects', 'add_issue_category') %>
32 | <% end %> 33 | <%#= content_tag('p', f.select(:fixed_version_id, 34 | (@project.versions.sort.collect {|v| [v.name, v.id]}), 35 | { :include_blank => true })) unless @project.versions.empty? %> 36 |<%= f.text_field :start_date, :size => 10 %><%= calendar_for('issue_start_date') %>
40 |<%= f.text_field :due_date, :size => 10 %><%= calendar_for('issue_due_date') %>
41 |<%= f.text_field :estimated_hours, :size => 3 %> <%= l(:field_hours) %>
42 |<%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
43 |<%= render :partial => 'attachments/form' %>
50 | <% end %> 51 | 52 | <% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%> 53 |54 | <% @issue.project.users.sort.each do |user| -%> 55 | 56 | <% end -%> 57 |
58 | <% end %> 59 | 60 | <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %> 61 | 62 | -------------------------------------------------------------------------------- /app/views/issue_sprints/_new.rhtml: -------------------------------------------------------------------------------- 1 | 2 |
8 | <%= f.label l('name') %>
9 | <%= f.text_field :target %>
10 |
12 | <%= f.label l('deadline') %>
13 | <%= f.text_field :deadline, :size => 10 %><%= calendar_for('milestone_deadline') %>
14 |
16 | <%= f.submit l("add"), :onclick => 'Modalbox.hide()' %> 17 |
18 | <% end %> 19 | 20 | <%= wikitoolbar_for 'user_story_description' %> 21 |
6 | 7 | <%= milestone.target %> 8 |9 | |
10 |
11 |
12 |
19 |
18 | |
20 |
21 | 22 | <%= link_to image_tag("/plugin_assets/redmine_sprints/images/edit.png")+ "Edytuj", 23 | {:controller => :milestones, :action => :edit, :project_id => @project, :id => milestone.id}, 24 | {:id => "new_us", :title => "Edycja kamienia milowego", 25 | :onclick => "Modalbox.show(this.href, {title: this.title, width: 370}); return false;"} 26 | %> 27 | <%= link_to_remote image_tag("/plugin_assets/redmine_sprints/images/delete.png",:title => l('delete'))+" Usuń", 28 | :url => {:controller => :milestones, :action => :destroy, :project_id => @project, :id => milestone.id}, 29 | :confirm => 'Are you sure?' 30 | %> 31 | 32 | |
33 |
36 | | Punkty <%= data[:done] %>/<%= data[:all_points] %> | 37 |<%= image_tag("/plugin_assets/redmine_sprints/images/time_end.png", :class => "middle") %> Termin: <%= milestone.deadline %> |
38 |
ID | 48 |Historia użytkownika | 49 |Sprint | 50 |Priorytet | 51 |Status | 52 |Akcje | 53 |
---|---|---|---|---|---|
Przeciągnij historie użytkowników tutaj, aby przypisać ją do tego kamienia milowego. | 62 |
8 | <%= f.label l('target') %>
9 | <%= f.text_field :target %>
10 |
12 | <%= f.label l('deadline') %>
13 | <%= f.text_field :deadline, :size => 10 %><%= calendar_for('milestone_deadline') %>
14 |
16 | <%= f.submit l('add'), :onclick => 'Modalbox.hide()' %> 17 |
18 | <% end %> 19 | 20 | <%= wikitoolbar_for 'user_story_description' %> 21 |<%= l('total_story_points') %> | 9 |<%= l('pending') %> | 10 |<%= l('in_progress') %> | 11 |<%= l('done') %> | 12 |<%= l('percent_done') %> | 13 |
---|---|---|---|---|
17 | <%= image_tag "/plugin_assets/redmine_sprints/images/sum.png", :alt => l("sum"), :class => "sprint_stats_icon" %> 18 | <%= data[:all_points] %> 19 | | 20 |21 | <%= image_tag "/plugin_assets/redmine_sprints/images/pending.png", :alt => l("pending"), :class => "sprint_stats_icon" %> 22 | <%= data[:pending] %> 23 | | 24 |25 | <%= image_tag "/plugin_assets/redmine_sprints/images/inprogress.png", :alt => l("in_progress"), :class => "sprint_stats_icon" %> 26 | <%= data[:in_progress] %> 27 | | 28 |29 | <%= image_tag "/plugin_assets/redmine_sprints/images/done.png", :alt => l("done"), :class => "sprint_stats_icon" %> 30 | <%= data[:done] %> 31 | | 32 |33 | <%= sprintf("%.2f",data[:percent_done]) %>% 34 | | 35 |
<%= l('total_story_points') %> | 5 |<%= l('done') %> | 6 |<%= l('percent_done') %> | 7 |
---|---|---|
10 | <%= @data[:all_points] %> 11 | | 12 |13 | <%= @data[:done] %> 14 | | 15 |16 | <%= @data[:percent_done] %> 17 | | 18 |
7 | <%= link_to task.subject, :controller => "issues", :action => "show", :id => task.id %> 8 | | 9 |||
12 |
13 | <%= task.description.first(30) %>
14 |
15 | |
16 | ||
19 | 20 | <%= image_tag("/plugin_assets/redmine_sprints/images/user.png", :class => "middle") -%> 21 | <%= User.find(task.assigned_to_id).login unless task.assigned_to_id.nil? -%> 22 | 30 | 29 | |
31 | 32 | <%= t("status") %>: <%= task.status.name %> 33 | 40 | | 41 |42 | |
%>
9 | <%#= f.label :sprint_no %>
10 | <%#= f.spinbox_field :sprint_no %>
11 | <%#*
%>
13 | <%#= f.label :target %>
14 | <%#= f.text_field :target %>
15 | <%#*
%>
17 | <%#= f.label 'Początek sprintu' %>
18 | <%#= f.text_field :start_date, :size => 10 %>
19 | <%#= calendar_for('sprint_start_date') %>
20 | <%#*
%> 22 | <%#= f.submit "Uaktualnij", :onclick => 'Modalbox.hide()' %> 23 | <%#*
%> 24 | 25 | <% end %> 26 | -------------------------------------------------------------------------------- /app/views/sprints/_form.rhtml: -------------------------------------------------------------------------------- 1 | <%= error_messages_for 'version' %> 2 | 3 |<%= f.text_field :name, :size => 60, :required => true %>
5 |<%= f.text_field :description, :size => 60 %>
6 |<%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %>
7 |<%= f.text_field :effective_date, :size => 10 %><%= calendar_for('sprint_effective_date') %>
8 |%> 13 | <%#= f.label :sprint_no %> 14 | <%#* | %> 15 | <%#*%> 16 | <%#= f.spinbox_field :sprint_no %> 17 | <%#* | %> 18 | <%#*
%> 22 | <%#= f.label 'Początek sprintu' %> 23 | <%#* | %> 24 | <%#*%> 25 | <%#= f.text_field :start_date, :size => 10 %> 26 | <%#= calendar_for('sprint_start_date') %> 27 | <%#* | %> 28 | <%#*
%> 32 | <%#= f.label 'Czas trwania' %> 33 | <%#* | %> 34 | <%#*%> 35 | <%#= f.spinbox_field :duration %> 36 | <%#* | %> 37 | <%#*
%> 41 | <%#= f.label :cel_sprintu %> 42 | <%#* | %> 43 | <%#*%> 44 | <%#= f.text_field :target %> 45 | <%#* | %> 46 | <%#*
%> 49 | <%#* | %> 50 | <%#= f.submit "Dodaj", :onclick => 'Modalbox.hide()' %> 51 | <%#* | %> 52 | <%#*
ID | 16 |<%= l('user_story') %> | 17 |<%= l('priority') %> | 18 |<%= l('estimation') %> | 19 |<%= l('actions') %> | 20 |
---|---|---|---|---|
34 | <%= l('add_user_stories_are_assign') %> 35 | |
36 |
9 | 10 | <%= link_to sprint.name, 11 | {:controller => :sprints, :action => "show", :id => sprint.id, :project_id => @project.identifier }, :id => "sprint_name_#{sprint.id}" %> 12 |13 | |
14 | "> 15 | <%= render(:partial => "shared/percent_done", :locals => {:data => data}) %> 16 | | 17 |
18 | 19 | <%= link_to image_tag("/plugin_assets/redmine_sprints/images/edit.png")+ l("edit"), 20 | {:controller => :sprints, :action => :edit, :project_id => @project, :id => sprint.id}, 21 | {:id => "new_us", :title => l('sprint_edit'), 22 | :onclick => "Modalbox.show(this.href, {title: this.title, width: 700}); return false;"} 23 | %> 24 | <%= link_to_remote image_tag("/plugin_assets/redmine_sprints/images/delete.png",:title => l('delete'))+" " +l('delete'), 25 | :url => {:controller => :sprints, :action => :destroy, :project_id => @project, :id => sprint.id}, 26 | :confirm => l('Are you sure?') 27 | %> 28 | 29 | |
30 |
<%= l('id') %> | 49 |<%= l('user_story') %> | 50 |<%= l('status') %> | 51 |<%= l('actions') %> | 52 |
---|---|---|---|
74 | <%= l('drag_user_story_here_to_assign_it_to_sprint') %> 75 | | 76 |
<%= image_tag("/plugin_assets/redmine_sprints/images/time.png", :class => "middle") %> <%= sprint.duration -%> <%= l('days') %>
<%= image_tag("/plugin_assets/redmine_sprints/images/time_end.png", :class => "middle") %> <%= l('ends_on') %>: <%= sprint.effective_date %>
7 | <%= f.label :sprint_no %>
8 | <%= f.text_field :sprint_no %>
9 |
11 | <%= f.label :target %>
12 | <%= f.text_field :target %>
13 |
15 | <%= f.submit "Update" %> 16 |
17 | <% end %> 18 | 19 | -------------------------------------------------------------------------------- /app/views/sprints/index.html.erb: -------------------------------------------------------------------------------- 1 | 2 |<%= image_tag(@chart.chart(600,200)) unless @chart.blank? %>
6 | <%= render(:partial => "shared/project_stats", :locals => {:project => @project}) %> 7 | <%= render(:partial => "sprints/product_backlog") %> 8 | <%#= render(:partial => "milestones/milestones") %> 9 |
7 | <%= f.label :sprint_no %>
8 |
9 | <%= f.text_field :sprint_no, :class =>"numerical" %> 10 | | 11 | |
12 | |
16 | <%= f.label 'Początek sprintu' %>
17 | <%= f.date_select :start_date, :order => [:day, :month, :year] %>
18 |
20 | <%= f.label 'Czas trwania' %>
21 |
22 | <%= f.text_field :duration, :class =>"numerical" %> 23 | | 24 | |
25 | |
28 | <%= f.label :cel_sprintu %>
29 | <%= f.text_field :target %>
30 |
32 | <%= f.submit "Dodaj" %> 33 |
34 | <% end %> 35 | 36 | -------------------------------------------------------------------------------- /app/views/sprints/show.html.erb: -------------------------------------------------------------------------------- 1 | <%# form_for :sprint, :url => '/sprints/show', :method => :get do |select_form| %> 2 | 3 |<%= image_tag(@chart.chart(960,150)) unless @chart.blank? %>
4 | <% form_tag({:controller => :sprints, :action => :show},{:method => :get}) do %> 5 |<%= label_tag l('sprints') -%> 6 | <%= collection_select( :sprint, :id, Version.find_all_by_project_id(@project.id), :id, :name, {:selected => @sprint.id }) -%> 7 | <%= submit_tag l('choose') %> 8 |
9 | <% end %> 10 | 11 | 12 | <% data = load_sprint_stats(@sprint, []) %> 13 |18 | "><%=h @sprint.name %> 19 | | 20 |"> 21 | <%= render(:partial => "shared/percent_done", :locals => {:data => data}) %> 22 | | 23 |24 | <%= link_to image_tag("/plugin_assets/redmine_sprints/images/edit.png"), 25 | {:controller => :sprints, :action => :edit, :project_id => @project, :id => @sprint.id}, 26 | {:id => "new_us", :title => l('sprint_edit'), 27 | :onclick => "Modalbox.show(this.href, {title: this.title, width: 700}); return false;"} 28 | %> 29 | <%= link_to_object(@sprint, "destroy", "delete") %> 30 | <%= link_to_new_object("user_story", @sprint, "story_add") %> 31 | | 32 |
"><%= l('sprint_description') %>: <%=h @sprint.description %> | 35 |||
<%= l('user_story') %> | 50 |51 | | <%= image_tag("/plugin_assets/redmine_sprints/images/pending.png", :class => "middle") %> <%= l('pending') %> | 52 |<%= image_tag("/plugin_assets/redmine_sprints/images/inprogress.png", :class => "middle") %> <%= l('in_progress') %> | 53 |<%= image_tag("/plugin_assets/redmine_sprints/images/done.png", :class => "middle") %> <%= l('done') %> | 54 |
---|---|---|---|---|
57 | <%= link_to image_tag("/plugin_assets/redmine_sprints/images/story_add.png")+ l('new_user_story'), 58 | {:controller => 'user_stories',:action => 'new', :project_id => @project, :sprint_id => @sprint.id, :target => "show" }, 59 | {:id => "new_us2", :title => l('new_user_story'), 60 | :onclick => "Modalbox.show(this.href, {title: this.title, width: 370}); return false;", 61 | :style => "padding-left:55px;"} 62 | %> 63 | | 64 |
78 | <%= t("label_issue_plural") %> 79 | | 80 |
7 | <%= f.label :name %>
8 | <%= f.text_field :name %>
9 |
11 | <%= f.label :opis %>
12 | <%= f.text_area :description,
13 | :cols => 60,
14 | :rows => (@task.description.blank? ? 10 : [[10, @task.description.length / 50].max, 100].min),
15 | :accesskey => accesskey(:edit),
16 | :class => 'wiki-edit' %>
17 |
19 | <%= f.label :developerzy %> 20 | <%= collection_multiple_select('task', 'user_ids', project_developers, :id, :name) %> 21 |
22 |
23 | <%= f.label :status %>
24 | <%= f.collection_select( :status_id, Status.find(:all), :id, :name) %>
25 |
27 | <%= f.submit "Update" %> 28 |
29 | <% end %> 30 | 31 | <%= link_to 'Back', :back %> 32 | <%= wikitoolbar_for 'task_description' %> 33 | -------------------------------------------------------------------------------- /app/views/tasks/index.html.erb: -------------------------------------------------------------------------------- 1 |Nazwa | 6 |Opis | 7 |Status | 8 |||||
---|---|---|---|---|---|---|
<%=h task.name %> | 13 |<%= task.description %> | 14 |<%=h task.status_id %> | 15 |<%=h task.user_story_id %> | 16 |<%= link_to 'Show', task %> | 17 |<%= link_to 'Edit', edit_task_path(task) %> | 18 |<%= link_to 'Destroy', task, :confirm => 'Are you sure?', :method => :delete %> | 19 |
<%= l(:label_no_data) %>
47 | <% else %> 48 |52 | <%= render :partial => "shared/task_view", :locals => {:task => task, :issue_statuses => @issue_statuses, 53 | :project_users => @project_users} %> 54 | | 55 |
<%= pagination_links_full @issue_pages, @issue_count %>
59 | <% end %> 60 | <% end %> 61 | -------------------------------------------------------------------------------- /app/views/tasks/new.html.erb: -------------------------------------------------------------------------------- 1 |
6 | <%= f.label :nazwa %>
7 | <%= f.text_field :name %>
8 |
10 | <%= f.label :opis %>
11 | <%= f.text_area :description,
12 | :cols => 60,
13 | :rows => (@task.description.blank? ? 10 : [[10, @task.description.length / 50].max, 100].min),
14 | :accesskey => accesskey(:edit),
15 | :class => 'wiki-edit' %>
16 |
18 | <%= f.label :developerzy %> 19 | <%#= project_developers[0].class.name.to_s %> 20 | <%= collection_multiple_select('task', 'user_ids', project_developers, :id, :name) %> 21 |
22 |
23 | <%= f.label :status %>
24 | <%= f.collection_select( :status_id, Status.find(:all), :id, :name) %>
25 |
27 | <%= f.submit "Dodaj" %> 28 |
29 | <% end %> 30 | 31 | <%= link_to 'Back', :back %> 32 | <%= wikitoolbar_for 'task_description' %> 33 | -------------------------------------------------------------------------------- /app/views/tasks/show.html.erb: -------------------------------------------------------------------------------- 1 |2 | Name: 3 | <%=h @task.name %> 4 |
5 | 6 |7 | Description: 8 | <%= @task.description %> 9 |
10 | 11 |12 | Status: 13 | <%=h Status.find(@task.status_id).name %> 14 |
15 | 16 |17 | User story: 18 | <%=h @task.user_story_id %> 19 |
20 | 21 | 22 | <%= link_to 'Edit', edit_task_path(@task) %> | 23 | <%= link_to 'Back', tasks_path %> 24 | -------------------------------------------------------------------------------- /app/views/user_stories/_backlog_item.erb: -------------------------------------------------------------------------------- 1 |
8 | <%= f.label l :name %>
9 | <%= f.text_field :name %>
10 |
12 | <%= f.label l :description %>
13 |
<%= f.text_area :description, 14 | :cols => 60, 15 | :rows => (@user_story.description.blank? ? 10 : [[10, @user_story.description.length / 50].max, 100].min), 16 | :accesskey => accesskey(:edit), 17 | :class => 'wiki-edit' %>
18 | 19 |
20 | <%= f.label l('priority') %>
21 | <%= f.spinbox_field :priority, :value => @user_story.priority, :align => "right" %>
22 |
24 | <%= f.label l('estimation') %>
25 | <%= f.collection_select( :time_estimate_id, TimeEstimate.find(:all), :id, :estimation) %>
26 |
29 | <%= f.submit l('update'), :onclick => 'Modalbox.hide()' %> 30 |
31 | <% end %> 32 | 33 | <%= wikitoolbar_for 'user_story_description' %> 34 |
8 | <%= f.label l('name') %>
9 | <%= f.text_field :name %>
10 |
12 | <%= f.label l('description') %>
13 |
<%= f.text_area :description, 14 | :cols => 60, 15 | :rows => (@user_story.description.blank? ? 10 : [[10, @user_story.description.length / 50].max, 100].min), 16 | :accesskey => accesskey(:edit), 17 | :class => 'wiki-edit' %>
18 | 19 |
20 | <%= f.label l('priority') %>
21 | <%= f.spinbox_field :priority, :value => 1, :align => "right" %>
22 |
24 | <%= f.label l('estimation') %>
25 | <%= f.collection_select( :time_estimate_id, TimeEstimate.find(:all), :id, :estimation) %>
26 |
29 | <%= f.submit l('add'), :onclick => 'Modalbox.hide()' %> 30 |
31 | <% end %> 32 | 33 | <%= wikitoolbar_for 'user_story_description' %> 34 |11 | |
12 |
13 |
28 |
| 29 | | ||||||
#<%= user_story.us_number %> |
21 | <%=h user_story.name %>(P<%= user_story.priority %>) | 22 |23 | 24 | <%#= link_to_object(user_story, "show", "story") %> 25 | <%= link_to image_tag("/plugin_assets/redmine_sprints/images/story_edit.png"), 26 | {:controller => :user_stories, :action => :edit, :project_id => @project, :id => user_story.id, :target => "show"}, 27 | {:id => "edit_us", :title => l('user_story_edit'), :onclick => "Modalbox.show(this.href, {title: this.title, width: 370}); return false;"} 28 | %> 29 | <%= link_to_remote image_tag("/plugin_assets/redmine_sprints/images/delete.png",:title => l('delete')), 30 | :url => {:controller => :user_stories, :action => :destroy, :project_id => @project, :id => user_story.id, :confirm => 'Are you sure?', :method => :post}, 31 | :confirm => l('Are you sure?') 32 | %> 33 | | 34 |
37 | <%= user_story.description -%> 38 | | 39 | 40 |||
43 |
44 | <% for diagram in user_story.diagrams %>
45 | <%= link_to image_tag(diagram.public_filename(:thumb)), diagram.public_filename, :rel => "lightbox", :title => diagram.name %>
46 |
47 | <%= link_to_object(diagram, "destroy", "delete") %>
48 |
49 | <% end %>
50 |
51 | |
52 | 53 | | 54 ||
57 | 58 | <%= image_tag("/plugin_assets/redmine_sprints/images/estimation.png", :class => "middle") %> <%= user_story.time_estimate.estimation -%> 59 | 60 | |
61 | 62 | <%= link_to_new_object("diagram",user_story,"diagram_add") %> 63 | | 64 |
7 | <%= f.label :nazwa %>
8 | <%= f.text_field :name %>
9 |
11 | <%= f.label :opis %>
12 |
<%= f.text_area :description, 13 | :cols => 60, 14 | :rows => (@user_story.description.blank? ? 10 : [[10, @user_story.description.length / 50].max, 100].min), 15 | :accesskey => accesskey(:edit), 16 | :class => 'wiki-edit' %>
17 | 18 |
19 | <%= f.label :iteracje %>
20 | <%= f.collection_select( :sprint_id, Version.find_all_by_project_id(@project), :id, :sprint_no) %>
21 |
23 | <%= f.label :estymacja %>
24 | <%= f.collection_select( :time_estimate_id, TimeEstimate.find(:all), :id, :estimation) %>
25 |
27 | <%= f.submit "Update" %> 28 |
29 | <% end %> 30 | 31 | <%= link_to_object(@user_story,"show","show") %> | 32 | <%= link_to 'Back', :back %> 33 | <%= wikitoolbar_for 'user_story_description' %> 34 | -------------------------------------------------------------------------------- /app/views/user_stories/index.html.erb: -------------------------------------------------------------------------------- 1 |Name | 6 |Description | 7 |Sprint | 8 |Project | 9 ||||
---|---|---|---|---|---|---|
<%=h user_story.name %> | 14 |<%= user_story.description %> | 15 |<%=h user_story.sprint_id %> | 16 |<%=h user_story.project_id %> | 17 |<%= link_to 'Show', user_story %> | 18 |<%= link_to 'Edit', edit_user_story_path(user_story) %> | 19 |<%= link_to 'Destroy', user_story, :confirm => 'Are you sure?', :method => :delete %> | 20 |
7 | <%= f.label :nazwa %>
8 | <%= f.text_field :name %>
9 |
11 | <%= f.label :opis %>
12 |
<%= f.text_area :description, 14 | :cols => 60, 15 | :rows => (@user_story.description.blank? ? 10 : [[10, @user_story.description.length / 50].max, 100].min), 16 | :accesskey => accesskey(:edit), 17 | :class => 'wiki-edit' %>
18 |
22 | <%= f.label :estymacja %>
23 | <%= f.collection_select( :time_estimate_id, TimeEstimate.find(:all), :id, :estimation) %>
24 |
26 | <%= f.submit "Dodaj" %> 27 |
28 | <% end %> 29 | 30 | <%= link_to 'Back', :back %> 31 | <%= wikitoolbar_for 'user_story_description' %> 32 | -------------------------------------------------------------------------------- /app/views/user_stories/show.html.erb: -------------------------------------------------------------------------------- 1 |2 | Nazwa: 3 | <%=h @user_story.name %> 4 |
5 | 6 |7 | Opis: 8 | <%= @user_story.description %> 9 |
10 | 11 |12 | Iteracja: 13 | <%=h @user_story.sprint_id %> 14 |
15 | 16 |17 | Project: 18 | <%=h @project.name %> 19 |
20 | 21 | 22 | 23 | <%= link_to_object(@user_story, "edit", "edit") %> | 24 | <%= link_to 'Back', :back %> 25 | -------------------------------------------------------------------------------- /assets/attachments/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 85 4 | /svn/repository/scrumpm/!svn/ver/26/vendor/plugins/redmine_sprints/assets/attachments 5 | END 6 | -------------------------------------------------------------------------------- /assets/attachments/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 31 5 | http://212.127.65.80/svn/repository/scrumpm/vendor/plugins/redmine_sprints/assets/attachments 6 | http://212.127.65.80/svn/repository/scrumpm 7 | 8 | 9 | 10 | 2009-06-24T09:47:51.930117Z 11 | 26 12 | blue 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | c18538f3-9cb4-41a2-b4bd-623a2398b3b0 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | empty 36 | 37 | -------------------------------------------------------------------------------- /assets/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/Thumbs.db -------------------------------------------------------------------------------- /assets/images/accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/accept.png -------------------------------------------------------------------------------- /assets/images/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/add.png -------------------------------------------------------------------------------- /assets/images/api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/api.png -------------------------------------------------------------------------------- /assets/images/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/back.png -------------------------------------------------------------------------------- /assets/images/backlog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/backlog.png -------------------------------------------------------------------------------- /assets/images/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/blank.gif -------------------------------------------------------------------------------- /assets/images/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/cancel.png -------------------------------------------------------------------------------- /assets/images/charts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/charts.png -------------------------------------------------------------------------------- /assets/images/close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/close.gif -------------------------------------------------------------------------------- /assets/images/closelabel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/closelabel.gif -------------------------------------------------------------------------------- /assets/images/controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/controller.png -------------------------------------------------------------------------------- /assets/images/dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/dashboard.png -------------------------------------------------------------------------------- /assets/images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/delete.png -------------------------------------------------------------------------------- /assets/images/diagram_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/diagram_add.png -------------------------------------------------------------------------------- /assets/images/done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/done.png -------------------------------------------------------------------------------- /assets/images/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/down.gif -------------------------------------------------------------------------------- /assets/images/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/down.png -------------------------------------------------------------------------------- /assets/images/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/edit.png -------------------------------------------------------------------------------- /assets/images/estimation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/estimation.png -------------------------------------------------------------------------------- /assets/images/files/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/Thumbs.db -------------------------------------------------------------------------------- /assets/images/files/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/c.png -------------------------------------------------------------------------------- /assets/images/files/csharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/csharp.png -------------------------------------------------------------------------------- /assets/images/files/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/default.png -------------------------------------------------------------------------------- /assets/images/files/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/image.png -------------------------------------------------------------------------------- /assets/images/files/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/pdf.png -------------------------------------------------------------------------------- /assets/images/files/php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/php.png -------------------------------------------------------------------------------- /assets/images/files/ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/ruby.png -------------------------------------------------------------------------------- /assets/images/files/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/text.png -------------------------------------------------------------------------------- /assets/images/files/xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/xml.png -------------------------------------------------------------------------------- /assets/images/files/zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/files/zip.png -------------------------------------------------------------------------------- /assets/images/inprogress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/inprogress.png -------------------------------------------------------------------------------- /assets/images/milestone_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/milestone_add.png -------------------------------------------------------------------------------- /assets/images/milestone_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/milestone_edit.png -------------------------------------------------------------------------------- /assets/images/milestones.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/milestones.png -------------------------------------------------------------------------------- /assets/images/model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/model.png -------------------------------------------------------------------------------- /assets/images/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/next.gif -------------------------------------------------------------------------------- /assets/images/nextlabel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/nextlabel.gif -------------------------------------------------------------------------------- /assets/images/pending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/pending.png -------------------------------------------------------------------------------- /assets/images/prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/prev.gif -------------------------------------------------------------------------------- /assets/images/prevlabel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/prevlabel.gif -------------------------------------------------------------------------------- /assets/images/repo_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/repo_edit.png -------------------------------------------------------------------------------- /assets/images/repo_update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/repo_update.png -------------------------------------------------------------------------------- /assets/images/show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/show.png -------------------------------------------------------------------------------- /assets/images/spinbtn_updn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/spinbtn_updn.gif -------------------------------------------------------------------------------- /assets/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/spinner.gif -------------------------------------------------------------------------------- /assets/images/story.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/story.png -------------------------------------------------------------------------------- /assets/images/story_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/story_add.png -------------------------------------------------------------------------------- /assets/images/story_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/story_delete.png -------------------------------------------------------------------------------- /assets/images/story_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/story_edit.png -------------------------------------------------------------------------------- /assets/images/sub.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/sub.gif -------------------------------------------------------------------------------- /assets/images/sum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/sum.png -------------------------------------------------------------------------------- /assets/images/task_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/task_add.png -------------------------------------------------------------------------------- /assets/images/task_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/task_delete.png -------------------------------------------------------------------------------- /assets/images/task_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/task_edit.png -------------------------------------------------------------------------------- /assets/images/task_show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/task_show.png -------------------------------------------------------------------------------- /assets/images/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/time.png -------------------------------------------------------------------------------- /assets/images/time_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/time_add.png -------------------------------------------------------------------------------- /assets/images/time_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/time_end.png -------------------------------------------------------------------------------- /assets/images/tooltip/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/tooltip/Thumbs.db -------------------------------------------------------------------------------- /assets/images/tooltip/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/tooltip/bottom.png -------------------------------------------------------------------------------- /assets/images/tooltip/bottom_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/tooltip/bottom_left.png -------------------------------------------------------------------------------- /assets/images/tooltip/bottom_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/tooltip/bottom_right.png -------------------------------------------------------------------------------- /assets/images/tooltip/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/tooltip/left.png -------------------------------------------------------------------------------- /assets/images/tooltip/pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/tooltip/pin.png -------------------------------------------------------------------------------- /assets/images/tooltip/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/tooltip/right.png -------------------------------------------------------------------------------- /assets/images/tooltip/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/tooltip/top.png -------------------------------------------------------------------------------- /assets/images/tooltip/top_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/tooltip/top_left.png -------------------------------------------------------------------------------- /assets/images/tooltip/top_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/tooltip/top_right.png -------------------------------------------------------------------------------- /assets/images/up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/up.gif -------------------------------------------------------------------------------- /assets/images/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/up.png -------------------------------------------------------------------------------- /assets/images/us-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/us-bottom.png -------------------------------------------------------------------------------- /assets/images/us-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/us-top.png -------------------------------------------------------------------------------- /assets/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/software-project/scrum-pm/1df2aa6dd7dfe3484926e7256c6bb512b0f17f65/assets/images/user.png -------------------------------------------------------------------------------- /assets/javascripts/fastinit.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2006 Andrew Tetlaw 4 | * 5 | * Permission is hereby granted, free of charge, to any person 6 | * obtaining a copy of this software and associated documentation 7 | * files (the "Software"), to deal in the Software without 8 | * restriction, including without limitation the rights to use, copy, 9 | * modify, merge, publish, distribute, sublicense, and/or sell copies 10 | * of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 21 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | * * 25 | * 26 | /* 27 | * FastInit 28 | * http://tetlaw.id.au/view/blog/prototype-class-fastinit/ 29 | * Andrew Tetlaw 30 | * Version 1.2 (2006-10-19) 31 | * Based on: 32 | * http://dean.edwards.name/weblog/2006/03/faster 33 | * http://dean.edwards.name/weblog/2006/06/again/ 34 | * 35 | */ 36 | var FastInit = { 37 | done : false, 38 | onload : function() { 39 | if (FastInit.done) return; 40 | FastInit.done = true; 41 | FastInit.actions.each(function(func) { 42 | func(); 43 | }) 44 | }, 45 | actions : $A([]), 46 | addOnLoad : function() { 47 | for(var x = 0; x < arguments.length; x++) { 48 | var func = arguments[x]; 49 | if(!func || typeof func != 'function') continue; 50 | FastInit.actions.push(func); 51 | } 52 | } 53 | } 54 | 55 | if (/WebKit|khtml/i.test(navigator.userAgent)) { 56 | var _timer = setInterval(function() { 57 | if (/loaded|complete/.test(document.readyState)) { 58 | clearInterval(_timer); 59 | delete _timer; 60 | FastInit.onload(); 61 | } 62 | }, 10); 63 | } 64 | if (document.addEventListener) { 65 | document.addEventListener('DOMContentLoaded', FastInit.onload, false); 66 | FastInit.legacy = false; 67 | } 68 | 69 | Event.observe(window, 'load', FastInit.onload); 70 | 71 | 72 | /*@cc_on @*/ 73 | /*@if (@_win32) 74 | document.write('' 16 | tag+script 17 | end 18 | 19 | end 20 | 21 | class FormBuilder 22 | def spinbox_field(method, options = {}) 23 | @template.spinbox_field(@object_name, method, options) 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/hooks.rb: -------------------------------------------------------------------------------- 1 | module RedmineSprints 2 | class Hooks < Redmine::Hook::ViewListener 3 | render_on :view_issues_form_details_bottom, :partial => 'issue_sprints/user_story_field' 4 | render_on :view_issues_show_details_bottom, :partial => "issue_sprints/redirect_after_create" 5 | 6 | def controller_issues_new_before_save(context = {}) 7 | context[:issue].user_story_id = context[:params][:issue][:user_story_id] 8 | if context[:issue].user_story_id && context[:issue].fixed_version_id 9 | if context[:issue].id 10 | context[:issue].redirect_to = url_for(:controller => :sprints, :action => "show", :id => context[:issue].fixed_version_id, :project_id => context[:issue].project.identifier)+"/"+context[:issue].id 11 | else 12 | context[:issue].redirect_to = url_for(:controller => :sprints, :action => "show", :id => context[:issue].fixed_version_id, :project_id => context[:issue].project.identifier) 13 | end 14 | puts ":controller_issues_new_before_save 99" 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/issue_patch.rb: -------------------------------------------------------------------------------- 1 | require_dependency 'issue' 2 | 3 | module IssuePatch 4 | def self.included(base) 5 | base.class_eval do 6 | unloadable 7 | belongs_to :user_story, :class_name => 'UserStory', :foreign_key => 'user_story_id' 8 | end 9 | end 10 | end 11 | 12 | -------------------------------------------------------------------------------- /lib/software_project/redmine/current_version_extension.rb: -------------------------------------------------------------------------------- 1 | module SoftwareProject 2 | module Redmine 3 | module VersionExtension 4 | def self.included(base) 5 | base.class_eval do 6 | unloadable 7 | has_many :user_stories, :class_name => 'UserStory', :foreign_key => 'version_id' 8 | end 9 | end 10 | end # CurrentVersionExtension 11 | 12 | module IssueExtension 13 | def self.included(base) 14 | base.class_eval do 15 | unloadable 16 | belongs_to :user_story, :class_name => 'UserStory', :foreign_key => 'user_story_id' 17 | end 18 | end 19 | end 20 | end # Redmine 21 | end # ScrumAlliance -------------------------------------------------------------------------------- /lib/sprints/Documentation/base.rb: -------------------------------------------------------------------------------- 1 | module Sprints 2 | module Documentation 3 | class Base 4 | attr :sprints_setup, :true 5 | 6 | def initialize(setup) 7 | self.sprints_setup = setup 8 | end 9 | 10 | def generate_api 11 | 12 | end 13 | 14 | def generate_charts 15 | 16 | end 17 | 18 | end 19 | end 20 | end -------------------------------------------------------------------------------- /lib/sprints/Documentation/java.rb: -------------------------------------------------------------------------------- 1 | module Sprints 2 | module Documentation 3 | class Java < Sprints::Documentation::Base 4 | 5 | def generate_api 6 | Dir.chdir("public/projects/#{sprints_setup.path}/repo") {|path| 7 | %x{javadoc -d html -sourcepath src -subpackages #{packages_names(path)} } 8 | # javadoc -d html -sourcepath src -subpackages pl 9 | } 10 | end 11 | 12 | def generate_charts 13 | Dir.chdir("public/projects/#{sprints_setup.path}") {|path| 14 | filename = sprint_setup.project_id + "_" + sprint_setup.path 15 | file = File.new( + filename,File::CREAT|File::TRUNC|File::RDWR) 16 | file.puts iterate_folder_for_code(path + "/repo/src","") 17 | file.close 18 | %x{umlgraph #{filename} png} 19 | } 20 | end 21 | 22 | private 23 | def packages_names(path) 24 | str = "" 25 | Dir.foreach(path) { |fn| 26 | str << "#{fn}:" if fn[0] != '.' && File.directory?(fn) 27 | } 28 | str.chop 29 | end 30 | 31 | def iterate_folder_for_code(path,str) 32 | Dir.foreach(path) { |fn| 33 | if File.directory?(fn) 34 | str = iterate_folder_for_code(fn,str) 35 | else 36 | if fn =~ /*.java/ 37 | f = File.new(fn,"r") 38 | while line = f.gets 39 | if line !~ /[import|package]*/ 40 | str += line 41 | else 42 | if line =~ /import*/ 43 | str = line + str 44 | end 45 | end 46 | end 47 | end 48 | end 49 | } 50 | str 51 | end 52 | end 53 | end 54 | end -------------------------------------------------------------------------------- /lib/sprints/Documentation/ruby.rb: -------------------------------------------------------------------------------- 1 | module Sprints 2 | module Documentation 3 | class Ruby < Sprints::Documentation::Base 4 | 5 | def generate_api(version) 6 | # result = "" 7 | FileUtils.mkdir "public/projects/#{sprints_setup.path}/doc/#{version}" 8 | Dir.chdir("public/projects/#{sprints_setup.path}/repo") {|path| 9 | result = %x{rake doc:app} 10 | } 11 | # print "--------------#{result}------------------" 12 | Dir.chdir("public/projects/#{sprints_setup.path}"){|path| 13 | FileUtils.mv("repo/doc/app", "doc/#{version}") 14 | } 15 | end 16 | 17 | def generate_charts 18 | # TODO moving images to rightful places 19 | Dir.chdir("public/projects/#{sprints_setup.path}/repo") {|path| 20 | %x{railroad -M -i -a | dot -Tpng > models.png} 21 | %x{railroad -C -i | neato -Tpng > controllers.png} 22 | } 23 | Dir.chdir("public/projects/#{sprints_setup.path}"){|path| 24 | FileUtils.mv("repo/models.png", "chart/models.png") 25 | FileUtils.mv("repo/controllers.png", "chart/controllers.png") 26 | } 27 | end 28 | 29 | end 30 | end 31 | end -------------------------------------------------------------------------------- /lib/sprints/scm_controller.rb: -------------------------------------------------------------------------------- 1 | require 'uri' 2 | 3 | SYSTEM_PATH = 'D:\\Developer\\MGR\\redmine_new\\public\\' 4 | 5 | module Sprints 6 | class ScmController 7 | attr :repo, true 8 | attr :project_setup, true 9 | 10 | def initialize(repository, setup) 11 | self.repo = repository 12 | self.project_setup = setup 13 | end 14 | 15 | def download 16 | Dir.chdir(SYSTEM_PATH) {|path| 17 | unless File.exists?("projects") 18 | Dir.mkdir("projects") 19 | end 20 | Dir.chdir("projects") 21 | unless File.exists?(project_setup.path) 22 | Dir.mkdir(project_setup.path) 23 | end 24 | Dir.chdir(project_setup.path) 25 | Dir.mkdir("repo") 26 | Dir.mkdir("doc") 27 | Dir.mkdir("chart") 28 | case repo.scm_name 29 | when 'Subversion' 30 | str = repo.url + (repo.login.nil? ? "" : " --username #{repo.login}") + (repo.password.nil? ? "": " --password #{repo.password}") 31 | %x{svn checkout #{str} repo } 32 | when 'Git' 33 | str = repo.url 34 | %x{git clone #{str} repo } 35 | else 36 | end 37 | } 38 | end 39 | 40 | def update 41 | Dir.chdir(project_path+"\\repo") {|path| 42 | case repo.scm_name 43 | when 'Subversion' 44 | %x{svn update } 45 | when 'Git' 46 | %x{git pull } 47 | else 48 | end 49 | } 50 | end 51 | 52 | def project_path 53 | SYSTEM_PATH + "\\projects\\" + project_setup.path 54 | end 55 | end 56 | end -------------------------------------------------------------------------------- /lib/version_patch.rb: -------------------------------------------------------------------------------- 1 | 2 | require_dependency 'version' 3 | 4 | module VersionPatch 5 | def self.included(base) 6 | base.class_eval do 7 | unloadable 8 | 9 | has_many :user_stories, :class_name => 'UserStory', :foreign_key => 'version_id' 10 | validates_presence_of :effective_date 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/fixtures/documentations.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 2 | one: 3 | id: 1 4 | 5 | version: MyString 6 | 7 | path: MyString 8 | 9 | two: 10 | id: 2 11 | 12 | version: MyString 13 | 14 | path: MyString 15 | 16 | -------------------------------------------------------------------------------- /test/fixtures/milestones.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 2 | one: 3 | id: 1 4 | 5 | target: MyString 6 | 7 | deadline: 2009-06-15 8 | 9 | two: 10 | id: 2 11 | 12 | target: MyString 13 | 14 | deadline: 2009-06-15 15 | 16 | -------------------------------------------------------------------------------- /test/fixtures/sprints.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 2 | one: 3 | id: 1 4 | name: Sprint 1 5 | project_id: 1 6 | effective_date: 2009-06-28 7 | duration: 14 8 | 9 | two: 10 | id: 2 11 | name: Sprint 2 12 | project_id: 1 13 | effective_date: 2009-07-10 14 | duration: 14 15 | 16 | -------------------------------------------------------------------------------- /test/fixtures/sprints_setups.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 2 | one: 3 | id: 1 4 | 5 | language: MyString 6 | 7 | path: MyString 8 | 9 | two: 10 | id: 2 11 | 12 | language: MyString 13 | 14 | path: MyString 15 | 16 | -------------------------------------------------------------------------------- /test/functional/documentations_controller_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class DocumentationsControllerTest < ActionController::TestCase 4 | # Replace this with your real tests. 5 | def test_truth 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/functional/milestones_controller_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class MilestonesControllerTest < ActionController::TestCase 4 | # Replace this with your real tests. 5 | def test_truth 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/functional/sprints_controller_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class SprintsControllerTest < ActionController::TestCase 4 | # Replace this with your real tests. 5 | def test_truth 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | # Load the normal Rails helper 2 | require File.expand_path(File.dirname(__FILE__) + '/../../../../test/test_helper') 3 | 4 | # Ensure that we are using the temporary fixture path 5 | Engines::Testing.set_fixture_path 6 | -------------------------------------------------------------------------------- /test/unit/documentation_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class DocumentationTest < Test::Unit::TestCase 4 | fixtures :documentations 5 | 6 | # Replace this with your real tests. 7 | def test_truth 8 | assert true 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test/unit/milestone_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class MilestoneTest < Test::Unit::TestCase 4 | fixtures :milestones 5 | 6 | # Replace this with your real tests. 7 | def test_truth 8 | assert true 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test/unit/sprint_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class SprintTest < Test::Unit::TestCase 4 | fixtures :sprints 5 | 6 | def test_truth 7 | assert true 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /test/unit/sprints_setup_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class SprintsSetupTest < Test::Unit::TestCase 4 | fixtures :sprints_setups 5 | 6 | # Replace this with your real tests. 7 | def test_truth 8 | assert true 9 | end 10 | end 11 | --------------------------------------------------------------------------------