Talk:Stewards/elections 2011/Guidelines

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

Eligibility tool[edit]

One of the requirement is

  • hold or have held administrator rights on one Wikimedia Foundation project for a period of at least three months.

but the tool cannot detect that I had been an admin at id.wp for a year before I resigned last October. So I don't know whether it's a bug or intended, but without any changes, it can't be used to check the eligibility of this year's candidates. Bennylin 12:19, 19 January 2011 (UTC)

Hello Bennylin. Thanks for reporting the inconsistency; I'll look into adding that to the script tonight. —Pathoschild 18:50:36, 19 January 2011 (UTC)
Allright. Cheers. Bennylin 00:57, 20 January 2011 (UTC)
The toolserver databases are currently down, so I'm waiting for the server administrators to resolve the problem. Feel free to poke me if I haven't responded here in a couple of days. —Pathoschild 01:48:59, 20 January 2011 (UTC)
Done. Let me know if you see any corrections needed in the new algorithm. —Pathoschild 05:57:58, 26 January 2011 (UTC)

Add partial eligibility check to nominations notice[edit]

I saw that Dferg added a clarification to the notice today, saying that users should only nominate themselves "if they are eligible." I checked out the notice and it looks like we forgot to add the partial eligibility check that was used last year. This check hides the notice from people who don't meet some of the basic and easy-to-check requirements:

// Hide notice if user is ineligible for vote; by [[User:VasilievVV]] and adapted by [[User:Cbrown1023]]
var wgHideStewardNominationsNotice = {
	'rq' : null,

	'onUserInfoDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval( '(' + this.responseText + ')' );
		user = result.query.users[0];

		var eligible = true;	// WP:AGF.
		
		if( typeof( user.missing ) == 'undefined' ) {
			var regdate = user.registration;
			var requiredDate = '2010-08-29T00:00:00Z';

			if( ( regdate !== null && regdate > requiredDate ) )
				eligible = false;
		} else {
			eligible = false;
		}

		if( !eligible )
			proposal.style.display = 'none';
		
		var cookieval = eligible ? '0' : '1';
		var expiryDate = new Date();
		expiryDate.setDate(expiryDate.getDate() + 3 );
		document.cookie = 'StewardNominationsInligible=' + cookieval + ';'
			+ 'expires=' + expiryDate.toGMTString();
	},

	'handle' : function() {
		proposal = getElementsByClassName( document, '*', 'notice-wrapper-stew2011-noms' );
		if( !proposal.length )
			return;
		proposal = proposal[0]

		if( !wgUserGroups || wgUserGroups.join( ';' ).indexOf( 'autoconfirmed' ) == -1 ) {
			proposal.style.display = 'none';
			return;
		}

		var cookiePos = document.cookie.indexOf("StewardNominationsInligible=");
		if( cookiePos > -1 ) {
			if( document.cookie.charAt( cookiePos + 22 ) == 1 )
				proposal.style.display = 'none';
			return;
		}

		this.rq = sajax_init_object();
		var uri = wgServer + wgScriptPath + '/api.php?action=query&list=users&usprop=registration&format=json&ususers=' + encodeURIComponent( wgUserName );

		this.rq.onreadystatechange = this.onUserInfoDownload;
		this.rq.open( "GET", uri, true );
		this.rq.send( '' );
	}
}

wgHideStewardNominationsNotice.handle();

Should we add it again to this one? I can't see why we wouldn't want to, but I would prefer not to just to do it without anyone saying anything and without the code being reviewed. :-) Cbrown1023 talk 21:47, 21 January 2011 (UTC)

Sounds like a good idea to me. Wutsje 21:48, 21 January 2011 (UTC)
Ok for me. -Barras 22:36, 21 January 2011 (UTC)
Please. Also for the banner for the voters. Big thanks! -- Dferg ☎ talk 23:01, 21 January 2011 (UTC)

Ack, do we really need 50 lines of Javascript and an AJAX request for this? How about this for the nomination notices:

