Last modified: 2014-01-01 15:55:39 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 T49502, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47502 - Allow template calls as field values
Allow template calls as field values
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
REL1_20-branch
All All
: Unprioritized minor (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-22 10:59 UTC by Keyhan Hadjari
Modified: 2014-01-01 15:55 UTC (History)
0 users

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


Attachments

Description Keyhan Hadjari 2013-04-22 10:59:00 UTC
Think of this scenario. You have three templates {{Not Started}} {{Ongoing}} and {{Done}}.

You then create a property called "project status" that could hold the values above as allowed values.

You then create a form for "project" that will include "project status"

Now the problems.

1. In the form where you have to set project status, instead of seeing the templates, you see their source code.

2. When choosing one of these values, its source code is actually chosen and so the verification fails showing you a warning. If you on the other side manually write {{Not Started}} in the "Edit Source" of the page then you will have no problems and the page is shown very well.

The problem is that the semantic forms do not support templates well. If they do then Creating powerful forms become much easier.
Comment 1 Yaron Koren 2013-08-21 21:49:51 UTC
Sorry I didn't respond to this until now. One option is to have the allowed values for that field simply by "Not Started", "Ongoing" and "Done", and then have the main template call the relevant template for whichever value the user has selected, using #if.
Comment 2 Yaron Koren 2013-12-09 20:35:50 UTC
Changing status of this to "minor".
Comment 3 Yaron Koren 2013-12-24 15:36:46 UTC
Renaming, for clarity.
Comment 4 Yaron Koren 2014-01-01 15:55:39 UTC
Marking this as "wontfix" - I think it's a bad idea to treat template calls as data; and in any case, if you really want to do this, you can get it working by adding something like "values={{Not Started}}, {{Ongoing}}, {{Done}}" to the field tag.

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


Navigation
Links