summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/MyDashboard/lib/WebService.pm14
1 files changed, 14 insertions, 0 deletions
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 }};
}