Closed Bug 924101 Opened 11 years ago Closed 10 years ago

Renaming a product or component doesn't update series data

Categories

(Bugzilla :: Reporting/Charting, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 267240

People

(Reporter: till, Assigned: dylan)

Details

(Whiteboard: [rename])

Attachments

(1 file)

Instead it contains a component I have never heard of: "JavaScript Debugging APIs"
Assignee: nobody → dylan
Component: Administration → General
Note that Core/JavaScript Engine has since been split up into a few components. Would be nice if these were all included.
Priority: -- → P2
It looks like we may want to run contrib/reorg-tools/fixqueries.pl when we move components.
Although that script makes me squint a bit, it seems to have the transaction begin/commit parts commented out...
Status: NEW → ASSIGNED
Attached file check-series.pl
Note: the following conclusions are from the May dataset, newer datasets probably contain more errors.

First, some numbers:

There are 687 entries in the series table that reference 25 distinct product names that do not exist.
There are 519 entries in the series table that reference 224 distinct component names that do not exist.

There are 9 components that have been "renamed", which means the name you see in the charts UI will not correspond to the name of the component.

There are 32 categories (the first select box on chart.cgi) that do not exist as products. This is after filtering out (at least some) of the reports that are not meant to directly correspond to a product. I'm sure some percentage of these are false positives, though.

There are 257 subcategories (the second select box) that do not exist as components, including "JavaScript Debugging APIs".

Although it is the default to "Create chart datasets for this product" and thus products have an entry in series, products without entries in the series table are most likely intentional.

Now, how does this happen?

Both Bugzilla::Product and Bugzilla::Component create entries in the series table when their constructors are passed a create_series param. This corresponds to the checkbox "Create chart datasets for this product" for products. This checkbox is checked by default, so user intervention is required to *not* create series data for products.

For components, editcomponents.cgi always passes create_series => 1.

The problem we're seeing happens when a product or component is renamed.
Ideally, when a product is renamed, the series.category should change to the new name,
and the series "query" (a string encoding parameters that are passed to search) should have its product adjusted accordingly.

As previously mentioned on this bug (and re-iterating my conversation in IRC earlier)
contrib/reorg-tools/fixqueries.pl handles this renaming, but as the data above shows -- we've pretty well forgotten to run it.

What can we do to fix this?

1) Centralize the component moving code. Instead of needing *several* scripts in contrib/reorg-tools/*, there should be a library routine to rename products and components.
It should handle flags, milestones, versions,  named queries, series (charts) data and anything else that is tied to a product or component name. This is filed as Bug 1084206

2) Clean up the existing series data. A solution that is looking more attractive to me is deleting the series that don't belong to a product/component, and writing a one-off script that calls Bugzilla::Product::_create_series()/Bugzilla::Component::_create_series().
Attachment #8506646 - Flags: feedback?(glob)
Attachment #8506646 - Attachment mime type: application/x-perl → text/plain
(In reply to Dylan William Hardison [:dylan] from comment #3)
> The problem we're seeing happens when a product or component is renamed.
> Ideally, when a product is renamed, the series.category should change to the
> new name, and the series "query" (a string encoding parameters that are passed to
> search) should have its product adjusted accordingly.
> [...]
> As previously mentioned on this bug (and re-iterating my conversation in IRC
> earlier)
> contrib/reorg-tools/fixqueries.pl handles this renaming, but as the data
> above shows -- we've pretty well forgotten to run it.

as renaming a product or component is a built-in function, we shouldn't have to run a script to fix series data.

this looks like an upstream bug; moving.

> 1) Centralize the component moving code. Instead of needing *several*
> scripts in contrib/reorg-tools/*, there should be a library routine to
> rename products and components.

while i agree this is a good idea, this doesn't appear to be related to this issue, as those tools are generally used to move components between products, not when renaming.  of course when a component/bug is moved, then series data should automatically be corrected.

> 2) Clean up the existing series data. A solution that is looking more
> attractive to me is deleting the series that don't belong to a
> product/component, and writing a one-off script that calls
> Bugzilla::Product::_create_series()/Bugzilla::Component::_create_series().

the code looks sane (there's a few nits, like you shouldn't do "select *"), however it doesn't belong as a standalone script; instead it should be part of schemacheck.
Component: General → Reporting/Charting
Product: bugzilla.mozilla.org → Bugzilla
QA Contact: default-qa
Summary: New Charts form doesn't contain Core/Javascript Engine → Renaming a product or component doesn't update series data
Version: Production → unspecified
Comment on attachment 8506646 [details]
check-series.pl

this should be part of schemacheck, not a standalone script.
Attachment #8506646 - Flags: feedback?(glob) → feedback-
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Whiteboard: [rename]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: