Is there I missed understand any thing in Dynamic Logic?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trungtvmso
    Member
    • Jun 2022
    • 70

    Is there I missed understand any thing in Dynamic Logic?

    BEFORE OF ALL, I'm very sorry if my english were not good enough.

    Is there I missed understand any thing in Dynamic Logic?

    I'm working on limit of editable some fields by datetime. The scenario like this:

    1. I created a datetime field name [Edit Ended At], it means the ability to edit field no later than the time wrote in the field. Formular is created datetime of record + 5mins => It's done.
    2. In the field I set read-only by the condition: [Edit Ended At] in the past.

    Bug here is:

    1. [Edit Ended At] and System Clock is the same date => Still able to edit field set dynamic logic condition.
    2. [Edit Ended At] is totally in the past of date => Not able to edit field which it set dynamic logic condition.

    So is the condition means that it only compare by date or here is a self-bug of timezone different between System's Clock and [Edit Ended At] datetime timezone ? because i'm looking into my own data, [Edit Ended At] is being calculated by UTC Timezone.

    Note: My clock is 01:32 CH = 13:32 (GMT+7)

    1. Still able to edit when created date & Edit Ended At & System Clock are the same.
    Click image for larger version  Name:	image.png Views:	5 Size:	147.2 KB ID:	106904


    2. Condition I set for the field.
    Click image for larger version  Name:	image.png Views:	5 Size:	45.0 KB ID:	106905


    ​3. The record not able to edit when Date of [Edit Ended At] is in the past:
    Click image for larger version  Name:	image.png Views:	5 Size:	152.8 KB ID:	106906
    Last edited by trungtvmso; 06-04-2024, 07:51 AM.
  • emillod
    Active Community Member
    • Apr 2017
    • 1405

    #2
    Hello,
    i've tried that and it's working. Are you sure that you've set conditions for proper field?
    Click image for larger version

Name:	image.png
Views:	122
Size:	12.6 KB
ID:	106909

    here you have screenshot of conditions for description field:
    Click image for larger version

Name:	image.png
Views:	115
Size:	20.7 KB
ID:	106910

    Comment

    • trungtvmso
      Member
      • Jun 2022
      • 70

      #3
      Originally posted by emillod
      Hello,
      i've tried that and it's working. Are you sure that you've set conditions for proper field?
      Click image for larger version  Name:	image.png Views:	0 Size:	12.6 KB ID:	106909

      here you have screenshot of conditions for description field:
      Click image for larger version  Name:	image.png Views:	0 Size:	20.7 KB ID:	106910
      I'm sure that I do so many times and absolutely like you. As my 3rd photo you can see that record is in edit mode and can not edit [Marketing infor.] tab => This is what I want but I want it works deeper like compare by date and time also.

      Have you try with your test date is the same date with current day and minus 5 mins before created time of record? I want it can do logic exactly by date & time, not by date only
      Last edited by trungtvmso; 06-04-2024, 07:44 AM.

      Comment

      • emillod
        Active Community Member
        • Apr 2017
        • 1405

        #4
        Interesting, you can try it here: Schedule training seminar for Sales Team (espocrm.com)
        I'll check few more things..

        Comment

        • emillod
          Active Community Member
          • Apr 2017
          • 1405

          #5
          Yeah, it looks like a bug

          Comment

          • trungtvmso
            Member
            • Jun 2022
            • 70

            #6
            Originally posted by emillod
            Yeah, it looks like a bug
            hm, so now I need to wait for the next version which one would fix this bug, right bro? Because I've tested so many times seen v820 till to now but I didn't think this is a bug I though I did something wrong T____T

            Comment

            • emillod
              Active Community Member
              • Apr 2017
              • 1405

              #7
              I suggest creating a detailed bug report in the appropriate category on the forum. If the developers deem it necessary to address, they will provide a fix when feasible. Keep in mind that EspoCRM is an open-source application, and while requests can be made, they cannot be demanded. It's likely they will address the issue, but given their workload, it's uncertain when.

              Comment

              • victor
                Active Community Member
                • Aug 2022
                • 727

                #8
                This bug will be fixed in 8.3.0.

                But pay special attention not to put the time of the Date-time field itself in the dynamic logic of the Date-time field. Using field data for dynamic logic of that field is a very bad idea.

                However, it will be possible to use the time from the Date-time field for the dynamic logic of any other field.​

                Comment

                • trungtvmso
                  Member
                  • Jun 2022
                  • 70

                  #9
                  Hi Victor, I have upgraded to 8.3.1 but this bug still there. Do we have any fix for this in the future ?

                  Comment

                  • victor
                    Active Community Member
                    • Aug 2022
                    • 727

                    #10
                    Hi Victor, I have upgraded to 8.3.1 but this bug still there. Do we have any fix for this in the future ?
                    Works for both: 8.3.0 and 8.3.1.

                    - In Administration > Entity Manager > Lead > Fields, I created 2 Date-Time fields: cTestDatetime and cTestDatetime2 (screenshot 1).
                    - Installed dynamic read-only logic for cTestDatetime, which depends on cTestDatetime2 (screenshot 2).
                    - I create a Lead (the same for existing records) at "25.06.2024 20:52" and set the cTestDatetime2 field to "25.06.2024 20:51" -> the cTestDatetime field becomes read-only (screenshot 3).
                    - In this same Lead at "25.06.2024 20:52" I set the value to "25.06.2024 20:54" -> the field remains available for editing (screenshot 4).

                    Possible reasons why it does not work for you:
                    1. The time zone on the user profile does not match the actual time zone
                    2. You are trying to use dynamic logic that is less than 60 seconds. It is advisable to test with a step of at least 2 minutes.​​
                    Attached Files

                    Comment

                    Working...