Skip to content

Commit

Permalink
Merge pull request #1311 from alphagov/remove-named-contact
Browse files Browse the repository at this point in the history
Remove "Named Contact" functionality
  • Loading branch information
ChrisBAshton authored Mar 26, 2024
2 parents 823e75d + 7e4c039 commit 9a7a210
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 232 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ This app:

- Presents anonymous feedback about pages on GOV.UK in a "feedback explorer". Anonymous feedback is collected via the [Feedback app](https://github.com/alphagov/feedback) and retrieved from the [Support API](https://github.com/alphagov/support-api).

- Exposes [internal APIs](https://github.com/alphagov/gds-api-adapters/blob/main/lib/gds_api/support.rb) to create Zendesk tickets e.g. [via the Feedback app](https://github.com/alphagov/feedback/blob/7e6893c/app/models/contact_ticket.rb#L35). Tickets are created using the [gds_zendesk gem](https://github.com/alphagov/gds_zendesk).

- Hosts internal forms for publishers to create Zendesk tickets.

- Hosts emergency contact information. This is read from an [environment variable](https://github.com/alphagov/govuk-helm-charts/blob/fb1920b/charts/app-config/values-production.yaml#L2420) which ultimately comes from a secret in AWS Secrets Manager.
Expand All @@ -16,8 +14,6 @@ This app:
of some form or other and relates to pages published on GOV.UK.
- **Anonymous Contact**: Part of the feedback collected by this app is anonymous, when it's
submitted via an anonymous contact form in the [feedback app](https://github.com/alphagov/feedback).
- **Named Contact**: In contrast with the `Anonymous Contact` feedback, this is submitted
via a form that will require you to identify yourself.

## Technical documentation

Expand Down Expand Up @@ -45,7 +41,7 @@ bundle exec sidekiq

## Further documentation

- [An overview of how the Feedback, Support and Support-api applications fit together](https://docs.google.com/presentation/d/1KNJQsH7Stu1hAe8DL-Zs585Q_yXSleGYiH0G6Sw6rOw/edit#slide=id.g59de842929_0_5) (for internal use only)
- [An overview of how the Feedback, Support and Support API applications fit together](https://docs.google.com/presentation/d/1KNJQsH7Stu1hAe8DL-Zs585Q_yXSleGYiH0G6Sw6rOw/edit#slide=id.g59de842929_0_5) (for internal use only)
- [Zendesk routing](./docs/how-tickets-routed-to-zendesk.md)

## Licence
Expand Down
30 changes: 0 additions & 30 deletions app/controllers/named_contacts_controller.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/models/support/permissions/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def initialize(user)
]
end
can :create, [Support::Requests::CreateNewUserRequest, Requests::ChangeExistingUserRequest, Support::Requests::RemoveUserRequest] if user.has_permission?("user_managers")
can :create, [Support::Requests::NamedContact] if user.has_permission?("api_users")
can :request, :global_export_request if user.has_permission?("feedex_exporters")
can :request, :review_feedback if user.has_permission?("feedex_reviewers")
end
Expand Down
19 changes: 0 additions & 19 deletions app/models/support/requests/named_contact.rb

This file was deleted.

43 changes: 0 additions & 43 deletions app/models/zendesk/ticket/named_contact_ticket.rb

This file was deleted.

2 changes: 1 addition & 1 deletion config/initializers/gds_sso.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"uid" => "dummy-user",
"name" => "Ms Example",
"email" => "[email protected]",
"permissions" => %w[single_points_of_contact api_users feedex_exporters],
"permissions" => %w[single_points_of_contact feedex_exporters],
)
end
2 changes: 0 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

get "/accounts_permissions_and_training_request/new" => redirect("/")

resources :named_contacts, only: :create

namespace :anonymous_feedback do
get :explore, to: "explore#new", format: false
post :explore, to: "explore#create", format: false
Expand Down
4 changes: 1 addition & 3 deletions docs/zendesk-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ The [gds_zendesk](https://github.com/alphagov/gds_zendesk) gem provides a client

The `ZendeskTicketWorker` is [created by the `ZendeskTickets` class](https://github.com/alphagov/support/blob/fdf8968f84231f2365207215e40cbaccad2fa6a1/app/models/zendesk/zendesk_tickets.rb#L15), which has a `raise_ticket` method that takes an object of type [`Zendesk::ZendeskTicket`](https://github.com/alphagov/support/blob/37fa7b05ec92511361b2a5e85f2c9f1a1bb3fb51/app/models/zendesk/zendesk_ticket.rb#L6) (or any child class thereof). `ZendeskTickets` is [instantiated in the `RequestsController`](https://github.com/alphagov/support/blob/564e53dc8a3d7a679b0c7f3ff52b91b3dd12e56d/app/controllers/requests_controller.rb#L36) on submission of one of the [live Support forms](https://support.publishing.service.gov.uk/) (one of the forms in the "User access", "Content request", "Technical support", "Campaigns", "Feedback for tools in Beta", "Topic taxonomy requests" or "Other requests" groups). The resulting ticket is tagged as per the `tag` method in whichever `Zendesk::ZendeskTicket` subclass it is, e.g. [`content_amend` tag for the `ContentChangeRequestTicket`](https://github.com/alphagov/support/blob/bcd9984967f70e5338b21455debb3ecd72684de3/app/models/zendesk/ticket/content_change_request_ticket.rb#L10-L12) as well as the default `govt_form` tag [present on the parent class](https://github.com/alphagov/support/blob/37fa7b05ec92511361b2a5e85f2c9f1a1bb3fb51/app/models/zendesk/zendesk_ticket.rb#L50-L52).

There is one kind of ticket that is submitted to Zendesk through the Support app, but which does not actually originate from the Support app: [`NamedContactTicket`](https://github.com/alphagov/support/blob/c6a909b3b6c51bd49cfbe2d080ed0c63aba2ba66/app/models/zendesk/ticket/named_contact_ticket.rb). This is the ticket type created by any _public_ form on GOV.UK (as opposed to the forms hosted on the Support app behind Signon) where the user provides their email address (e.g. <https://www.gov.uk/contact/govuk>). The public contact form is rendered by the Feedback app, which then [gets Support to raise a ticket, via GDS API Adapters](https://github.com/alphagov/feedback/blob/f8676e690da9e374800aa33f51864426385e046a/app/models/contact_ticket.rb#L34). The Support app doesn't do anything different with the [request](https://github.com/alphagov/support/blob/7b5e6922c1a98f0467241fdcdab39673744393c6/app/controllers/named_contacts_controller.rb#L1) when compared with the forms hosted on the Support app; the only difference is that the created ticket is tagged with `public_form` and `named_contact` (and _not_ `govt_form`).

## How Zendesk routes tickets

Tickets are created 'unassigned' and tagged as described above. Zendesk then routes the ticket to the correct group based on its tags.

For example, sticking with the content change request, we can see in this [example Zendesk ticket](https://govuk.zendesk.com/agent/tickets/5325939/events) that it was automatically triaged based on the [Gov't Form content change requests to 2nd Line--GOV.UK Content Triage, Gov't](https://govuk.zendesk.com/admin/objects-rules/rules/triggers/31640428) rule, which matches on unassigned tickets (`Group Is -`) that have the tags `content_amend` and `govuk_form`, to assign the ticket to the `2nd Line--GOV.UK Content Triage, Gov't` group. There are similar [rules for content advice](https://govuk.zendesk.com/admin/objects-rules/rules/triggers/45554483), [publisher technical fault requests](https://govuk.zendesk.com/admin/objects-rules/rules/triggers/35985647) and many more.

See all of the existing routing rules by visiting <https://govuk.zendesk.com/admin/objects-rules/rules/triggers/> and filtering by: Conditions -> Tags -> Contains at least one of the following -> `govt_form`. Add another condition for the `public_form` tag in order to see the 'named contact form' rules.
See all of the existing routing rules by visiting <https://govuk.zendesk.com/admin/objects-rules/rules/triggers/> and filtering by: Conditions -> Tags -> Contains at least one of the following -> `govt_form`.
1 change: 0 additions & 1 deletion spec/factories/users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
sequence(:email) { |n| "person-#{n}@example.com" }
permissions { %w[signin] }

factory(:api_user) { permissions { %w[signin api_users] } }
factory(:user_manager) { permissions { %w[signin user_managers] } }
factory(:content_requester) { permissions { %w[signin content_requesters] } }
factory(:campaign_requester) { permissions { %w[signin campaign_requesters] } }
Expand Down
97 changes: 0 additions & 97 deletions spec/features/named_contacts_spec.rb

This file was deleted.

22 changes: 0 additions & 22 deletions spec/models/support/requests/named_contact_spec.rb

This file was deleted.

8 changes: 0 additions & 8 deletions spec/models/support/requests/permissions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module Requests
LiveCampaignRequest,
ContentChangeRequest,
CreateNewUserRequest,
NamedContact,
ChangesToPublishingAppsRequest,
RemoveUserRequest,
]
Expand Down Expand Up @@ -67,12 +66,6 @@ module Requests
it_behaves_like "a role"
end

context "for API users" do
subject { create(:api_user) }
let(:requests_specific_to_role) { [NamedContact] }
it_behaves_like "a role"
end

context "for single points of contact" do
subject { create(:single_point_of_contact) }
let(:requests_specific_to_role) do
Expand All @@ -85,7 +78,6 @@ module Requests
LiveCampaignRequest,
ContentChangeRequest,
CreateNewUserRequest,
NamedContact,
ChangesToPublishingAppsRequest,
RemoveUserRequest,
]
Expand Down

0 comments on commit 9a7a210

Please sign in to comment.