From 428c3d0873e9817156c19f45763117b4701d6e5d Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Tue, 10 Dec 2013 10:10:38 -0500 Subject: Bug 947675 - Bug id are sorted in wrong order r=glob --- extensions/MyDashboard/lib/WebService.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'extensions/MyDashboard') diff --git a/extensions/MyDashboard/lib/WebService.pm b/extensions/MyDashboard/lib/WebService.pm index a43aa97ab..29abbb3a3 100644 --- a/extensions/MyDashboard/lib/WebService.pm +++ b/extensions/MyDashboard/lib/WebService.pm @@ -70,6 +70,10 @@ sub run_bug_query { = $self->datetime_format_inbound($comment->{creation_time}) if !$last_changes->{when}; } $b->{last_changes} = $last_changes; + + # Set the data type properly for webservice clients + # for non-string values. + $b->{bug_id} = $self->type('int', $b->{bug_id}); } $query_string =~ s/^POSTDATA=&//; @@ -92,6 +96,16 @@ sub run_flag_query { param => 'type' }); my $results = query_flags($type); + + # Set the data type properly for webservice clients + # for non-string values. + foreach my $flag (@$results) { + $flag->{id} = $self->type('int', $flag->{id}); + $flag->{attach_id} = $self->type('int', $flag->{attach_id}); + $flag->{bug_id} = $self->type('int', $flag->{bug_id}); + $flag->{is_patch} = $self->type('boolean', $flag->{is_patch}); + } + return { result => { $type => $results }}; } -- cgit v1.2.3-24-g4f1b