a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
...
...
312
                    label='Milestone',
312
                    label='Milestone',
313
                    type='milestone',
313
                    type='milestone',
314
                    milestones=[
314
                    milestones=[
315
                        dict(name='1.0', complete=False, due_date=None),
315
                        dict(name='1.0', complete=False, due_date=None),
316
                        dict(name='2.0', complete=False, due_date=None)]) ])
316
                        dict(name='2.0', complete=False, due_date=None)]) ])
317
        c.app.globals.invalidate_bin_counts()
317
        self.globals.update_bin_counts()
318
        # create default search bins
318
        # create default search bins
319
        TM.Bin(summary='Open Tickets', terms=self.globals.not_closed_query,
319
        TM.Bin(summary='Open Tickets', terms=self.globals.not_closed_query,
320
                app_config_id = self.config._id, custom_fields = dict())
320
                app_config_id = self.config._id, custom_fields = dict())
321
        TM.Bin(summary='Closed Tickets', terms=self.globals.closed_query,
321
        TM.Bin(summary='Closed Tickets', terms=self.globals.closed_query,
322
                app_config_id=self.config._id, custom_fields=dict())
322
                app_config_id=self.config._id, custom_fields=dict())
...
...
679
            require_access(ticket, 'update')
679
            require_access(ticket, 'update')
680
        else:
680
        else:
681
            require_access(c.app, 'create')
681
            require_access(c.app, 'create')
682
            ticket = TM.Ticket.new()
682
            ticket = TM.Ticket.new()
683
        ticket.update(ticket_form)
683
        ticket.update(ticket_form)
684
        c.app.globals.invalidate_bin_counts()
684
        g.director.create_activity(c.user, 'created', ticket,
685
        g.director.create_activity(c.user, 'created', ticket,
685
                related_nodes=[c.project])
686
                related_nodes=[c.project])
686
        redirect(str(ticket.ticket_num)+'/')
687
        redirect(str(ticket.ticket_num)+'/')
687
688
688
    @with_trailing_slash
689
    @with_trailing_slash
...
...
1019
        if errors:
1020
        if errors:
1020
            # There were errors in some of the search terms. Render the edit
1021
            # There were errors in some of the search terms. Render the edit
1021
            # page so the user can fix the errors.
1022
            # page so the user can fix the errors.
1022
            return dict(bins=saved_bins, count=len(bins), app=self.app,
1023
            return dict(bins=saved_bins, count=len(bins), app=self.app,
1023
                    new_bin=new_bin, errors=errors)
1024
                    new_bin=new_bin, errors=errors)
1025
        self.app.globals.invalidate_bin_counts()
1024
        # No errors, redirect to search bin list page.
1026
        # No errors, redirect to search bin list page.
1025
        self.app.globals.invalidate_bin_counts()
1026
        redirect('.')
1027
        redirect('.')
1027
1028
1028
class changelog(object):
1029
class changelog(object):
1029
    """
1030
    """
1030
    A dict-like object which keeps log about what keys have been changed.
1031
    A dict-like object which keeps log about what keys have been changed.
...
...
1323
            if not has_access(tracker, 'admin')():
1324
            if not has_access(tracker, 'admin')():
1324
                flash('You should have admin access to destination tracker', 'error')
1325
                flash('You should have admin access to destination tracker', 'error')
1325
                redirect(request.referer)
1326
                redirect(request.referer)
1326
1327
1327
            new_ticket = self.ticket.move(tracker)
1328
            new_ticket = self.ticket.move(tracker)
1329
            c.app.globals.invalidate_bin_counts()
1328
            flash('Ticket successfully moved')
1330
            flash('Ticket successfully moved')
1329
            redirect(new_ticket.url())
1331
            redirect(new_ticket.url())
1330
1332
1331
        # collect all 'Tickets' instances in all user project for which his has admin perms
1333
        # collect all 'Tickets' instances in all user project for which his has admin perms
1332
        trackers = []
1334
        trackers = []