Closed Bug 1160430 Opened 6 years ago Closed 6 years ago

Backport bug 69267 to BMO (Add the ability to deactivate keywords)

Categories

(bugzilla.mozilla.org :: General, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dylan, Assigned: dylan)

References

Details

Attachments

(1 file, 1 obsolete file)

SSIA
Blocks: 1111052
Summary: Backport keyword deactivations from bug 69267 → Backport bug 69267 to BMO (Add the ability to deactivate keywords)
Attached patch 1160430_3.patch β€” β€” Splinter Review
After a minor amount of discomfort from how far differences between bmo and upstream, this is ready for review.
Attachment #8601484 - Flags: review?(glob)
Comment on attachment 8601484 [details] [diff] [review]
1160430_3.patch

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

r=glob, fix the issues on commit

** just commit the changes to Schema.pm and DB.pm ** and leave the bug open.  i'll commit the rest after i've pushed the schema changes to prod.

::: Bugzilla/Install/DB.pm
@@ +721,4 @@
>      # 2014-10-?? dkl@mozilla.com - Bug 1062940
>      $dbh->bz_alter_column('bugs', 'alias', { TYPE => 'varchar(40)' });
>  
> +    # 2014-11-18 dylan@mozilla.com - Bug 69267

neither the date or bug number are correct

::: editkeywords.cgi
@@ +82,5 @@
>  #
>  if ($action eq 'new') {
>      check_token_data($token, 'add_keyword');
> +    my $name      = $cgi->param('name') || '';
> +    my $is_active = $cgi->param('is_active');

is_active isn't on the form, and isn't used.

@@ +88,3 @@
>  
>      my $keyword = Bugzilla::Keyword->create(
>          { name => $name, description => $desc });

for clarity pass in | is_active => 1 | to the constructor

::: template/en/default/global/user-error.html.tmpl
@@ +1401,4 @@
>        Either you mis-typed the name or that user has not yet registered
>        for a [% terms.Bugzilla %] account.
>      [% ELSIF class == "Bugzilla::Keyword" %]
> +      The legal keyword names are <a href="describekeywords.cgi?show_inactive_keywords=1">listed

use upstream's wording of this error, it's much clearer

::: template/en/default/reports/keywords.html.tmpl
@@ +34,5 @@
>    title = "$terms.Bugzilla Keyword Descriptions"
>  %]
>  
> +<script>
> + $(document).ready(function () {

nit: indentation here is off

@@ +52,5 @@
> +             link.html("Show inactive keywords");
> +         }
> +         event.preventDefault();
> +     }).click();
> + });

.. and here
Attachment #8601484 - Flags: review?(glob) → review+
schema only

To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   0622523..bdaf609  master -> master
Attached patch 1160430_4.patch (obsolete) β€” β€” Splinter Review
Patch to commit (everything *except* the schema changes, which were commited)
Attachment #8601484 - Attachment is obsolete: true
Attachment #8605418 - Flags: review+
Attachment #8601484 - Attachment is obsolete: false
Comment on attachment 8605418 [details] [diff] [review]
1160430_4.patch

this isn't a valid patch
Attachment #8605418 - Attachment is obsolete: true
Attachment #8605418 - Flags: review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   1e23e69..64fd94e  master -> master
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.