Search

Advanced search is enabled.
Showing 16 code results for EpicLinks extension:rb  in
of GitLab.org / GitLab

  def update
    result = EpicLinks::UpdateService.new(child_epic, current_user, params[:epic]).execute

    render json: { message: result[:message] }, status: result[:http_status]
            @execution_message[:remove_child_epic] =
              if child_epic && quick_action_target.child?(child_epic.id)
                EpicLinks::DestroyService.new(child_epic, current_user).execute

                _("Removed %{epic_ref} from child epics.") % { epic_ref: child_epic.to_reference(quick_action_target) }

module API
  class EpicLinks < ::API::Base
    include ::Gitlab::Utils::StrongMemoize

        it 'returns the correct JSON response' do
          list_service_response = EpicLinks::ListService.new(parent_epic, user).execute

          expect(response).to have_gitlab_http_status(:ok)
# frozen_string_literal: true

module EpicLinks
  class ListService < IssuableLinks::ListService
    extend ::Gitlab::Utils::Override
        # it is important that this is not called after relate_issuables, as it relinks epic to the issuable
        # relate_issuables is called during the `super` portion of this method
        # see EpicLinks::EpicIssues#relate_issuables
        affected_epics = affected_epics(objects)
# frozen_string_literal: true

module EpicLinks
  class DestroyService < IssuableLinks::DestroyService
    attr_reader :child_epic, :parent_epic
# frozen_string_literal: true

module EpicLinks
  class UpdateService < BaseService
    attr_reader :epic
        mount ::API::ProjectApprovalSettings
        mount ::API::EpicIssues
        mount ::API::EpicLinks
        mount ::API::Epics
        mount ::API::ElasticsearchIndexedNamespaces
# frozen_string_literal: true

module EpicLinks
  class CreateService < IssuableLinks::CreateService
    def execute
require 'spec_helper'

RSpec.describe EpicLinks::ListService do
  let(:user) { create :user }
  let(:group) { create(:group, :public) }
require 'spec_helper'

RSpec.describe EpicLinks::DestroyService do
  describe '#execute' do
    let(:group) { create(:group) }
    def create_issuable_links(parent)
      service, issuable = if moving_object.is_a?(Epic)
                            [EpicLinks::CreateService, moving_object]
                          elsif moving_object.is_a?(EpicIssue)
                            [EpicIssues::CreateService, moving_object.issue]
require 'spec_helper'

RSpec.describe EpicLinks::UpdateService do
  let(:user) { create(:user) }
  let(:group) { create(:group) }
require 'spec_helper'

RSpec.describe API::EpicLinks do
  let(:user) { create(:user) }
  let(:group) { create(:group) }
require 'spec_helper'

RSpec.describe EpicLinks::CreateService do
  include NestedEpicsHelper