loading a bug with an inactive-but-set tracking flag throws: Can't call method "sortkey" on an undefined value

RESOLVED FIXED

Status

()

--
critical
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

Production

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
loading a bug with an inactive-but-set tracking flag throws
  Can't call method "sortkey" on an undefined value.

this happens because is_active is passed to TrackingFlags::Flag::match(), which is then passed to the SUPER match(), so the inactive flags are never visible.

when the preload method loads the values, it creates a non-blessed hashref for bug_flag, resulting in the error.
(Assignee)

Comment 1

6 years ago
Attachment #792046 - Flags: review?(dkl)
Comment on attachment 792046 [details] [diff] [review]
906597_1.patch

Review of attachment 792046 [details] [diff] [review]:
-----------------------------------------------------------------

r=dkl

::: extensions/TrackingFlags/lib/Flag.pm
@@ +186,4 @@
>          $params->{'id'} = \@flag_ids;
>      }
>  
> +    # We need to return invactive flags if a value has been set

s/invactive/inactive/
Attachment #792046 - Flags: review?(dkl) → review+
(Assignee)

Comment 3

6 years ago
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified extensions/TrackingFlags/lib/Flag.pm
Committed revision 8958.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.