~psivaa/uci-engine/find-missing-mps

« back to all changes in this revision

Viewing changes to webui/tickets/static/tickets/webuiforms.js

  • Committer: Parameswaran Sivatharman
  • Date: 2014-12-17 21:07:03 UTC
  • Revision ID: para.siva@canonical.com-20141217210703-vwvattg2wq9i1qy3
Add tests make them pas

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
 
253
253
            if (!src){
254
254
                form_data['subtickets'].forEach( function(f) {
255
 
                    f['merge_proposals'].forEach (function (m) {
256
 
                          form_entries.push(m['lp_url']);
257
 
                     });
258
 
                }  );
 
255
                    if (f['merge_proposals']) {
 
256
                        f['merge_proposals'].forEach (function (m) {
 
257
                              form_entries.push(m['lp_url']);            
 
258
                        });
 
259
                    }
 
260
                });
259
261
            }
260
262
            else {
261
263
                form_data['subtickets'].forEach( function(f) {
360
362
            }
361
363
 
362
364
            var mps = [];
 
365
            var sources = [];
363
366
            // Load ticket information from TS and pre-fill the form.
364
367
            Y.io('/api/v1/fullticket/' + ticket_id + '/', {
365
368
                sync: true,
379
382
                                    'value', (ticket[name] || '').toString());
380
383
                                break;
381
384
                            case 'sources':
382
 
                                var sources = [];
383
385
                                ticket.subticket.forEach( function(s) {
384
386
                                    sources.push(s.sourcepackage.name);
385
387
                                });