only increment autoname on card creation

closed
,
medium
,  
 

 

 

  • View
  • Changes
  • Options
  • Related
  • Edit
  • /card/changes/Note+*type+*autoname has been incrementing once about every two weeks for no apparent reason. It's at Note000161 as i write this, but the last actual Note card is Note000158.

     

    Related support tickets: 
    Relevant user stories: 
     add one
  • View
  • Changes
  • Options
  • Related
  • Edit
  • The way autoname currently works, it increments whenever someone navigates to a form for a new card, not when the card is created.  I think it should be the latter, but I don't yet know a reason why that should be "high" priority.  Do you have one?


    I was thinking of missing numbers in the series of names as a data integrity issue. Not a big deal to me. Updating the name of this ticket to be more precise.

      --John Abbe.....Wed Apr 28 16:28:59 -0700 2010


    it definitely looks a little weird, and there are some behavioral drawbacks to the current way. (eg, create, back button, create again does not work) but I don't think there's a data integrity problem in the traditional sense. much happier with the new name.

      --Ethan McCutchen.....Wed Apr 28 16:49:46 -0700 2010


    Autonaming seems broken altogether. http://play.dwagn.org/play/customtype+*type+*autoname is "001", but http://play.dwagn.org/play/new/customtype offers to create a card with no name, which unsurprisingly results in "Wagn::Exceptions::Oops in CardController#create" and a very long error which I won't bother pasting here.

      --John Abbe.....Thu Dec 22 00:10:09 -0800 2011


    you shouldn't see "name:", of course, but it's correct that the name is blank before you submit (the idea is only to assign the name when you create it). The error was actually the same one as the delete one, which is a rails 3 oddity that is making it so that cards from the cache need to be "refreshed" from the database before updating them. Quick fix. Both are coded now. Will deploy soon.

      --Ethan McCutchen.....Thu Dec 22 08:58:14 -0800 2011


    btw, the first line of the message (which is the actual error) and the first line or so of a long backtrace are often the most useful parts. So something like this would be plenty for that particular issue:

     

    error saving 001: error saving customtype+*type+*autoname: error saving customtype+*type+*autoname: can't modify frozen hash, /usr/cldstr/wagn.org/wagn/ws/gems/ruby/1.8/gems/activerecord-3.1.3/lib/active_record/attribute_methods/write.rb:32:in `[]='

    /usr/cldstr/wagn.org/wagn/ws/gems/ruby/1.8/gems/activerecord-3.1.3/lib/active_record/attribute_methods/write.rb:32:in `write_attribute'

      --Ethan McCutchen.....Thu Dec 22 09:06:26 -0800 2011


    Thanks. Seems to work fine.

     

    Cosmetic issue: the title bar is vertically very narrow with no text in it. How hard would it be to add a space or something so that it is the usual height?

      --John Abbe.....Thu Dec 22 17:50:26 -0800 2011


    (fixed)

      --Ethan McCutchen.....Sat Dec 24 14:59:05 -0800 2011

     

    Notes

    add a note

    try it

     

    wagneers

    intro

    videos

    features

    syntax

    weekly calls

    ideas

     

    twitter

    mailing list

     

    developers

    roadmap

    next release

    tickets

    pack API

    REST API

    one-pager

     

    github

    mailing list

     

    wagn.org

    recent

    todo