-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update existing data requests #2427
Update existing data requests #2427
Conversation
Co-authored-by: Andrew Pepler <[email protected]>
Co-authored-by: Andrew Pepler <[email protected]>
@@ -8,7 +8,7 @@ | |||
let(:decorated) { data_request_area.decorate } | |||
|
|||
it "uses location string" do | |||
expect(decorated.location).to eq data_request_area.location | |||
expect(decorated.location).to eq decorated.contact.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this test correct? It's the same as the next one
@@ -84,13 +84,14 @@ class FakeError < ArgumentError; end | |||
describe "#log_message" do | |||
it "creates a human readable case history message" do | |||
service.call | |||
expect(CaseTransition.last.message).to eq "HMP Brixton, All prison records: pages changed from 0 to 21" | |||
|
|||
expect(CaseTransition.last.message).to eq "HMP Brixton All prison records: pages changed from 0 to 21" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the comma be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as below
config/locales/en.yml
Outdated
@@ -1616,7 +1629,7 @@ en: | |||
date_to_copy: Request all data held up until this date | |||
onwards: "onwards" | |||
update: | |||
log_message_pages_changed: "%{location}, %{request_type}: pages changed from %{old_pages} to %{new_pages}" | |||
log_message_pages_changed: "%{location} %{request_type}: pages changed from %{old_pages} to %{new_pages}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the comma be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this and the above, if a data request is edited but there isnt yet a location set for the data request area, the case history will show as
", All prison records: pages ..."
Could do something dynamic to write the comma if its worth keeping it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you should be able to add a data request without a location so that's probably something that needs to change. On that basis I wouldn't remove the comma.
let(:decorated) { data_request_area.decorate } | ||
|
||
it "returns the count of data_requests" do | ||
create(:data_request, data_request_area:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use create_list to create multiple items
|
||
context "without linked organisation" do | ||
let(:decorated) { data_request.decorate } | ||
|
||
it "uses location string" do | ||
expect(decorated.location).to eq data_request.location | ||
expect(decorated.location).to eq data_request_area.contact.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test seems wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work!
5b4dc29
into
cdpt-1850-commissioning-and-chase-redesign
Description
Update the Data Requests process flow to use Data Request Areas
Self-review checklist
CT-7654 ...
Screenshots
Related JIRA tickets
https://dsdmoj.atlassian.net/jira/software/c/projects/CDPT/boards/1152?selectedIssue=CDPT-1849
https://dsdmoj.atlassian.net/jira/software/c/projects/CDPT/boards/1152?selectedIssue=CDPT-1857
https://dsdmoj.atlassian.net/jira/software/c/projects/CDPT/boards/1152?selectedIssue=CDPT-1851
Deployment
Manual testing instructions