allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [45/50] [abbrv] git commit: [#5673] Removed unused mass-edit views on Milestone controller
Date Mon, 08 Apr 2013 15:19:46 GMT
[#5673] Removed unused mass-edit views on Milestone controller

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/46780f88
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/46780f88
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/46780f88

Branch: refs/heads/db/6007
Commit: 46780f88bbbc4fd39b2c5b2a10529f436d987e6c
Parents: 17728a5
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Thu Apr 4 18:48:08 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu Apr 4 18:48:23 2013 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/tracker_main.py |   59 ------------------------
 1 files changed, 0 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/46780f88/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index bec418e..7cde33e 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -1698,62 +1698,3 @@ class MilestoneController(BaseController):
         c.ticket_search_results = W.ticket_search_results
         c.auto_resize_textarea = W.auto_resize_textarea
         return result
-
-    @with_trailing_slash
-    @expose('jinja:forgetracker:templates/tracker/mass_edit.html')
-    @validate(dict(q=validators.UnicodeString(if_empty=None),
-                   limit=validators.Int(if_empty=10),
-                   page=validators.Int(if_empty=0),
-                   sort=validators.UnicodeString(if_empty='ticket_num_i asc')))
-    def edit(self, q=None, limit=None, page=None, sort=None, columns=None, **kw):
-        require_access(c.app, 'update')
-        result = TM.Ticket.paged_query(c.app.config, c.user,
-            self.mongo_query, page=page, sort=sort, **kw)
-        result['columns'] = columns or mongo_columns()
-        result['sortable_custom_fields'] = c.app.globals.sortable_custom_fields_shown_in_search()
-        # if c.app.globals.milestone_names is None:
-        #     c.app.globals.milestone_names = ''
-        result.pop('q')
-        result['globals'] = c.app.globals
-        result['cancel_href'] = '..'
-        c.user_select = ffw.ProjectUserCombo()
-        c.mass_edit = W.mass_edit
-        c.mass_edit_form = W.mass_edit_form
-        return result
-
-    @expose()
-    @require_post()
-    def update_tickets(self, **post_data):
-        tickets = TM.Ticket.query.find(dict(
-                _id={'$in':[ObjectId(id) for id in post_data['selected'].split(',')]},
-                app_config_id=c.app.config._id)).all()
-        for ticket in tickets:
-            require_access(ticket, 'update')
-
-        fields = set(['status'])
-        values = {}
-        for k in fields:
-            v = post_data.get(k)
-            if v: values[k] = v
-        assigned_to = post_data.get('assigned_to')
-        if assigned_to == '-':
-            values['assigned_to_id'] = None
-        elif assigned_to is not None:
-            user = c.project.user_in_project(assigned_to)
-            if user:
-                values['assigned_to_id'] = user._id
-
-        custom_fields = set([cf.name for cf in c.app.globals.custom_fields or[]])
-        custom_values = {}
-        for k in custom_fields:
-            v = post_data.get(k)
-            if v: custom_values[k] = v
-
-        for ticket in tickets:
-            for k, v in values.iteritems():
-                setattr(ticket, k, v)
-            for k, v in custom_values.iteritems():
-                ticket.custom_fields[k] = v
-
-        c.app.globals.invalidate_bin_counts()
-        ThreadLocalORMSession.flush_all()


Mime
View raw message