Bug 2036191 - Crash Signature Field Mismatch in Bugzilla REST API#2612
Bug 2036191 - Crash Signature Field Mismatch in Bugzilla REST API#2612dklawren wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a Bugzilla REST API inconsistency where cf_crash_signature (and other custom fields) may be stored on a bug but omitted from REST responses due to product/component visibility filtering.
Changes:
- Add “Web Compatibility” to the product allowlist for
cf_crash_signaturevisibility. - Update REST bug serialization to also emit non-empty values for custom fields that are not enabled for the bug’s product/component.
- Update bug update logic (
set_all) to only set custom fields that are enabled for the bug’s current product/component.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| extensions/BMO/lib/Data.pm | Expands cf_crash_signature visibility to include the “Web Compatibility” product. |
| Bugzilla/WebService/Bug.pm | REST: emits stored values for non-enabled custom fields when non-empty. |
| Bugzilla/Bug.pm | Limits which custom fields set_all will set based on product/component-enabled custom fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| my $name = $field->name; | ||
| next if !filter_wants($params, $name, ['default', 'custom']); | ||
| my $raw = $bug->$name; | ||
| next if !defined($raw) || $raw eq ''; |
There was a problem hiding this comment.
Claude thinks this line will allow --- through as an option, and that this is the default field which should be skipped for FIELD_TYPE_SINGLE_SELECT fields. Is it safe to assume '' is the field's default?
| # And set custom fields. | ||
| my @custom_fields | ||
| = grep { $_->type != FIELD_TYPE_EXTENSION } Bugzilla->active_custom_fields; | ||
| = grep { $_->type != FIELD_TYPE_EXTENSION } Bugzilla->active_custom_fields( | ||
| {product => $self->product_obj, component => $self->component_obj} | ||
| ); |
There was a problem hiding this comment.
Seems like it is possible to drop writes if the bug is moved to a product where the field isn't enabled? Is that intentional?
No description provided.