<script type="text/javascript">
       if($j.inArray('sysop', wgUserGroups) > -1) {
               $j('.siteNoticeSysop').show();
       };
</script>

and this for the voting notices:

<script type="text/javascript">
       if($j.inArray('autoconfirmed', wgUserGroups) > -1) {
               $j('.siteNoticeAutoconfirmed').show();
       };
</script>

Kaldari 00:37, 22 January 2011 (UTC)

I came up with sth like this to check the account age and set the cookie:

var StewardEligibility = function(username, usergroups) {
	var obj = $j(".notice-wrapper-stew2011-noms");
	var cookieName = "StewardNominationsInligible";

	if( $j.inArray('autoconfirmed', usergroups) < 0) {
		obj.hide();
		return;
	}

	switch ($j.cookie(cookieName)) {
	case "0":
		break;

	case "1":
		obj.hide();
		break;

	default:
		jQuery.getJSON(wgServer + wgScriptPath+'/api.php?action=query&list=users&usprop=registration&format=json&ususers=' + encodeURIComponent( username ),
		function(response) { 
			var experienced = function(userinfo) {
				if( ! ("missing" in userinfo)) {
					if( userinfo.registration ) {
						if ( userinfo.registration <= '2010-08-29T00:00:00Z' )
							return true;
					} else
						return true;
				}
				return false;
			};

			if( experienced(response.query.users[0]) ) {
				$j.cookie(cookieName, 0, { expires: 3 });
			} else {
				$j.cookie(cookieName, 1, { expires: 3 });
				obj.hide();
			};
		})
	}
};
addOnloadHook(function() { StewardEligibility(wgUserName, wgUserGroups)});

 « Saper // @talk »  01:57, 22 January 2011 (UTC)

Shouldn't the banner be hidden by default and then shown if they are eligible? Otherwise there is a chance it will be flashed for a second, which could be confusing/disruptive. Kaldari 01:26, 23 January 2011 (UTC)
Well, the point is that if they're ineligible, they'll only see the banner once for a second, and then it'll set a cookie so that they don't see it again. We should assume that they're eligible because it's the Wikimedia way to assume good faith and it makes sure they can see it even if there's some problem that we wouldn't be able to account for. Saper, did you test that? Should I post it? Cbrown1023 talk 02:50, 25 January 2011 (UTC)
It looks like even with the cookie scheme, people were seeing the banner for a second before the cookie could be checked and the banner hidden. There was a complaint about this on Wikitech-l, so I went ahead and rewrote the banner code so that it is hidden by default and then shown if the user is eligible (or the cookie returns true). Kaldari 00:50, 18 February 2011 (UTC)

Curious[edit]

Why does a Stewart have to be a sysop? Mysha

Hello Mysha. Stewardship provides access to private information and more powerful tools. One reason for the requirement is that a history in positions of increased responsibility like sysophood shows voters how they use their access, and gives an indication of how they will be as a steward. —Pathoschild 01:06:07, 11 February 2011 (UTC)

How many open positions?[edit]

Where are the number of open positions listed? I'm wondering how many stewards we're trying to elect to know how many votes to cast. Thanks,
⋙–Berean–Hunter—► ((⊕)) 02:16, 7 February 2011 (UTC)

Hello Berean Hunter. There is no limit to the number of stewards elected; simply vote for whomever you would approve as steward. —Pathoschild 01:08:12, 11 February 2011 (UTC)

How do you vote?[edit]

How do you vote? Do you just click the Yes/No/Neutral links? Or is something more needed? Svanslyck 00:39, 11 February 2011 (UTC)

Hello Svanslyck. Each candidate has a separate page with their statement and votes. This is a regular wiki page you can edit as you normally would. You can reach this page by clicking the candidate's name in the main index, or any of the Yes/No/Neutral links. You can also view all candidate statements (without the vote lists) to decide how you want to vote. —Pathoschild 01:14:36, 11 February 2011 (UTC)

Traducion[edit]

Traducion de ´´voters´´ ENGLISH-ESPAÑOL Daimond 01:32, 11 February 2011 (UTC)