https://bugzilla.wikimedia.org/show_bug.cgi?id=47123

       Web browser: ---
            Bug ID: 47123
           Summary: SMWAggregatablePrinter fails to aggregate numbers
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Semantic MediaWiki
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

Based on an email [1] from  Krabina Bernhard and after some investigation
SMWAggregatablePrinter was suppose to generate aggregate numbers for the
following sample data set. 

## Example

Subject = Test

[[AA::4]]
[[BB::2]]
[[CC::16]]
[[DD::0]]
[[EE::5 ]]
[[FF::3]]
[[GG::2]]

[[Category:Test123]]

{{#ask: [[Category:Test123]]
|?AA
|?BB
|?CC
|?DD
|?EE
|?FF
|?GG
|format=...
}}

SMWAggregatablePrinter::getNumericResults would output (for subject "Test")

array(1) {
  ["Test"]=>
  float(2) ---> wrong number
}

and for mainlabel=-

array(1) {
  [4]=>   ---> no label
  float(2) ---> wrong number
}

Where in fact expected results for subject "Test" are

array(1) {
  ["Test"]=>  ---> expected label
  float(32)   ---> expected result (aggregate numbers for Test)
}

and for mainlabel=-

array(6) {
  ["BB"]=>
  float(2)
  ["CC"]=>
  float(16)
  ["DD"]=>
  float(0)
  ["EE"]=>
  float(5)
  ["FF"]=>
  float(3)
  ["GG"]=>
  float(2)
}

[1] http://sourceforge.net/mailarchive/message.php?msg_id=30710813

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to