OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Remove available_responsibles from the API as it returns the same data as available_assignees
Klaus Zanders8d54c5c40d06
diff --git a/docs/api/apiv3/components/schemas/available_responsibles_model.yml b/docs/api/apiv3/components/schemas/available_responsibles_model.ymldeleted file mode 100644index 9de640bdfda..00000000000--- a/docs/api/apiv3/components/schemas/available_responsibles_model.yml+++ /dev/null@@ -1,56 +0,0 @@-# Schema: Available_ResponsiblesModel-----type: object-example:- _links:- self:- href: "/api/v3/projects/42/available_responsibles"- total: 2- count: 2- _type: Collection- _embedded:- elements:- - _type: User- _links:- self:- href: "/api/v3/users/1"- title: John Sheppard - j.sheppard- lock:- href: "/api/v3/users/1/lock"- title: Set lock on j.sheppard- method: POST- delete:- href: "/api/v3/users/1"- title: Delete j.sheppard- method: DELETE- id: 1- login: j.sheppard- firstName: John- lastName: Sheppard- email: [email protected]- avatar: https://example.org/users/1/avatar- status: active- createdAt: '2014-05-21T08:51:20.270Z'- updatedAt: '2014-05-21T08:51:20.270Z'- - _type: User- _links:- self:- href: "/api/v3/users/2"- title: Jim Sheppard - j.sheppard2- lock:- href: "/api/v3/users/2/lock"- title: Set lock on j.sheppard2- method: POST- delete:- href: "/api/v3/users/2"- title: Delete j.sheppard2- method: DELETE- id: 2- login: j.sheppard2- firstName: Jim- lastName: Sheppard- email: [email protected]- avatar: https://example.org/users/1/avatar- status: active- createdAt: '2014-05-21T08:51:20.270Z'- updatedAt: '2014-05-21T08:51:20.270Z'diff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.ymlindex 3fb0874dfef..96e2f6bc457 100644--- a/docs/api/apiv3/openapi-spec.yml+++ b/docs/api/apiv3/openapi-spec.yml@@ -135,7 +135,7 @@ info:are supported. The client signals the desired compression by setting the [`Accept-Encoding` header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3).If no `Accept-Encoding` header is send, `Accept-Encoding: identity` is assumed which will result in the API responding uncompressed.title: OpenProject API V3 (Stable)- version: '3'+ version: "3"servers:- url: https://qa.openproject-edge.com@@ -312,8 +312,6 @@ paths:"$ref": "./paths/project_work_packages_form.yml""/api/v3/projects/{id}/available_assignees":"$ref": "./paths/project_available_assignees.yml"- "/api/v3/projects/{id}/available_responsibles":- "$ref": "./paths/project_available_responsibles.yml""/api/v3/projects/{id}/categories":"$ref": "./paths/project_categories.yml""/api/v3/projects/{id}/types":@@ -476,73 +474,73 @@ paths:components:examples:DateAlertNotification:- $ref: './components/examples/date_alert_notification.yml'+ $ref: "./components/examples/date_alert_notification.yml"GridSimpleCollectionResponse:- $ref: './components/examples/grid-simple-collection-response.yml'+ $ref: "./components/examples/grid-simple-collection-response.yml"GridSimplePatchModel:- $ref: './components/examples/grid-simple-patch-model.yml'+ $ref: "./components/examples/grid-simple-patch-model.yml"GridSimpleResponse:- $ref: './components/examples/grid-simple-response.yml'+ $ref: "./components/examples/grid-simple-response.yml"GroupResponse:- $ref: './components/examples/group-response.yml'+ $ref: "./components/examples/group-response.yml"MembershipCreateRequestCustomMessage:- $ref: './components/examples/membership-create-request-custom-message.yml'+ $ref: "./components/examples/membership-create-request-custom-message.yml"MembershipCreateRequestGlobalRole:- $ref: './components/examples/membership-create-request-global-role.yml'+ $ref: "./components/examples/membership-create-request-global-role.yml"MembershipCreateRequestNoNotification:- $ref: './components/examples/membership-create-request-no-notification.yml'+ $ref: "./components/examples/membership-create-request-no-notification.yml"MembershipFormResponse:- $ref: './components/examples/membership-form-response.yml'+ $ref: "./components/examples/membership-form-response.yml"MembershipSchemaResponse:- $ref: './components/examples/membership-schema-response.yml'+ $ref: "./components/examples/membership-schema-response.yml"MembershipSimpleCollectionResponse:- $ref: './components/examples/membership-simple-collection-response.yml'+ $ref: "./components/examples/membership-simple-collection-response.yml"MembershipSimpleResponse:- $ref: './components/examples/membership-simple-response.yml'+ $ref: "./components/examples/membership-simple-response.yml"MembershipUpdateAdditionalRoles:- $ref: './components/examples/membership-update-additional-roles.yml'+ $ref: "./components/examples/membership-update-additional-roles.yml"MentionedNotification:- $ref: './components/examples/mentioned_notification.yml'+ $ref: "./components/examples/mentioned_notification.yml"NotificationCollection:- $ref: './components/examples/notification_collection.yml'+ $ref: "./components/examples/notification_collection.yml"PlaceholderUserResponse:- $ref: './components/examples/placeholder-user-response.yml'+ $ref: "./components/examples/placeholder-user-response.yml"Project:- $ref: './components/examples/project.yml'+ $ref: "./components/examples/project.yml"ProjectBody:- $ref: './components/examples/project_body.yml'+ $ref: "./components/examples/project_body.yml"ProjectCollection:- $ref: './components/examples/project_collection.yml'+ $ref: "./components/examples/project_collection.yml"QueriesModel:- $ref: './components/examples/queries.yml'+ $ref: "./components/examples/queries.yml"QueryModel:- $ref: './components/examples/query.yml'+ $ref: "./components/examples/query.yml"QuerySchemaModel:- $ref: './components/examples/query_schema.yml'+ $ref: "./components/examples/query_schema.yml"StatusCollection:- $ref: './components/examples/status_collection.yml'+ $ref: "./components/examples/status_collection.yml"StoragesSimpleCollectionModel:- $ref: './components/examples/storages-simple-collection-response.yml'+ $ref: "./components/examples/storages-simple-collection-response.yml"UserResponse:- $ref: './components/examples/user-response.yml'+ $ref: "./components/examples/user-response.yml"ValuesPropertyStartDateSchema:- $ref: './components/examples/values_property_start_date_schema.yml'+ $ref: "./components/examples/values_property_start_date_schema.yml"ValuesPropertyDueDateSchema:- $ref: './components/examples/values_property_due_date_schema.yml'+ $ref: "./components/examples/values_property_due_date_schema.yml"ValuesPropertyDateSchema:- $ref: './components/examples/values_property_date_schema.yml'+ $ref: "./components/examples/values_property_date_schema.yml"ValuesPropertyStartDate:- $ref: './components/examples/values_property_start_date.yml'+ $ref: "./components/examples/values_property_start_date.yml"ValuesPropertyDueDate:- $ref: './components/examples/values_property_due_date.yml'+ $ref: "./components/examples/values_property_due_date.yml"ValuesPropertyDate:- $ref: './components/examples/values_property_date.yml'+ $ref: "./components/examples/values_property_date.yml"Views:- $ref: './components/examples/views.yml'+ $ref: "./components/examples/views.yml"ViewWorkPackagesTable:- $ref: './components/examples/view_work_packages_table.yml'+ $ref: "./components/examples/view_work_packages_table.yml"ViewTeamPlanner:- $ref: './components/examples/view_team_planner.yml'+ $ref: "./components/examples/view_team_planner.yml"responses:InvalidQuery:@@ -563,8 +561,6 @@ components:"$ref": "./components/schemas/attachments_model.yml"Available_AssigneesModel:"$ref": "./components/schemas/available_assignees_model.yml"- Available_ResponsiblesModel:- "$ref": "./components/schemas/available_responsibles_model.yml"Available_WatchersModel:"$ref": "./components/schemas/available_watchers_model.yml"Available_projects_for_queryModel:@@ -612,15 +608,15 @@ components:Example_SchemaModel:"$ref": "./components/schemas/example_schema_model.yml"FileLinkCollectionReadModel:- $ref: './components/schemas/file_link_collection_read_model.yml'+ $ref: "./components/schemas/file_link_collection_read_model.yml"FileLinkCollectionWriteModel:- $ref: './components/schemas/file_link_collection_write_model.yml'+ $ref: "./components/schemas/file_link_collection_write_model.yml"FileLinkOriginDataModel:"$ref": "./components/schemas/file_link_origin_data_model.yml"FileLinkReadModel:- $ref: './components/schemas/file_link_read_model.yml'+ $ref: "./components/schemas/file_link_read_model.yml"FileLinkWriteModel:- $ref: './components/schemas/file_link_write_model.yml'+ $ref: "./components/schemas/file_link_write_model.yml"Formattable:"$ref": "./components/schemas/formattable.yml"GridCollectionModel:@@ -906,4 +902,4 @@ tags:- "$ref": "./tags/work_packages.yml"- "$ref": "./tags/work_schedule.yml"security:- - BasicAuth: [ ]+ - BasicAuth: []diff --git a/docs/api/apiv3/paths/project_available_responsibles.yml b/docs/api/apiv3/paths/project_available_responsibles.ymldeleted file mode 100644index f3fae721917..00000000000--- a/docs/api/apiv3/paths/project_available_responsibles.yml+++ /dev/null@@ -1,115 +0,0 @@-# /api/v3/projects/{id}/available_responsibles-----get:- parameters:- - description: Project id- example: '1'- in: path- name: id- required: true- schema:- type: integer- responses:- '200':- content:- application/hal+json:- examples:- response:- value:- _embedded:- elements:- - _links:- delete:- href: "/api/v3/users/1"- method: DELETE- title: Delete j.sheppard- lock:- href: "/api/v3/users/1/lock"- method: POST- title: Set lock on j.sheppard- self:- href: "/api/v3/users/1"- title: John Sheppard - j.sheppard- _type: User- avatar: https://example.org/users/1/avatar- createdAt: '2014-05-21T08:51:20.396Z'- email: [email protected]- firstName: John- id: 1- lastName: Sheppard- login: j.sheppard- status: active- updatedAt: '2014-05-21T08:51:20.396Z'- - _links:- delete:- href: "/api/v3/users/2"- method: DELETE- title: Delete j.sheppard2- lock:- href: "/api/v3/users/2/lock"- method: POST- title: Set lock on j.sheppard2- self:- href: "/api/v3/users/2"- title: Jim Sheppard - j.sheppard2- _type: User- avatar: https://example.org/users/1/avatar- createdAt: '2014-05-21T08:51:20.396Z'- email: [email protected]- firstName: Jim- id: 2- lastName: Sheppard- login: j.sheppard2- status: active- updatedAt: '2014-05-21T08:51:20.396Z'- _links:- self:- href: "/api/v3/projects/42/available_responsibles"- _type: Collection- count: 2- total: 2- schema:- "$ref": "../components/schemas/available_responsibles_model.yml"- description: OK- headers: {}- '403':- content:- application/hal+json:- schema:- $ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission- message: You are not allowed to see the users available as responsible- for this project.- description: |-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work packages-- *Note that you will only receive this error, if you are at least allowed to see the corresponding project.*- headers: {}- '404':- content:- application/hal+json:- schema:- $ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:NotFound- message: The specified project does not exist.- description: |-- Returned if the project does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view project- headers: {}- tags:- - Work Packages- description: Gets a list of users that can be assigned as the responsible of a work- package in the given project.- operationId: Available_responsibles- summary: Available responsiblesdiff --git a/lib/api/v3/projects/available_responsibles_api.rb b/lib/api/v3/projects/available_responsibles_api.rbdeleted file mode 100644index f42555a0a13..00000000000--- a/lib/api/v3/projects/available_responsibles_api.rb+++ /dev/null@@ -1,50 +0,0 @@-#-- 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.-#++--require "api/v3/users/user_collection_representer"--module API- module V3- module Projects- class AvailableResponsiblesAPI < ::API::OpenProjectAPI- resource :available_responsibles do- after_validation do- authorize_in_any_work_package(:view_work_packages)- end-- get &::API::V3::Utilities::Endpoints::Index.new(model: Principal,- scope: -> {- Principal.possible_assignee(@project).includes(:preference)- },- render_representer: Users::UnpaginatedUserCollectionRepresenter)- .mount- end- end- end- end-enddiff --git a/lib/api/v3/utilities/path_helper.rb b/lib/api/v3/utilities/path_helper.rbindex 60563735062..75ada6df074 100644--- a/lib/api/v3/utilities/path_helper.rb+++ b/lib/api/v3/utilities/path_helper.rb@@ -152,10 +152,6 @@ module API"#{work_package(work_package_id)}/available_assignees"end- def self.available_responsibles(project_id)- "#{project(project_id)}/available_responsibles"- end-def self.available_watchers(work_package_id)"#{work_package(work_package_id)}/available_watchers"enddiff --git a/spec/lib/api/v3/utilities/path_helper_spec.rb b/spec/lib/api/v3/utilities/path_helper_spec.rbindex e028b911e9a..fd7b5402e07 100644--- a/spec/lib/api/v3/utilities/path_helper_spec.rb+++ b/spec/lib/api/v3/utilities/path_helper_spec.rb@@ -605,12 +605,6 @@ RSpec.describe API::V3::Utilities::PathHelper doit_behaves_like "api v3 path", "/work_packages/42/available_assignees"end- describe "#available_responsibles" do- subject { helper.available_responsibles 42 }-- it_behaves_like "api v3 path", "/projects/42/available_responsibles"- end-describe "#available_watchers" dosubject { helper.available_watchers 42 }diff --git a/spec/requests/api/v3/projects/available_responsibles_api_spec.rb b/spec/requests/api/v3/projects/available_responsibles_api_spec.rbdeleted file mode 100644index 6a81b0b7ea6..00000000000--- a/spec/requests/api/v3/projects/available_responsibles_api_spec.rb+++ /dev/null@@ -1,38 +0,0 @@-#-- 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.-#++--require "spec_helper"--RSpec.describe "API::V3::Projects::AvailableResponsiblesAPI" do- include API::V3::Utilities::PathHelper-- it_behaves_like "available principals", :responsibles do- let(:base_permissions) { %i[view_work_packages] }- let(:href) { api_v3_paths.available_responsibles(project.id) }- end-end