Last modified: 2007-11-02 11:04:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 11773 - linear value in factbox and list on Property page picks a random main unit
linear value in factbox and list on Property page picks a random main unit
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Markus Krötzsch
http://ontoworld.org/wiki/Property:Le...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-27 07:59 UTC by S Page
Modified: 2007-11-02 11:04 UTC (History)
0 users

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


Attachments

Description S Page 2007-10-27 07:59:52 UTC
If a type has several conversion factors and a property doesn't override display units, then the factbox and the list of property values that displays at the end of the property page both pick a random unit as the main one.  Right now ontoworld's Property:Length lists in furlongs ;-) :
  California +	6,162.8 furlongs (1.31071e-10 ly, 48,818,897.588 in, 770.5 mi, 4,068,241.476 ft, 1,240 km, 1.24e+18 pm, 124,000,000 cm, 1,240,000 m)

This is a regression from 0.7 (hence high priority?).  0.7 would list values in the main unit (the first unit in [[converts to:=1 unitA, unitB, unitC]]), with the other units in parentheses.

I noticed this testing bug 11772, but I haven't figured out the code path for this.  Special:Ask shows the right main unit, I'm not sure why the factbox and list of property values don't behave the same.
Comment 1 S Page 2007-10-27 08:19:50 UTC
I think SMW_DV_Linear just populates m_unitvalues, and getLongWikiText() of a number just iterates through this, putting everything after the first item in parentheses.  But there's no guarantee that the first item in the foreach of m_unitvalues will be the main unit.

I guess the factbox first shows the main unit and then calls getShortWikiText() to populate the tooltip, which skips the main unit.  So perhaps getLongWikiText() should do something similar.

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


Navigation
Links