Skip to content
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

external status code of response template takes precedence #2921

Closed
wants to merge 10,000 commits into from

Conversation

struan
Copy link
Member

@struan struan commented Mar 11, 2020

Order the response templates query by external status code so if you
have an update with an external status code the response template
matching that is always used. Previously with the database left to
determine the order it could pick a response template with a matching
state rather than a matching external status.

davea and others added 30 commits January 21, 2020 13:14
If we wait until after to filter the contacts and the constructed
options, then we can end up in the situation where e.g. we've filtered
out all the TfL contacts but the category option is still the TfL one
(with its associated group).
It was using the branding/URL of the site the update was left on.
There was a typo in the error message and the related conditional which
meant it was checking for $opts->questions (which doesn't exist) rather
than $opts->question, which prevented the script from being used to add
a question.
The changes in 27fe994 to send more P1 emails meant the out-of-hours
email wasn't being correct sent when it should have been.
Includes a bit of refactoring of PhotoSet::get_image_data to make
it easier to call subsequent methods on the photo object. We then
do this to get the width and height.

Also adds width/height attributes to FixMyStreet::ImageMagick
Attributes are updated every time the image is transformed and before
the as_blob data, which also undefs the image, is returned so it always
present for subsequent calls.

Fixes #2394.
This changes the existing logic to account for the fact that multiple
questions might have the disable form checkbox ticked for one of their
options.

At the moment this just displays one of the messages at a time, with the
first one taking priority. So if you have a "Is this an emergency"
question and a "Is this on private land" question which both disable the
form, and the user has selected "Yes" to both, then only the message for
the first question is displayed. This can potentially be improved in the
future, but seemed out of scope for this change.
When going back to the initial state with popstate, a change event was
being triggered on every single option of the filter selects. This led
to a lot of change events running on the category/status multi-selects
which then needlessly repeated the same activities over and over. This
locked up the browser for seconds in locations with many categories.
Add 5 step to discourage more than one problem per enquiry.
Includes an updated version of jquery-multi-select.
dracos and others added 14 commits April 1, 2020 18:29
Once a location is fixed, we never want to regenerate the Highways
England question, as that can lose the selected category. Store the
location regardless of the HE question answer, so any category
change, as opposed to a location change, does not do anything.

We also do not want to clear category_meta, as that is where the extra
data fields appear.
The ex-districts are not associated with areas any more, and the Bucks
body will be associated with a different area ID once the generation is
updated. The names are fixed, so use them instead.
Add title, image and also favicon

Fixes mysociety/commercial-staging#1834
Make them take start/end hour arguments, cope if only one given,
optional body, and combine them together in one `fetch` script.
Allow a configurable number of bodies to fetch updates simultaneously.
Otherwise something can be passed back, confusing the
parent Open311 sending code. Missed in 7ed3764.
@dracos dracos force-pushed the response-template-ordering branch from 9c02417 to 2cb5834 Compare April 6, 2020 13:56
dracos and others added 11 commits April 6, 2020 15:08
Use verbose for all log output, and debug only for
overriding the should_skip check.
This means the code can assume it should be trying to send a report.
This form of reference is shown on a report confirmation page.
Without allowing through the Highways England body, clicking on a
Highways England road in these cobrands would leave no categories
to be selected.
Order the response templates query by external status code so if you
have an update with an external status code the response template
matching that is always used. Previously with the database left to
determine the order it could pick a response template with a matching
state rather than a matching external status.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants