← Back to team overview

gtg team mailing list archive

[Merge] lp:~nimit-svnit/gtg/bug-1193678 into lp:gtg

 

Nimit Shah has proposed merging lp:~nimit-svnit/gtg/bug-1193678 into lp:gtg.

Requested reviews:
  Gtg developers (gtg)
Related bugs:
  Bug #1193678 in Getting Things GNOME!: "empty tag created"
  https://bugs.launchpad.net/gtg/+bug/1193678

For more details, see:
https://code.launchpad.net/~nimit-svnit/gtg/bug-1193678/+merge/170962

Fix for bug #1193678 "empty tag created"

Added a check for empty tag in the add_complex_title method. Solves the bug. Also made sure that the solution is optimal. Better performance for the win! :)
-- 
https://code.launchpad.net/~nimit-svnit/gtg/bug-1193678/+merge/170962
Your team Gtg developers is requested to review the proposed merge of lp:~nimit-svnit/gtg/bug-1193678 into lp:gtg.
=== modified file 'CHANGELOG'
--- CHANGELOG	2013-06-05 04:21:37 +0000
+++ CHANGELOG	2013-06-22 19:53:26 +0000
@@ -19,6 +19,7 @@
     * System level global shortcut key for quick adding task, by Parin Porecha
     * Refactor Bugzilla plugin, by Chenxiong Qi
     * Fix for bug #816356: When sorting by due-date, use the closest date of all children, by Nimit Shah
+    * Fix for bug #1193678: Empty tag created, by Nimit Shah
 
 2012-11-06 Getting Things GNOME! 0.3
     * Hide tasks with due date someday, #931376

=== modified file 'GTG/core/task.py'
--- GTG/core/task.py	2013-05-16 09:10:54 +0000
+++ GTG/core/task.py	2013-06-22 19:53:26 +0000
@@ -158,9 +158,10 @@
                 valid_attribute = True
                 if attribute.lower() in ["tags", _("tags"), "tag", _("tag")]:
                     for tag in args.split(","):
-                        if not tag.startswith("@"):
-                            tag = "@" + tag
-                        tags.append(tag)
+                        if not tag.strip() == "@" and not tag.strip() == "":
+                            if not tag.startswith("@"):
+                                tag = "@" + tag
+                            tags.append(tag)
                 elif attribute.lower() in ["defer", _("defer"), "start",
                                            _("start")]:
                     try:


Follow ups