#5494 Refactor mass ticket edit

v1.0.0
closed
sf-1 (616)
General
2015-08-20
2012-12-19
No
  1. Button click handler assembles a list of ticket ids, submits them via ajax, creates a flash msg, then...reloads the whole page?! Why not do a regular form post, controller-side flash msg, then redirect back to the referrer. May still require some client-side shenanigans since we're posting values from two different forms.
  2. Fix checkbox inputs. Instead of using the ticket id for the input name, use ticket_ids-n, then use formencode to variabledecode and convert to a list.
  3. There are at least two edit and update_tickets methods in tracker_main.py that look similar. Can they be DRY'd up?
  4. When making a mass edit that updates a user-type custom field, the comment on the ticket is : ****: user02 --> user03 (**** instead of the field name)

Related

Tickets: #5673

Discussion

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,4 @@
     1. Button click handler assembles a list of ticket ids, submits them via ajax, creates a flash msg, then...reloads the whole page?! Why not do a regular form post, controller-side flash msg, then redirect back to the referrer. May still require some client-side shenanigans since we're posting values from two different forms.
     2. Fix checkbox inputs. Instead of using the ticket id for the input name, use ticket_ids-n, then use formencode to variabledecode and convert to a list.
     3. There are at least two `edit` and `update_tickets` methods in `tracker_main.py` that look similar. Can they be DRY'd up?
    +4. When making a mass edit that updates a user-type custom field, the comment on the ticket is : ****: user02 --> user03 (*** instead of the field name)
    
     
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
     1. Button click handler assembles a list of ticket ids, submits them via ajax, creates a flash msg, then...reloads the whole page?! Why not do a regular form post, controller-side flash msg, then redirect back to the referrer. May still require some client-side shenanigans since we're posting values from two different forms.
     2. Fix checkbox inputs. Instead of using the ticket id for the input name, use ticket_ids-n, then use formencode to variabledecode and convert to a list.
     3. There are at least two `edit` and `update_tickets` methods in `tracker_main.py` that look similar. Can they be DRY'd up?
    -4. When making a mass edit that updates a user-type custom field, the comment on the ticket is : ****: user02 --> user03 (*** instead of the field name)
    +4. When making a mass edit that updates a user-type custom field, the comment on the ticket is : `****`: user02 --> user03 (`****` instead of the field name)
    
     
  • Cory Johns - 2013-04-04

    allura:cj/5494

    Most of this was done in [#5673], but the refactor is in this branch.

     

    Related

    Tickets: #5673

  • Cory Johns - 2013-04-04
    • status: open --> code-review
    • assigned_to: Cory Johns
    • size: --> 1
    • milestone: limbo --> forge-apr-05
     
  • Dave Brondsema

    Dave Brondsema - 2013-04-05
    • Milestone: forge-apr-05 --> forge-apr-19
     
    • status: code-review --> in-progress
    • qa: Tim Van Steenburgh
     
  • Failing test: forgetracker.tests.functional.test_root:TestFunctionalController.test_mass_edit

     
  • Cory Johns - 2013-04-09
    • status: in-progress --> code-review
     
  • Cory Johns - 2013-04-09

    Fix and rebase force-pushed to allura:cj/5494

     
    • status: code-review --> closed
     

Log in to post a comment.