From 64be6114d94ef5e8bf7056e135a0d4d8c1e7b308 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 6 Apr 2005 07:19:51 +0000 Subject: Bug 86328: Deleting bugs doesn't delete dependent records properly - Patch by Frederic Buclin r=wurblzap a=justdave --- .../en/default/admin/components/deleted.html.tmpl | 14 +---- .../admin/milestones/confirm-delete.html.tmpl | 69 ++++++---------------- .../en/default/admin/milestones/deleted.html.tmpl | 21 +++---- .../admin/versions/confirm-delete.html.tmpl | 48 ++++----------- .../en/default/admin/versions/deleted.html.tmpl | 26 -------- template/en/default/filterexceptions.pl | 6 +- template/en/default/global/user-error.html.tmpl | 23 ++++++++ 7 files changed, 64 insertions(+), 143 deletions(-) (limited to 'template/en') diff --git a/template/en/default/admin/components/deleted.html.tmpl b/template/en/default/admin/components/deleted.html.tmpl index 6efa38843..83c006869 100644 --- a/template/en/default/admin/components/deleted.html.tmpl +++ b/template/en/default/admin/components/deleted.html.tmpl @@ -36,23 +36,15 @@

[% IF deleted_bug_count %] - Attachments, [% terms.bug %] activity and dependencies deleted for - [%+ deleted_bug_count %] - [%- IF deleted_bug_count %] - [% terms.bugs %] - [% ELSE %] - [% terms.bug %] - [% END %]. - -

[% deleted_bug_count %] - [%- IF deleted_bug_count %] + [%- IF deleted_bug_count > 1 %] [% terms.bugs %] [% ELSE %] [% terms.bug %] [% END %] deleted. - +

+ All references to those deleted [% terms.bugs %] have been removed. [% ELSE %] No [% terms.bugs %] existed for the component. [% END %] diff --git a/template/en/default/admin/milestones/confirm-delete.html.tmpl b/template/en/default/admin/milestones/confirm-delete.html.tmpl index 893b849ae..c3d379cbd 100644 --- a/template/en/default/admin/milestones/confirm-delete.html.tmpl +++ b/template/en/default/admin/milestones/confirm-delete.html.tmpl @@ -17,6 +17,7 @@ # Rights Reserved. # # Contributor(s): Gavin Shelley + # Frédéric Buclin #%] [%# INTERFACE: @@ -69,66 +70,30 @@ [% IF bug_count %] - [% IF !Param("allowbugdeletion") %] - - Sorry, there - + + +
+ There [% IF bug_count > 1 %] are [% bug_count %] [%+ terms.bugs %] [% ELSE %] - is [% bug_count %] [%+ terms.bug %] - [% END %] - - outstanding for this milestone. You must move - - [% IF bug_count > 1 %] - those [% terms.bugs %] - [% ELSE %] - that [% terms.bug %] + is 1 [% terms.bug %] [% END %] - - to another milestone before you can delete this one. - - [% ELSE %] - -
- - There [% IF bug_count > 1 %] - are [% bug_count %] [%+ terms.bugs %] - [% ELSE %] - is 1 [% terms.bug %] - [% END %] - entered for this milestone! When you delete this - milestone, ALL stored [% terms.bugs %] will be deleted, - too. - You could not even see the [% terms.bug %] history for this milestone anymore! -
- - [% END %] + entered for this milestone! When you delete this milestone, + ALL stored [% terms.bugs %] will be reassigned to + the default milestone of this product. +
[% END %] -[% IF default_milestone == name %] - -

Sorry, but '[% name FILTER html %]' is the default milestone for product ' - [%- product FILTER html %]', and so it can not be deleted. - - [% ELSE %] - - [% IF bug_count == 0 || Param('allowbugdeletion') %] +

Do you really want to delete this milestone?

-

Do you really want to delete this milestone?

- -

- - - - -
- - [% END %] - -[% END %] +
+ + + + +
[% PROCESS admin/milestones/footer.html.tmpl %] diff --git a/template/en/default/admin/milestones/deleted.html.tmpl b/template/en/default/admin/milestones/deleted.html.tmpl index 61abb38e5..3a3e52ab5 100644 --- a/template/en/default/admin/milestones/deleted.html.tmpl +++ b/template/en/default/admin/milestones/deleted.html.tmpl @@ -17,6 +17,7 @@ # Rights Reserved. # # Contributor(s): Gavin Shelley + # Frédéric Buclin #%] [%# INTERFACE: @@ -24,8 +25,8 @@ # # product: string; the name of the product the milestone belonged to # - # deleted_bug_count: number; the number of bugs which were deleted - # (if bug deletion is allowed) + # bug_count: number; the number of bugs which were reassigned to + # the default milestone. #%] [% title = BLOCK %]Deleted Milestone '[% name FILTER html %]' of Product @@ -35,23 +36,15 @@ %]

-[% IF deleted_bug_count %] - Attachments, [% terms.bug %] activity and dependencies deleted for - [%+ deleted_bug_count %] - [% IF deleted_bug_count > 1 %] - [%+ terms.bugs %] - [% ELSE %] - [%+ terms.bug %] - [% END %]. +[% IF bug_count %] -

- [% deleted_bug_count %] - [% IF deleted_bug_count > 1 %] + [% bug_count %] + [% IF bug_count > 1 %] [%+ terms.bugs %] [% ELSE %] [%+ terms.bug %] [% END %] - deleted. + reassigned to the default milestone. [% ELSE %] No [% terms.bugs %] were targetted at the milestone. diff --git a/template/en/default/admin/versions/confirm-delete.html.tmpl b/template/en/default/admin/versions/confirm-delete.html.tmpl index 5f9b93943..acc20aeca 100644 --- a/template/en/default/admin/versions/confirm-delete.html.tmpl +++ b/template/en/default/admin/versions/confirm-delete.html.tmpl @@ -17,6 +17,7 @@ # Rights Reserved. # # Contributor(s): Gavin Shelley + # Frédéric Buclin #%] [%# INTERFACE: @@ -67,46 +68,23 @@ [% IF bug_count %] - [% IF !Param("allowbugdeletion") %] - - Sorry, there - - [% IF bug_count > 1 %] - are [% bug_count %] [%+ terms.bugs %] - [% ELSE %] - is [% bug_count %] [%+ terms.bug %] - [% END %] - - outstanding for this version. You must move - - [% IF bug_count > 1 %] - those [% terms.bugs %] - [% ELSE %] - that [% terms.bug %] - [% END %] - - to another version before you can delete this one. - + Sorry, there + [% IF bug_count > 1 %] + are [% bug_count %] [%+ terms.bugs %] [% ELSE %] + is [% bug_count %] [%+ terms.bug %] + [% END %] -
- - There [% IF bug_count > 1 %] - are [% bug_count %] [%+ terms.bugs %] - [% ELSE %] - is 1 [% terms.bug %] - [% END %] - entered for this version! When you delete this - version, ALL stored [% terms.bugs %] will be deleted, - too. - You could not even see the [% terms.bug %] history for this version anymore! -
+ outstanding for this version. You must move + [% IF bug_count > 1 %] + those [% terms.bugs %] + [% ELSE %] + that [% terms.bug %] [% END %] + to another version before you can delete this one. -[% END %] - -[% IF bug_count == 0 || Param('allowbugdeletion') %] +[% ELSE %]

Do you really want to delete this version?

diff --git a/template/en/default/admin/versions/deleted.html.tmpl b/template/en/default/admin/versions/deleted.html.tmpl index f6945ccd3..2ec3ebe10 100644 --- a/template/en/default/admin/versions/deleted.html.tmpl +++ b/template/en/default/admin/versions/deleted.html.tmpl @@ -24,8 +24,6 @@ # # product: string; the name of the product the version belonged to # - # deleted_bug_count: number; the number of bugs which were deleted - # (if bug deletion is allowed) #%] [% title = BLOCK %]Deleted Version '[% name FILTER html %]' of Product @@ -34,30 +32,6 @@ title = title %] -

-[% IF deleted_bug_count %] - Attachments, [% terms.bug %] activity and dependencies deleted for - [%+ deleted_bug_count %] - [% IF deleted_bug_count > 1 %] - [%+ terms.bugs %] - [% ELSE %] - [%+ terms.bug %] - [% END %]. - -

- [% deleted_bug_count %] - [% IF deleted_bug_count > 1 %] - [%+ terms.bugs %] - [% ELSE %] - [%+ terms.bug %] - [% END %] - deleted. - -[% ELSE %] - No [% terms.bugs %] were targetted at the version. -[% END %] -

-

Version '[% name FILTER html %]' deleted.

diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 19625ea72..7b7ba5134 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -624,17 +624,13 @@ ], 'admin/milestones/deleted.html.tmpl' => [ - 'deleted_bug_count' + 'bug_count' ], 'admin/versions/confirm-delete.html.tmpl' => [ 'bug_count' ], -'admin/versions/deleted.html.tmpl' => [ - 'deleted_bug_count' -], - 'admin/settings/edit.html.tmpl' => [ 'name', 'checkbox_name' diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 92bc52990..f5bb9703b 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -249,6 +249,12 @@ [% title = "Blank Component Name Not Allowed" %] You must enter a name for this new component. + [% ELSIF error == "component_has_bugs" %] + [% title = BLOCK %]Component has [% terms.Bugs %][% END %] + There are [% nb FILTER html %] [%+ terms.bugs %] entered for this component! + You must reassign those [% terms.bugs %] to another component before you + can delete this one. + [% ELSIF error == "component_must_have_a_name" %] [% title = "Blank Component Name Not Allowed" %] You cannot delete the component name for component '[% name FILTER html %]'. @@ -683,6 +689,11 @@ [% title = "Blank Milestone Name Not Allowed" %] You must enter a name for this milestone. + [% ELSIF error == "milestone_is_default" %] + [% title = "Default milestone not deletable" %] + Sorry, but [% name FILTER html %] is the default milestone for + product '[% product FILTER html %]', and so it can not be deleted. + [% ELSIF error == "milestone_name_too_long" %] [% title = "Milestone Name Is Too Long" %] The name of a milestone is limited to 20 characters. @@ -911,6 +922,12 @@ You are not permitted to edit [% terms.bugs %] in product [% product FILTER html %]. + [% ELSIF error == "product_has_bugs" %] + [% title = BLOCK %]Product has [% terms.Bugs %][% END %] + There are [% nb FILTER html %] [%+ terms.bugs %] entered for this product! + You must reassign those [% terms.bugs %] to another product before you + can delete this one. + [% ELSIF error == "query_name_missing" %] [% title = "No Search Name Specified" %] You must enter a name for your search. @@ -1026,6 +1043,12 @@ [% title = "Blank Version Name Not Allowed" %] You must enter a name for this version. + [% ELSIF error == "version_has_bugs" %] + [% title = BLOCK %]Version has [% terms.Bugs %][% END %] + There are [% nb FILTER html %] [%+ terms.bugs %] associated with this + version! You must reassign those [% terms.bugs %] to another version + before you can delete this one. + [% ELSIF error == "version_name_too_long" %] [% title = "Version Name Is Too Long" %] The name of a version is limited to 20 characters. -- cgit v1.2.3-24-g4f1b