Last modified: 2009-09-09 09:48:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T16835, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14835 - New type for #ask queries: Total!
New type for #ask queries: Total!
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-16 13:19 UTC by Robert Murphy
Modified: 2009-09-09 09:48 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Robert Murphy 2008-07-16 13:19:08 UTC
Instead of type=count it's type=total.  This would attempt to add all the values of first solicited parameter.  For example:
{{#ask: [[Category:Prime number]] [[Numerical value::<10]]
 |?Numerical value
 |type = total
}}
would return 17 (2+3+5+7) on a wiki with pages "Two" "Three" "Five" "Seven" which were all in the category:Prime_Numbers and had propery "Numerical value" equal to their value.  Additional ?'s in the ask would be ignored.  Lack of a value would return 0.  Strings and other non-numerical values in the requested parameter would result in nonsensical returns.
Comment 1 Siebrand Mazeland 2008-08-11 11:05:30 UTC
Re-assign to extension developer for triage/comments.
Comment 2 planetenxin 2009-01-14 08:29:14 UTC
see also: http://www.nabble.com/Adding-a-%27sum%27-format-for-inline-queries-td20885326.html

Okay, I just talked to Markus, who said that 'sum' and any other math functions should go into Semantic Result Formats and that the general goal is to get all but the most basic formats (i.e. list, table, etc.) into SRF. And yes, 'average', 'min' and 'max' also make sense.

Nathan, if you have code for 'sum', could you please send it to me?

-Yaron
Comment 3 Markus Krötzsch 2009-09-09 09:48:42 UTC
Output formats for sum, min, max, etc. have long been added to SRF now. Closing bug.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links