Uploaded image for project: 'Development'
  1. Development
  2. DEV-7784

Date custom field stores inconsistent date formats

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Backlog
    • Resolution: Done
    • Affects Version/s: 07.02.01.00
    • Fix Version/s: 07.02.02.00
    • Component/s: Custom Fields
    • Labels:
      None

      Description

      Date custom field stores inconsistent date formats.

      Changing the date value via the grid pushes the following value into the underlying Contents field thus:

      customFieldValue.Contents = Date.Parse(grdCustomFields.ActiveSheet.Cells(e.Row, e.Column).Value).ToString("s")

      Note the use of .ToString("s") - this formats the date to ISO8601 standard ("yyyy''MM''dd'T'HH':'mm':'ss").

      However, no such formatting is enforced at the business logic layer. Plugin code can (and often does) set the Contents property without such formatting. Notably the "SetValue" helper method does NOT format the date using .ToString("s").

      Proposed solution:

      Put code in the SetValue helper function, and the Contents SET-er to look at the custom field type, and format the value to ISO8601 for dates.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mikes@jiwa.com.au Mike Sheen
                Reporter:
                scottp@jiwa.com.au Scott Pearce
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: