Last modified: 2012-03-05 19:58:53 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 T36983, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34983 - Sum result format should have default parameter
Sum result format should have default parameter
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticResultFormats (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-05 12:31 UTC by Leonard Wallentin
Modified: 2012-03-05 19:58 UTC (History)
2 users (show)

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


Attachments

Description Leonard Wallentin 2012-03-05 12:31:04 UTC
The "sum" result format do currently not have a default parameter. A default parameter would be useful for making it print "0" for an empty list, rather than nothing, as that can sometimes be the true meaning of an empty list.
Comment 1 Yaron Koren 2012-03-05 18:55:05 UTC
Hi Leonard - wouldn't "0", or any other number, be misleading in that case? Can you give an example of when this would be helpful? I just want to understand the request better.
Comment 2 Jeroen De Dauw 2012-03-05 19:23:40 UTC
r113065

Could be misleading in certain cases, so I made this possible to do, bit left the default behavior to what it was.
Comment 3 Leonard Wallentin 2012-03-05 19:58:53 UTC
Thanks for responding to this!

Yaron: Yes it would probably be misleading in many (most?) cases but not all, sometimes no value really means "0". For instance, I have a setup where trading figures are imported with Extension:GetData into SIO's, and I use the sum format to set another property, "total amount imported" (I'll skip the details, I guess you get the idea). Sometimes two countries in the matrix do not have any reported trade between them, and then there will be no corresponding SIO. In that case I would want the total amount property to be 0, rather than not set at all. 

And Jereon, thank you for the quick fix!

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


Navigation
Links