Menu

#1352 Adding (and editing, cloning, etc) pubs: warn if "unknown" format selected

Approved
closed
5
2020-05-24
2020-05-24
No

Something I've done more than once is to forget to select a format when adding a new pub, causing the new submission to default to "unknown". More often than not, these submissions have been accepted by a moderator without any sort of querying or fixing my oversight.

My personal preference would be not to have the UI default to "unknown", but have the format drop-down default to a blank/unselectable value, and force an editor to deliberately select a value. This seems analogous to forcing an editor to enter "8888-00-00" rather than leaving the field blank when pub date is unknown. However, a certain moderator disagreed with me.

As a compromise, I would suggest having a yellow warning when format=unknown has been submitted, similar to the advisory warnings for new author, duplicate ISBN, etc - the user workflow is unchanged, but there's a visual queue that allows an editor to quickly and easily cancel the erroneous submission, hit back button a couple of times, and resubmit with the fixed format value, long before the error is ever seen by a moderator.

Original discussion: http://www.isfdb.org/wiki/index.php/User_talk:ErsatzCulture#Bloodwitch

A patch to implement this will be added to this ticket shortly...

Discussion

  • ErsatzCulture

    ErsatzCulture - 2020-05-24

    Implementation of this change attached. As with my previously submitted patch, this is on a version of the file that has all the tabs & spaces made consistent, so will show up with hundreds of changes in a diff.

    Here is a diff against a version of the file that had the whitespace made consistent, but before any changes were made, that makes it clearer what I've done:

    common $ diff viewers.py viewers.py.ConsistentSpacing
    199,202c199,200
    < elif Label == 'Binding': # aka "Format"
    < if not value or value in ('unknown',):
    < warning = 'Format is "unknown"'
    < elif value not in FORMATS:


                elif Label == 'Binding':
                        if value and (value not in FORMATS):
    

    Notes:

    • This has been tested on a couple of submissions locally, but only on Python 2.7. I don't think there's anything here that should have issues with Python 2.4
    • In the warning text, I put "unknown" in quotes to try to indicate that it's a literal value, as opposed to something that was blank, or an entered value which isn't a known one.
    • A very cursory query of the pubs table makes me wonder whether flagging this a a warning might also tie in with other values e.g. if pub-date is 8888-00-00 or similar, then having the format as "unknown" is probably more acceptable than if it's a pub with a current-ish pub date, that is presumably well documented. This is maybe over-thinking things though?
     
  • Ahasuerus

    Ahasuerus - 2020-05-24

    A yellow warning is a good idea. Re: the larger issue of making the default value in the drop-down list "unknown", there is a long history of tweaking the default values of all kinds of drop-down lists. I would suggest discussing it on the Community Portal to see what other editors think.

     
  • Ahasuerus

    Ahasuerus - 2020-05-24
    • status: open --> closed
     
  • Ahasuerus

    Ahasuerus - 2020-05-24

    Implemented in common/viewers.py, installed in SVN 354 on 2020-05-24. Closing the FR.

     

Anonymous
Anonymous

Add attachments
Cancel