Duration field bug

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dimyy
    Active Community Member
    • Jun 2018
    • 569

    Duration field bug

    1. The list view entity with type "event" does not have a dateStart, but it has a dateEnd.
    2. The "small form" view is a drop-down action.
    3. The dateStart is present in the small layout.

    The event "startField changed" was fired, and as a result, the dateEnd was recalculated. This occurred outside of the edit mode.​



    If add startDate in the list layout or remove duration from the small detail layout all ok
  • item
    Active Community Member
    • Mar 2017
    • 1476

    #2
    Hi,
    no sure, but duration field is a notStorable field.. so it's calculed on the fly (?).
    see https://github.com/espocrm/espocrm/b.../Call.json#L37
    I don't really know what represent "select" .. but : "select": "TIMESTAMPDIFF_SECONDdateStart, dateEnd)" it's certainly what's your question.




    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

    Comment

    • dimyy
      Active Community Member
      • Jun 2018
      • 569

      #3
      It's not my question. The duration field recalculates the dateEnd field.

      When the small view is opened without the dateStart field, it receives the dateStart from an additional request. After that, the event "dateStart:changed" is fired. The "Duration" field subscribes to the dateStart:changed event and recalculates the dateEnd.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8453

        #4
        We tried a few scenarios. Not clear what's not working. Not reproduced.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • dimyy
          Active Community Member
          • Jun 2018
          • 569

          #5
          The bug cannot be reproduced because in the demo version, for the Event entity, the startDate field is loaded by default regardless of the listView settings. However, in my installation, this field is not automatically loaded, and therefore the bug cannot be reproduced.
          Attached Files

          Comment

          • dimyy
            Active Community Member
            • Jun 2018
            • 569

            #6
            Reproduced. The default sorting by dateStart has been removed for the entity.

            Attached Files

            Comment

            • dimyy
              Active Community Member
              • Jun 2018
              • 569

              #7
              Steps for reproduce:
              1. Create new entity with type "Event"
              2. Change default sort order to dateEnd
              3. In List View Select name and DateEnd fields
              4. Create test event with different dateStart dateEnd
              5. In list view select view in dropdown action list

              Comment

              • yuri
                Member
                • Mar 2014
                • 8453

                #8
                Reproduced. A fix I came up with: https://github.com/espocrm/espocrm/c...2472eb54a12a8d
                If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                Comment

                Working...