Skip to content

[Dumfries] Setting 'responsibility' on the extras of an update#512

Open
MorayMySoc wants to merge 1 commit into
masterfrom
5472-dumfries-map-utility-responsible
Open

[Dumfries] Setting 'responsibility' on the extras of an update#512
MorayMySoc wants to merge 1 commit into
masterfrom
5472-dumfries-map-utility-responsible

Conversation

@MorayMySoc

Copy link
Copy Markdown
Contributor

If there is a responsibility attribute, set it on the extra hash of an update so it can be passed through to FMS for use in templates.

Discussion on ticket about implementing this:
https://github.com/mysociety/societyworks/issues/5472

@MorayMySoc MorayMySoc requested a review from davea May 12, 2026 10:49

@davea davea left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A couple of small things in the code. However I've also not actually been able to get this to return any values even when running against the live API. So not quite sure what's going on.

}

my $mapping = $self->config->{other_responsibility_mapping};
if (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If other_responsibility_mapping isn't set in config this prints a bunch of warnings, maybe we should check for $mapping too?

my $mapping = $self->config->{other_responsibility_mapping};
if (
my $responsibility = $inspection_attrs->{ $mapping->{'highway'} }
|| $inspection_attrs->{$mapping}{'streetlight'}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is inconsistent with the structure on the previous line, I think it should be this:

Suggested change
|| $inspection_attrs->{$mapping}{'streetlight'}
|| $inspection_attrs->{ $mapping->{'streetlight'} }

@MorayMySoc MorayMySoc requested a review from davea May 15, 2026 14:14
@mysociety-pusher mysociety-pusher force-pushed the 5472-dumfries-map-utility-responsible branch from df484a7 to 2ab7167 Compare May 21, 2026 10:07
If there is a responsibility attribute, set it on the extra
hash of an update so it can be passed through to FMS
for use in templates.

Discussion on ticket about implementing this:
mysociety/societyworks#5472
@mysociety-pusher mysociety-pusher force-pushed the 5472-dumfries-map-utility-responsible branch from 2ab7167 to e4e8775 Compare May 21, 2026 11:14
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.

2 participants