Skip to content

Commit

Permalink
Merge branch 'task/56644-144-documentation-update-pageheaders-and-sub…
Browse files Browse the repository at this point in the history
…headers-in-the-admin-pages' of https://github.com/opf/openproject into task/56644-144-documentation-update-pageheaders-and-subheaders-in-the-admin-pages
  • Loading branch information
MayaBerd committed Aug 6, 2024
2 parents 789c92f + 19abd26 commit 0dd1873
Show file tree
Hide file tree
Showing 298 changed files with 10,122 additions and 10,138 deletions.
23 changes: 23 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Contributors: Please check our [PR guide](https://www.openproject.org/docs/development/code-review-guidelines/#preparing-your-pull-request) before opening a PR. -->

<!-- Reviewers: Please check our [Review guide](https://www.openproject.org/docs/development/code-review-guidelines/#reviewing) -->

# What are you trying to accomplish?
<!-- Provide a description of the changes. -->

## Screenshots
<!-- Provide before/after screenshots, videos, or graphs for any visual changes; otherwise, remove this section -->

# What approach did you choose and why?
<!-- This section is a place for you to describe your thought process in making these changes.
List any tradeoffs you made to take on or pay down tech debt.
Describe any alternative approaches you considered and why you discarded them. -->

# Ticket
<!-- Provide the link to respective work package -->

# Merge checklist

- [ ] Added/updated tests
- [ ] Added/updated documentation in Lookbook (patterns, previews, etc)
- [ ] Tested major browsers (Chrome, Firefox, Edge, ...)
5 changes: 0 additions & 5 deletions app/models/projects/custom_fields.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def available_custom_fields
return all_visible_custom_fields if new_record?

all_visible_custom_fields.where(id: project_custom_field_project_mappings.select(:custom_field_id))
.or(required_visible_custom_fields)
end

# Note:
Expand All @@ -64,10 +63,6 @@ def all_visible_custom_fields
all_available_custom_fields.visible(project: self)
end

def required_visible_custom_fields
ProjectCustomField.required.visible(project: self)
end

def custom_field_values_to_validate
# Limit the set of available custom fields when the validation is limited to a section
if _limit_custom_fields_validation_to_section_id
Expand Down
41 changes: 41 additions & 0 deletions app/seeders/basic_data/project_custom_field_section_seeder.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2024 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 BasicData
class ProjectCustomFieldSectionSeeder < ModelSeeder
self.model_class = ProjectCustomFieldSection
self.seed_data_model_key = "project_custom_field_sections"
self.attribute_names_for_lookups = %i[position]

def model_attributes(section_data)
{
name: section_data["name"],
position: section_data["position"]
}
end
end
end
Loading

0 comments on commit 0dd1873

Please sign in to comment.