Skip to content

Conversation

@struan
Copy link
Member

@struan struan commented Dec 18, 2025

Fixes mysociety/societyworks#5257

Update Kingson Echo integration to support escalations and target dates.

The escalations code is much the same as Sutton, so the code for that has been hoisted up into the shared role, with a few configuration functions to cover differences in timelines.

This also adds target dates for Kingston to enable specific dates to be displayed on the bin page for things like container delivers, missed bin resolutions etc rather than "within n days".

[skip changelog]

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 87.05882% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.96%. Comparing base (66b20f1) to head (239efb6).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...erllib/FixMyStreet/Roles/Cobrand/KingstonSutton.pm 80.00% 3 Missing and 7 partials ⚠️
perllib/FixMyStreet/Cobrand/Kingston.pm 96.77% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5787      +/-   ##
==========================================
+ Coverage   82.66%   82.96%   +0.30%     
==========================================
  Files         459      459              
  Lines       35850    37103    +1253     
  Branches     5854     6084     +230     
==========================================
+ Hits        29634    30782    +1148     
- Misses       4510     4605      +95     
- Partials     1706     1716      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@struan struan force-pushed the 5258-kingston-escalation branch 6 times, most recently from 868420f to 5f6b54a Compare January 12, 2026 14:27
@struan struan changed the title [Kingston] [WW] Escalations [Kingston] [WW] Escalations and target dates Jan 12, 2026
@struan struan force-pushed the 5258-kingston-escalation branch 2 times, most recently from 85f67cc to d94b53a Compare January 12, 2026 17:04
@struan struan marked this pull request as ready for review January 12, 2026 17:30
@struan struan requested a review from chrismytton January 13, 2026 09:47
@dracos
Copy link
Member

dracos commented Jan 14, 2026

(Question aside not to do with these changes for @sallytay here - as Kingston asked us to add the specific dates here (which we'd refused to do for Sutton previously when they tried to just shoehorn it in), do we want to have this for Sutton now as well given we've done the work - I'm guessing so?)

@sallytay
Copy link

@dracos yes, this time it was included in the quote and we said we do it for Sutton too at the same time

@dracos
Copy link
Member

dracos commented Jan 15, 2026

Something more to be done on this ticket then, not sure that was known by @struan (hopefully Kingston/Sutton can share the changes to the template for displaying the target dates, so not a big change). I can probably look at this next week if @struan is on something else and it's not as simple as I hope.

@struan
Copy link
Member Author

struan commented Jan 15, 2026

I've added in target dates for Sutton. I've assumed that the target days are the same for both of them:

Container delivery escalation: 5 working days
Missed scheduled collection: 2
Missed scheduled collection escalation: 1
Missed bulky collection: 2
Missed bulky escalation: 2

@struan struan removed the request for review from chrismytton January 15, 2026 14:01
struan added 12 commits January 15, 2026 17:18
Now that Kingston are using escalations move the escalation code out of
the Sutton cobrand and into the shared Role
This is used by the escalation code to check if there's an existing
event that could be escalated
This currently assumes everthings works the same as Sutton
Kingston and Sutton have different container escalation windows so move
the configuration for the window to a function in the Cobrand
Update waste_escalation_window to be more flexible so all the escalation
data is in one place.
@struan struan force-pushed the 5258-kingston-escalation branch from 8c2daa2 to 239efb6 Compare January 15, 2026 17:34
@struan struan requested a review from chrismytton January 15, 2026 18:03
Copy link
Member

@chrismytton chrismytton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a minor question about SLAs and one comment update suggestion.

missed => 2,
missed_escalation => 1,
missed_bulky => 2,
missed_bulky_escalation => 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be 2 days, as per your comment?

missed => 2,
missed_escalation => 1,
missed_bulky => 2,
missed_bulky_escalation => 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here, should this be 2 days?

Comment on lines +174 to +175
Sutton has custom behaviour to allow escalation of unresolved missed collections
or container requests.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth updating this comment, to avoid confusing future readers.

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.

5 participants