Announcement

Collapse
No announcement yet.

Duration field bug

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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.




    Comment


    • #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


      • #4
        We tried a few scenarios. Not clear what's not working. Not reproduced.

        Comment


        • #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


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

            Attached Files

            Comment


            • #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


              • #8
                Reproduced. A fix I came up with: https://github.com/espocrm/espocrm/c...2472eb54a12a8d

                Comment

                Working...
                X