aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js5
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 71fef3855..80b74a669 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
- Application user in Docker container can't install packages. #2914
- Look at all categories when sending reports.
- Provide access to staff-only categories in admin.
+ - Maintain group on pin move with same category in multiple groups. #2962
- Development improvements:
- Refactor Script::Report into an object.
- Move summary failures to a separate script.
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 15ba18df4..f0b4cbb84 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -1362,7 +1362,10 @@ fixmystreet.fetch_reporting_data = function() {
}
$('#form_category_row').html(data.category);
- if ($("#form_category option[value=\"" + old_category + "\"]").length) {
+ var cat_in_group = $("#form_category optgroup[label=\"" + old_category_group + "\"] option[value=\"" + old_category + "\"]");
+ if (cat_in_group.length) {
+ cat_in_group.prop({selected:true});
+ } else if ($("#form_category option[value=\"" + old_category + "\"]").length) {
$("#form_category").val(old_category);
} else if (filter_category !== undefined && $("#form_category option[value='" + filter_category + "']").length) {
// If the category filter appears on the map and the user has selected