Setting date for items with years before 0. (e.g. year -25)

Issue #97 new
gladjonatan created an issue

I tried to type in manually a negative year with a minus before the year and then saved, and accepted the change. The Wikidata Game seemed to have trouble saving the change, by only saying "Setting date(s) Qfoo" (not foo, but I don't remember the item-number), and nothing else. It stayed up in the corned for my entire "Game-session" (half an hour). I later cheked the item in question and saw that no change had been made.

Please also see #86.

Comments (2)

  1. Waldir Pimenta
    • removed responsible
    • marked as minor

    I'll assume I was assigned to this by mistake. Since I don't know a lot about the game internals yet, I'll unassign me so people aren't misled into thinking I'm working on this.

    I'll also set this as minor since it's somewhat of an edge case, that shouldn't happen most of the time during gameplay (at least I haven't come across any such instance until now).

  2. Lokal Profil

    The no_date game explicitly instructs that BC dates not be entered. For desktop use I guess: min='1' could be added to the year input box to highlight the problem (my Android phone seems to ignore these though).

    Possibly the year could also be validated before being sent to wikidata (similar to how issue #62 was solved in 6a828ce) with a
    if ( self[which].year<1 ) self[which] = { status:'empty' } ;
    The current system also seems to replace an empty year by 0, meaning that if just a month and day are given then 0000-MM-DD is assumed. The above should fix that but a prompt to the user would be better. Since year 0 doesn't exist (for non BC dates) there shouldn't be any valid dates thrown out by this.

    I'd appreciate a second pair of eyes on it though before putting up a PR.

  3. Log in to comment