[ditz-talk] [PATCH] empty comment bug

Antti Kaihola akaihol+ditz at ambitone.com
Fri Jun 6 06:46:24 EDT 2008


---
 ...e-15c2b94d3e828811815b0baa1f5efdce7d6bba54.yaml |   51 ++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)
 create mode 100644 bugs/issue-15c2b94d3e828811815b0baa1f5efdce7d6bba54.yaml

diff --git a/bugs/issue-15c2b94d3e828811815b0baa1f5efdce7d6bba54.yaml b/bugs/issue-15c2b94d3e828811815b0baa1f5efdce7d6bba54.yaml
new file mode 100644
index 0000000..24d8417
--- /dev/null
+++ b/bugs/issue-15c2b94d3e828811815b0baa1f5efdce7d6bba54.yaml
@@ -0,0 +1,51 @@
+--- !ditz.rubyforge.org,2008-03-06/issue 
+title: unmodified comment from external editor results in an invalid log_events entry
+desc: |-
+  In ditz 0.2, if an external editor is launched by the /edit command
+  but no comment is entered, an invalid log event entry is created.  The
+  'ditz log' command throws the following error message after displaying
+  the log entry:
+  
+  date  : Tue Jun 03 11:03:18 +0300 2008 (25 minutes ago)
+  author: Antti Kaihola <akaihol+ditz at ambitone.com>
+  
+    test-3: A test issue
+    changed status from unstarted to in_progress
+    
+  /var/lib/gems/1.8/gems/ditz-0.2/lib/operator.rb:455:in `log': undefined method `blank?' for nil:NilClass (NoMethodError)
+  	from /var/lib/gems/1.8/gems/ditz-0.2/lib/operator.rb:444:in `each'
+  	from /var/lib/gems/1.8/gems/ditz-0.2/lib/operator.rb:444:in `log'
+  	from /var/lib/gems/1.8/gems/ditz-0.2/lib/operator.rb:86:in `send'
+  	from /var/lib/gems/1.8/gems/ditz-0.2/lib/operator.rb:86:in `do'
+  	from /var/lib/gems/1.8/gems/ditz-0.2/bin/ditz:83
+  
+  The problem is caused by the missing double quotes in the YAML file
+  for the empty comment of the log entry (see last line in the example
+  below):
+  
+  log_events: 
+  - - 2008-06-03 08:01:22.237356 Z
+    - Antti Kaihola <akaihol+ditz at ambitone.com>
+    - created
+    - ""
+  - - 2008-06-03 08:03:18.389444 Z
+    - Antti Kaihola <akaihol+ditz at ambitone.com>
+    - changed status from unstarted to in_progress
+    - 
+  
+  If the double quotes are added manually, everything works as expected.
+type: :bugfix
+component: ditz
+release: 
+reporter: Antti Kaihola <akaihol+ditz at ambitone.com>
+status: :unstarted
+disposition: 
+creation_time: 2008-06-03 10:55:16.253594 Z
+references: []
+
+id: 15c2b94d3e828811815b0baa1f5efdce7d6bba54
+log_events: 
+- - 2008-06-03 10:55:18.004568 Z
+  - Antti Kaihola <akaihol+ditz at ambitone.com>
+  - created
+  - ""
-- 
1.5.4.3


More information about the ditz-talk mailing list