Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-18730

(tc-64) Updating children with eZMBPaex is not changing the databases according the testcase

    Details

      Description

      Changing the the notification time and running the respective cronjobs is showing some strange values in the mysql tables.

      1. Verification after creating the user:

      +------------------+------------------------+-----------------------------+-----------------------+------------------+--------------------------+----------------+
      | contentobject_id | expirationnotification | expirationnotification_sent | password_last_updated | passwordlifetime | passwordvalidationregexp | updatechildren |
      +------------------+------------------------+-----------------------------+-----------------------+------------------+--------------------------+----------------+
      |                4 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               10 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               11 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               12 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               13 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               14 |                 172800 |                           0 |            1317900964 |                3 |                          |             -1 |
      |               42 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               57 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      +------------------+------------------------+-----------------------------+-----------------------+------------------+--------------------------+----------------+
      
      

      2. Verfication after changing the the expiration date and before the runing the cronjob

      +------------------+------------------------+-----------------------------+-----------------------+------------------+--------------------------+----------------+
      | contentobject_id | expirationnotification | expirationnotification_sent | password_last_updated | passwordlifetime | passwordvalidationregexp | updatechildren |
      +------------------+------------------------+-----------------------------+-----------------------+------------------+--------------------------+----------------+
      |                4 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               10 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               11 |                 172800 |                           0 |                     0 |                4 |                          |              1 |
      |               12 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               13 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               14 |                 172800 |                           0 |            1317900964 |                3 |                          |             -1 |
      |               42 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               57 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      +------------------+------------------------+-----------------------------+-----------------------+------------------+--------------------------+----------------+
      
      

      3. Verification after the cronjob

      +------------------+------------------------+-----------------------------+-----------------------+------------------+--------------------------+----------------+
      | contentobject_id | expirationnotification | expirationnotification_sent | password_last_updated | passwordlifetime | passwordvalidationregexp | updatechildren |
      +------------------+------------------------+-----------------------------+-----------------------+------------------+--------------------------+----------------+
      |                4 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               10 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               11 |                 172800 |                           0 |                     0 |                4 |                          |              0 |
      |               12 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               13 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               14 |                 172800 |                           0 |            1317900964 |                3 |                          |             -1 |
      |               42 |                 172800 |                           0 |                     0 |                3 |                          |             -1 |
      |               57 |                 172800 |                           0 |                     0 |                4 |                          |             -1 |
      +------------------+------------------------+-----------------------------+-----------------------+------------------+--------------------------+----------------+
      
      

      Steps to reproduce

      Create test user
       
          Log in as admin in admin interface
          Click "User accounts" in top menu
          Click "Guest accounts"
          Click "Create here" button
          First name : te
          Last name : st
          Username : test
          Password : test1
          Confirm password : test1
          Email : test@example.com
          Click "Send for publishing"
       
      Verify database
       
          Run querry :
          mysql> select * from ezx_mbpaex;
          Verify that all rows has passwordlifetime=3
       
      Update parent (usergroup)
       
          Click "User accounts" in top menu
          Click "Edit" icon for "Guest accounts"
          Edit form data:
          Password LifeTime (DAYS): 4
          Update children nodes?: Checked
          Click "Send for publishing"
          mysql> select * from ezx_mbpaex;
          Verify that one row has passwordlifetime=4 and updatechildren=1
          On the command line, go to the test instance ( .run/ directory )
          $php runcronjobs.php ezmbpaex_updatechildren
       
      Verify the result
       
          mysql> select * from ezx_mbpaex;
          Verify that *two* rows now have passwordlifetime=4
          Verify that all rows has updatechildren=0
      

        Activity

        João Pingo created issue -
        Hide
        Patrick Allaert added a comment -

        I confirm this is a correct behavior.
        -1 means "Update children" is undefined.
        1 means "Update children" is active and have to be treated by next cronjob.
        0 means "Update children" is inactive or already treated by cronjob.

        Cronjob only takes care of those == 1. As a result of this, -1 and 0 are just 2 different values for the same meaning: "nothing to do here".

        Show
        Patrick Allaert added a comment - I confirm this is a correct behavior. -1 means "Update children" is undefined. 1 means "Update children" is active and have to be treated by next cronjob. 0 means "Update children" is inactive or already treated by cronjob. Cronjob only takes care of those == 1. As a result of this, -1 and 0 are just 2 different values for the same meaning: "nothing to do here".
        Hide
        Vidar Langseid added a comment -

        OK. Thanx for clarifiaction

        joao : you update testcase and test results accordingly?

        Show
        Vidar Langseid added a comment - OK. Thanx for clarifiaction joao : you update testcase and test results accordingly?
        Hide
        João Pingo added a comment -

        Hi
        The test-case, and test results is changed accordingly to this information

        Show
        João Pingo added a comment - Hi The test-case, and test results is changed accordingly to this information
        Hide
        Geir Arne Waaler added a comment -

        The bug is fixed. I move it to Closed.

        Show
        Geir Arne Waaler added a comment - The bug is fixed. I move it to Closed.
        André Rømcke made changes -
        Field Original Value New Value
        Workflow eZ Community Workflow [ 29801 ] eZ Engineering Scrumban Workflow [ 46969 ]
        André Rømcke made changes -
        Workflow eZ Engineering Scrumban Workflow [ 46969 ] EZ* Development Workflow [ 81417 ]
        Alex Schuster made changes -
        Workflow EZ* Development Workflow [ 81417 ] EZEE Development Workflow [ 119995 ]

          People

          • Assignee:
            Patrick Allaert
            Reporter:
            João Pingo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: