Scarab commit: svn commit: r11107 - branches/release/1.0.22/src: conf/classes java/org/tigris/scarab/om

[email protected] Fri, 13 Apr 2012 00:14:09 -0700 (PDT)
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: mcoss
Date: 2012-04-13 00:14:09-0700
New Revision: 11107

Modified:
   branches/release/1.0.22/src/conf/classes/ScarabBundle_de.properties
   branches/release/1.0.22/src/conf/classes/ScarabBundle_en.properties
   branches/release/1.0.22/src/java/org/tigris/scarab/om/Issue.java

Log:
FIX - A reason of change, saying: "Issue was deleted.", is added to issue delete actions as for copy and move, and is therefore displayed in notification emails.

Modified: branches/release/1.0.22/src/conf/classes/ScarabBundle_de.properties
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/1.0.22/src/conf/classes/ScarabBundle_de.properties?view=diff&pathrev=11107&r1=11106&r2=11107
==============================================================================
--- branches/release/1.0.22/src/conf/classes/ScarabBundle_de.properties	(original)
+++ branches/release/1.0.22/src/conf/classes/ScarabBundle_de.properties	2012-04-13 00:14:09-0700
@@ -538,6 +538,7 @@
 OptionName=Option
 MovedIssueNote=Tickethinweis verschoben
 CopiedIssueNote=Tickethinweis wurde kopiert
+DeletedIssueNote=Ticket wurde gelöscht.
 MovedFromIssueDescription=Ticket {1} wurde in Modul {2}/{3} {0,choice,1#kopiert|2#verschoben}
 MovedToIssueDescription=Nach Ticket {1} in module {2}/{3} {0,choice,1#kopiert|2#verschoben}
 AllCopied=Alle Attribute wurden kopiert.

Modified: branches/release/1.0.22/src/conf/classes/ScarabBundle_en.properties
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/1.0.22/src/conf/classes/ScarabBundle_en.properties?view=diff&pathrev=11107&r1=11106&r2=11107
==============================================================================
--- branches/release/1.0.22/src/conf/classes/ScarabBundle_en.properties	(original)
+++ branches/release/1.0.22/src/conf/classes/ScarabBundle_en.properties	2012-04-13 00:14:09-0700
@@ -593,6 +593,7 @@
 OptionName=Option name
 MovedIssueNote=Moved issue note
 CopiedIssueNote=Copied issue note
+DeletedIssueNote=Issue was deleted.
 MovedFromIssueDescription={0,choice,1#copied|2#moved} from issue {1} in module {2}/{3}
 MovedToIssueDescription={0,choice,1#copied|2#moved} to issue {1} in module {2}/{3}
 AllCopied=All attributes were copied.

Modified: branches/release/1.0.22/src/java/org/tigris/scarab/om/Issue.java
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/1.0.22/src/java/org/tigris/scarab/om/Issue.java?view=diff&pathrev=11107&r1=11106&r2=11107
==============================================================================
--- branches/release/1.0.22/src/java/org/tigris/scarab/om/Issue.java	(original)
+++ branches/release/1.0.22/src/java/org/tigris/scarab/om/Issue.java	2012-04-13 00:14:09-0700
@@ -3207,6 +3207,19 @@
         {
             ActivitySet activitySet = attachActivitySet(null, user);
             ActivityManager.createDeleteIssueActivity(this, activitySet);
+            
+            Attachment attachment = new Attachment();
+            
+            String note = Localization.getString(
+                    ScarabConstants.DEFAULT_BUNDLE_NAME,
+                    getLocale(),
+                    "DeletedIssueNote");
+            
+            attachment.setData(note);
+            attachment.setName(note);
+            attachment.setTextFields(user, this, Attachment.MODIFICATION__PK);
+            attachment.save();         
+            
             this.setDeleted(true);
             List dependencies = this.getDependsRelatedByObservedId();
             dependencies.addAll(this.getDependsRelatedByObserverId());
@@ -3223,6 +3236,8 @@
                 }        
             }
             
+            activitySet.setAttachment(attachment);
+            
             NotificationManagerFactory.getInstance()
             .addActivityNotification(ActivityType.ISSUE_DELETED,
                     activitySet, this, user);

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2947949