Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #29 from alphagov/related_urls_for_content_change_…

…request

adding "related urls" to content change request
  • Loading branch information...
commit a6928315f1101540bd17283b2282ed3714553225 2 parents 63e1d39 + 9538e7a
Jordan Hatch JordanHatch authored
2  app/models/content_change_request.rb
View
@@ -8,6 +8,6 @@ class ContentChangeRequest < TablelessModel
include WithTimeConstraint
include WithRequestContext
- attr_accessor :details_of_change, :url
+ attr_accessor :details_of_change, :url, :related_urls
validates_presence_of :details_of_change
end
6 app/views/content_change_requests/_request_details.html.erb
View
@@ -2,5 +2,9 @@
<%= f.inputs name: "URL affected" do %>
<%= f.input :url, label: "URL", input_html: { class: "span6", placeholder: "https://www.gov.uk/" } %>
- <%= f.input :details_of_change, as: :text, label: "Details of the requested change", required: true, input_html: { :class => "span6", :rows => 6, :cols => 50, :"aria-required" => true } %>
+
+ <%= f.input :details_of_change, as: :text, label: "Details of the requested change", required: true, input_html: { :class => "span6", :rows => 16, :cols => 50, :"aria-required" => true } %>
+
+ <%= f.input :related_urls, as: :text, label: "Does this affect any other URLs? (please specify one per line)", input_html: { class: "span6", rows: 4, cols: 50 } %>
+
<% end %>
7 features/content_change_requests.feature
View
@@ -10,8 +10,8 @@ Feature: Content change requests
Scenario: successful Mainstream content change request
When the user submits the following content change request:
- | Context | Details of change | URL | Needed by date | Not before date | Reason |
- | Mainstream (business/citizen) | Out of date XX YY | http://gov.uk/X | 31-12-2020 | 01-12-2020 | New law |
+ | Context | Details of change | URL | Related URLs | Needed by date | Not before date | Reason |
+ | Mainstream (business/citizen) | Out of date XX YY | http://gov.uk/X | XXXXX | 31-12-2020 | 01-12-2020 | New law |
Then the following ticket is raised in ZenDesk:
| Subject | Requester email |
@@ -28,6 +28,9 @@ Feature: Content change requests
[URL of content to be changed]
http://gov.uk/X
+ [Related URLs]
+ XXXXX
+
[Details of what should be added, amended or removed]
Out of date XX YY
1  features/step_definitions/request_steps.rb
View
@@ -69,6 +69,7 @@
fill_in "Details of the requested change", :with => @request_details["Details of change"]
fill_in "URL", :with => @request_details["URL"]
+ fill_in "Does this affect any other URLs? (please specify one per line)", :with => @request_details["Related URLs"]
step "the user fills out the time constraints"
step "the user submits the request successfully"
2  lib/content_change_request_zendesk_ticket.rb
View
@@ -17,6 +17,8 @@ def comment_snippets
label: "Which part of GOV.UK is this about?"),
CommentSnippet.new(on: @request, field: :url,
label: "URL of content to be changed"),
+ CommentSnippet.new(on: @request, field: :related_urls,
+ label: "Related URLs"),
CommentSnippet.new(on: @request, field: :details_of_change,
label: "Details of what should be added, amended or removed"),
CommentSnippet.new(on: @request.time_constraint, field: :time_constraint_reason)
1  test/unit/models/content_change_request_test.rb
View
@@ -7,6 +7,7 @@ class ContentChangeRequestTest < Test::Unit::TestCase
should validate_presence_of(:request_context)
should allow_value("https://www.gov.uk").for(:url)
+ should allow_value("https://www.gov.uk/A\nhttps://www.gov.uk/A").for(:related_urls)
should "allow time constraints" do
request = ContentChangeRequest.new(:time_constraint => stub("time constraint", :valid? => true))
Please sign in to comment.
Something went wrong with that request. Please try again.