From fe2e95faa245b0df7b9bdd47ff9bf36880f966ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Fri, 20 May 2016 00:42:54 +0200 Subject: Bug 1273846 - Checksetup fails to update chart storage during pre-3.6 -> 5.0 upgrade r/a=dkl --- Bugzilla/Install/Filesystem.pm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index 4f133d865..43512e79c 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -782,22 +782,21 @@ sub _update_old_charts { # to product IDs. sub _update_old_mining_filenames { my ($miningdir) = @_; + my $dbh = Bugzilla->dbh; my @conversion_errors; - require Bugzilla::Product; - # We use a dummy product instance with ID 0, representing all products my $product_all = {id => 0, name => '-All-'}; - bless($product_all, 'Bugzilla::Product'); print "Updating old charting data file names..."; - my @products = Bugzilla::Product->get_all(); + my @products = @{ $dbh->selectall_arrayref('SELECT id, name FROM products + ORDER BY name', {Slice=>{}}) }; push(@products, $product_all); foreach my $product (@products) { - if (-e File::Spec->catfile($miningdir, $product->id)) { + if (-e File::Spec->catfile($miningdir, $product->{id})) { push(@conversion_errors, { product => $product, - message => 'A file named "' . $product->id . + message => 'A file named "' . $product->{id} . '" already exists.' }); } } @@ -805,8 +804,8 @@ sub _update_old_mining_filenames { if (! @conversion_errors) { # Renaming mining files should work now without a hitch. foreach my $product (@products) { - if (! rename(File::Spec->catfile($miningdir, $product->name), - File::Spec->catfile($miningdir, $product->id))) { + if (! rename(File::Spec->catfile($miningdir, $product->{name}), + File::Spec->catfile($miningdir, $product->{id}))) { push(@conversion_errors, { product => $product, message => $! }); @@ -822,7 +821,7 @@ sub _update_old_mining_filenames { print " FAILED:\n"; foreach my $error (@conversion_errors) { printf "Cannot rename charting data file for product %d (%s): %s\n", - $error->{product}->id, $error->{product}->name, + $error->{product}->{id}, $error->{product}->{name}, $error->{message}; } print "You need to empty the \"$miningdir\" directory, then run\n", -- cgit v1.2.1 From d6622519378217610be1e89885137a9722f45515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Wed, 1 Jun 2016 10:17:46 +0200 Subject: Bug 1269266 - API links for Bugzilla 5+ not working anymore --- docs/en/rst/installing/migrating.rst | 3 +-- docs/en/rst/integrating/extensions.rst | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/en/rst/installing/migrating.rst b/docs/en/rst/installing/migrating.rst index 5b842dd3d..8fc0de5f4 100644 --- a/docs/en/rst/installing/migrating.rst +++ b/docs/en/rst/installing/migrating.rst @@ -4,8 +4,7 @@ Migrating From Other Bug-Tracking Systems ######################################### Bugzilla has a framework you can use for migrating from other bug-tracking -systems - -`Bugzilla::Migrate `_. +systems - :api:`Bugzilla::Migrate `. It provides the infrastructure you will need, but requires a module to be written to define the specifics of the system you are coming from. One exists for diff --git a/docs/en/rst/integrating/extensions.rst b/docs/en/rst/integrating/extensions.rst index 18c5341d3..6a3fd8d3f 100644 --- a/docs/en/rst/integrating/extensions.rst +++ b/docs/en/rst/integrating/extensions.rst @@ -11,8 +11,8 @@ versions of Bugzilla with minimal effort. We maintain a written by other people on our wiki. You would need to make sure that the extension in question works with your version of Bugzilla. -Or, you can write your own extension. See the `Bugzilla Extension -documentation `_ +Or, you can write your own extension. See the :api:`Bugzilla Extension +documentation ` for the core documentation on how to do that. It would make sense to read the section on :ref:`templates`. There is also a sample extension in :file:`$BUGZILLA_HOME/extensions/Example/` which gives examples of how to @@ -183,8 +183,8 @@ bugs, except to comment and add themselves to the CC list. Because this kind of change is such a common request, we have added a specific hook for it that :ref:`extensions` can call. It's called -``bug_check_can_change_field``, and it's documented `in the Hooks -documentation `_. +``bug_check_can_change_field``, and it's documented :api:`in the Hooks +documentation `. Checking Syntax =============== -- cgit v1.2.1 From c0c58d459ef10ef03e470b8fbaabd14703fd4c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Wed, 1 Jun 2016 12:52:15 +0200 Subject: Fix the default API URL --- docs/en/rst/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/rst/conf.py b/docs/en/rst/conf.py index a758fd248..34acb4778 100644 --- a/docs/en/rst/conf.py +++ b/docs/en/rst/conf.py @@ -44,7 +44,7 @@ master_doc = 'index' # General information about the project. project = u'Bugzilla' -copyright = u'2014, The Bugzilla Team' +copyright = u'2016, The Bugzilla Team' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -387,7 +387,7 @@ todo_include_todos = False on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if on_rtd: - base_api_url = 'https://www.bugzilla.org/docs/5.0/en/html/api/' + base_api_url = 'https://www.bugzilla.org/docs/5.0/en/html/integrating/api/' else: base_api_url = '../integrating/api/' -- cgit v1.2.1