-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[#69139] Create boards on Sprint start #22086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
myabc
wants to merge
48
commits into
dev
Choose a base branch
from
feature/69139-sprint-task-boards
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,695
−197
Open
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
a1562bc
[#69139] Add SprintFilter for work package queries
myabc 24702a9
Add sprint board permission dependencies
myabc 014e419
Implement Agile::Sprint#board_name
myabc cd0587b
Add polymorphic board linkage
myabc acc9284
[#69139] Add sprint task board creation
myabc fe08927
Align sprint and backlog menu helpers
myabc c22c90b
[#72942] Add Start sprint button
myabc 18c8bef
Disable Start sprint for active sprint overlap
myabc a83f0e8
Add Finish sprint flow for symmetry
myabc bf86c27
Simplify sprint component assumptions
myabc 9de770b
Add sprint-specific success notices
myabc 411cc24
Fix sprint filter schema dependency
myabc 40ac7eb
[#73137] Add active sprint constraint
myabc 45ef125
Use enum scope in sprint validation
myabc 71ce954
Move scrum guards into routes
myabc e3cbf33
Split sprint start/finish feature specs
myabc 772fae7
Flesh out sprint start feature spec
myabc 4858712
Merge pull request #22347 from opf/impl/73137-active-sprint-per-proje…
myabc 570651f
Merge branch 'dev' into feature/69139-sprint-task-boards
myabc 5f1232a
Simplify sprint component spec guards
myabc 64562ca
Merge pull request #22348 from opf/code-maintenance/scrum-projects-ro…
myabc af72113
Align sprint boards with shared sprints
myabc 66d8c8a
Add missing :aggregate_failures in controller spec
myabc 68d1b2c
Merge branch 'dev' into feature/69139-sprint-task-boards
myabc 28ffe98
Derive sprint board columns dynamically
myabc 0cdc5f9
Merge branch 'dev' into feature/69139-sprint-task-boards
myabc 19d12d3
Aggregate query creation failures
myabc 089bbed
Use POST for sprint start and finish actions
myabc 81f0b66
Fix Rubocop ABC size in before_perform
myabc 8756818
Fix taskboard controller spec expectation
myabc b198cb0
Add StartContract for sprint start validation
myabc fcc1793
Add receiving_projects and boards
myabc c7a5e48
Remove redundant load_project for start/finish
myabc daf0e11
Remove unused board error locale
myabc e6a6ba0
Preserve status column order from previous board
myabc 5d012d6
Avoid sprint menu active-sprint N+1
myabc aa93458
DRY up start/finish failure response handling
myabc 524240c
Merge remote-tracking branch 'origin/dev' into feature/69139-sprint-t…
myabc 600922d
Use SprintPlanning page object in start_finish_spec
myabc a9d7d52
Move sprint error locales to backlogs module
myabc 4a1441a
Remove project default from SprintHeaderComponent
myabc 2e73acd
Remove .active filter from shared_receiver_projects
myabc 10ca498
Simplify ensure_task_boards with add_dependent!
myabc 2d7780d
Move active_sprint_ids computation to controller
myabc c6e175d
Replace Task.type fallback with project types
myabc 3ebec53
Authorize shared sprint start and finish
myabc a7662cd
Use active scope in sprint menu
myabc c1ef3ac
Use CTE in shared_receiver_projects
myabc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
lib/api/v3/queries/schemas/sprint_filter_dependency_representer.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| #-- copyright | ||
| # OpenProject is an open source project management software. | ||
| # Copyright (C) the OpenProject GmbH | ||
| # | ||
| # This program is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU General Public License version 3. | ||
| # | ||
| # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: | ||
| # Copyright (C) 2006-2013 Jean-Philippe Lang | ||
| # Copyright (C) 2010-2013 the ChiliProject Team | ||
| # | ||
| # This program is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU General Public License | ||
| # as published by the Free Software Foundation; either version 2 | ||
| # of the License, or (at your option) any later version. | ||
| # | ||
| # This program is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| # GNU General Public License for more details. | ||
| # | ||
| # You should have received a copy of the GNU General Public License | ||
| # along with this program; if not, write to the Free Software | ||
| # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| # | ||
| # See COPYRIGHT and LICENSE files for more details. | ||
| #++ | ||
|
|
||
| module API | ||
| module V3 | ||
| module Queries | ||
| module Schemas | ||
| class SprintFilterDependencyRepresenter < FilterDependencyRepresenter | ||
| def href_callback; end | ||
|
|
||
| private | ||
|
|
||
| def type | ||
| "[]Integer" | ||
myabc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| end | ||
| end | ||
| end | ||
| end | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| #-- copyright | ||
| # OpenProject is an open source project management software. | ||
| # Copyright (C) the OpenProject GmbH | ||
| # | ||
| # This program is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU General Public License version 3. | ||
| # | ||
| # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: | ||
| # Copyright (C) 2006-2013 Jean-Philippe Lang | ||
| # Copyright (C) 2010-2013 the ChiliProject Team | ||
| # | ||
| # This program is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU General Public License | ||
| # as published by the Free Software Foundation; either version 2 | ||
| # of the License, or (at your option) any later version. | ||
| # | ||
| # This program is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| # GNU General Public License for more details. | ||
| # | ||
| # You should have received a copy of the GNU General Public License | ||
| # along with this program; if not, write to the Free Software | ||
| # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| # | ||
| # See COPYRIGHT and LICENSE files for more details. | ||
| #++ | ||
|
|
||
| module Sprints | ||
| class StartContract < ::BaseContract | ||
| validate :validate_permission | ||
| validate :validate_status_in_planning | ||
| validate :validate_no_other_active_sprint | ||
|
|
||
| def self.can_start_or_finish?(user:, sprint:) | ||
| user.allowed_in_project?(:start_complete_sprint, sprint.project) | ||
| end | ||
|
|
||
| def self.can_start?(user:, sprint:, project:) | ||
| can_start_or_finish?(user:, sprint:) && | ||
| user.allowed_in_project?(:show_board_views, project) | ||
| end | ||
|
|
||
| private | ||
|
|
||
| def validate_permission | ||
| return if self.class.can_start_or_finish?(user:, sprint: model) | ||
|
|
||
| errors.add :base, :error_unauthorized | ||
| end | ||
|
|
||
| def validate_status_in_planning | ||
| return if model.in_planning? | ||
|
|
||
| errors.add :status, :must_be_in_planning | ||
| end | ||
|
|
||
| def validate_no_other_active_sprint | ||
| return unless model.in_planning? | ||
| return unless Agile::Sprint.where(project: model.project).active.where.not(id: model.id).exists? | ||
ulferts marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| errors.add :status, :only_one_active_sprint_allowed | ||
| end | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.