Topic on VisualEditor/Feedback

Autofill template date field with current month and year

4
Matt Heard (talkcontribs)

I have been using the VisualEditor to add templates while editing and am very happy with how easy it is. One thing I noticed is that a lot of templates have a 'date' field which should be filled with the current month and year. For example, if I add the "refimprove" template to an article, I enter the current month and year into the 'date' field so that it can be prioritised correctly on the "refimprove" backlog. Is it possible to modify the functionality of the template insertion tool so that the 'date' field can be automatically filled with the current month and year? For example, opening the template insertion tool for the "refimprove" template could have the 'date' field already added with the current month and year. Thank you so much for the great tools you have been building. It has made my hobby of editing Wikipedia much more fun.

Ceyockey (talkcontribs)

@Matt_Heard: This is a good idea. It is already implemented in the process of generating citations from URLs, where the accessdate parameter is auto-filled. I think there are a class of templates, among them refimprove, that would benefit from automated population of the date field. One question to the developers, though: would the autofill date be based on your personal time-zone setting or on the GMT standard used in time stamping edits? My thinking is that the GMT standard would be better, more consistent across editors -- so there you have a data-tangible benefit: increased consistency of date parameters.

Whatamidoing (WMF) (talkcontribs)

Hi Matt and Ceyockey,

This already exists. It is what I used to make this edit. You need to update the TemplateData to include "autovalues". I updated w:en:Template:Refimprove at en.wp since it was the one Matt mentioned. I'm not an admin, so I can’t make a null edit on the template; consequently, it will take a while to get that change through the job queue.