Skip to content

DATETIME item attribute type bugs #2232

Closed

Description

@objecttothis

Background information

IMPORTANT: If you choose to ignore this issue report template, your issue will be closed as we cannot help without the requested information.

Please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:

  • Reporting an issue of an unmodified OSPOS installation
  • Checked open and closed issues and no similar issue was already reported (please make sure you searched!)
  • Read README, WHATS_NEW, INSTALL.md and UPGRADE
  • Read the FAQ for any known install and/or upgrade gotchas (in specific PHP extensions installed)
  • Read the wiki
  • Executed any database upgrade scripts if an upgrade pre 3.0.0 (e.g. database/2.4_to_3.0.sql)
  • Aware the installation code is in bintray (see README), and GitHub master is for developers only and therefore not complete nor stable

Installation information

  • OSPOS version is: 3.3.0
  • OSPOS git commit hash is: 465a2c
  • PHP version is: 5.6.38
  • MySQL or MariaDB version is: 5.7.24
  • OS and version is: FreeBSD 11.2
  • WebServer is: Apache 2.4
  • Selected language is: English
  • (If applicable) Docker installation:
  • (If applicable) Installation package for the LAMP/LEMP stack is:

Bug

There seem to be a few kinks to work out with the DATETIME attribute type:

  • The formatting on screen does not follow the selected locale.
  • Dates previous to 1/1/2010 are not allowed (in our case we want a "publication date" but many books were published before 2010).
  • Manual entry of the date is not allowed.

datetime

Activity

  1. jekkos commented on Nov 15, 2018

    @jekkos
    Member

    You are totally right. I didn't find a proper way to do this formatting across the different places this other type is used.

    Honestly I added the attribute type but it didn't get enough attention during testing (I won't need this type myself). I did realise that I will need to find a way to map internal date format to either mysql DATE_FORMAT function to have the date output in the result set in a correct manner (which would be the quickest).

  2. added this to the 3.3.0 milestone on Nov 23, 2018
  3. daN4cat commented on Dec 23, 2018

    @daN4cat
    Collaborator

    @jekkos is this fixed?

  4. jekkos commented on Dec 24, 2018

    @jekkos
    Member

    No not yet, I'll need to find some time to look into it. We could however disable DATE attributes and move it to the next release to unblock. What you think?

  5. jekkos commented on Jan 17, 2019

    @jekkos
    Member

    I think I'll try to map the configured date and time formatter to DATE_FORMAT mysql. MIght be the cleanest so the dates will be formatted directly in the resultset.

  6. jekkos commented on Jan 21, 2019

    @jekkos
    Member

    Will try to wrap something up this week

  7. jekkos commented on Jan 24, 2019

    @jekkos
    Member

    Fix is almost ready, just need to verify

  8. daN4cat commented on Feb 18, 2019

    @daN4cat
    Collaborator

    Status?

  9. objecttothis commented on Mar 1, 2019

    @objecttothis
    MemberAuthor

    @jekkos, what ended up being the fix for getting the Item table to display the datetime attributes correctly. I'm experiencing the same behavior with the DECIMAL attribute type. On first entry of a datetime or decimal it updates the database but does not display the datetime or decimal in the items table. If I update it again or update a different datetime or decimal it will populate that one, but only after updating each one twice does it display in the table.

  10. jekkos commented on Jun 4, 2019

    @jekkos
    Member

    @objecttothis I have tested my latest PR with text and date attributes, seems to be ok. Haven't verified with Decimal yet but I think it will need to be added in the search query explicitly (like I did for the other types).

  11. daN4cat commented on Jun 15, 2019

    @daN4cat
    Collaborator

    Code merged. I close this and if any issue reopen it.

  12. jekkos commented on Jun 16, 2019

    @jekkos
    Member

    Ok decimals don't show up in search results, this needs fixing.

  13. daN4cat commented on Jun 16, 2019

    @daN4cat
    Collaborator

    Decimals are a different matter.

    I need to submit some minor change, you can take from there.

  14. daN4cat commented on Jun 16, 2019

    @daN4cat
    Collaborator

    I committed to master the few changes I made here and there.
    I temporary fixed the cash_refund issue discussed in another thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions