Results 1 to 3 of 3

Thread: v2.0.1.1 data/Writer.js getRecordData() should be passing field.config to writeDate()

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3036 in a recent build.
  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    15
    Vote Rating
    2
      1  

    Exclamation v2.0.1.1 data/Writer.js getRecordData() should be passing field.config to writeDate()

    The date is always written as timestamp because field.dateFormat doesn't exist.

    writeDate: function(field, date) {
    var dateFormat = field.dateFormat || 'timestamp';


    In v2.0.1 The fieldConfig was cached as fieldConfig and passed as the first parameter to writeDate()
    Line 137: value = this.writeDate(fieldConfig, value);

    In v2.0.1.1 The field itself is passed to writeDate() and the field doesn't have a dateFormat property.
    Line 136: value = this.writeDate(field, value);


    I suggest renaming the first writeDate parameter to fieldConfig.
    Also, please write a unit test for this. Such a simple test to write.

    Thanks,
    Bobo

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Thanks for the report.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    11
      0  

    Default

    Hmm, I don't understand how this made it into the build. The code in the current repository is correct and the unit tests are passing for this method. Thanks for the report.

    Edit: Nevermind, I found out what happened. This will be fixed for the next release. Sorry for the inconvenience.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •