Last modified: 2010-05-27 10:15:11 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 T25680, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23680 - Forcing a default unit for Properties
Forcing a default unit for Properties
Status: NEW
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: 2010-05-27 10:15 UTC by Dan Bolser
Modified: 2010-05-27 10:15 UTC (History)
0 users

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


Attachments

Description Dan Bolser 2010-05-27 10:15:11 UTC
If I have a property of type 'size' that can accept mm, cm, m, km, etc. and these units correspond to 0.01, 0.1, 1, 1000, respectively. If the user then enters a number without specifying the unit, is there a way to have SMW automatically assume that value corresponds to the unit for which '1' is assigned (in this case, m)?

Answer: No!


The unit for which the conversion fact of 1 is assigned, the "Standard Unit" or "main unit", *should be* the default unit used when none is specified by the user.

Not specifying a unit causes the property to 'break':

The type "Time":
* [[Corresponds to::1 h, hour, hours]]
* [[Corresponds to::3600 s, second, seconds]]


The property "Has duration":
* [[Has type::Time]]


The page "Sandbox":
* [[Has duration::3]]
* [[Has duration::2 hours]]
* [[Has duration::10 seconds]]

{{#show: {{PAGENAME}} | ? Has duration # s }}


The show query does not return the value of 3 hours in seconds...


See thread: http://tinyurl.com/39nq2h8

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


Navigation
Links