ChurchCRM / CRM

ChurchCRM is an OpenSource Church CRM & Management Software.
https://ChurchCRM.io
MIT License
626 stars 444 forks source link

Bug: Managing family properties on Family View page does not work properly #7165

Open kuba-marek opened 4 weeks ago

kuba-marek commented 4 weeks ago

Description A clear and concise description of what the reported bug is:

Steps To Reproduce Steps to reproduce the behavior:

  1. Run Softaculous Demo / fresh install

  2. Add a Family

  3. Go to Family View of a new Family (/v2/family/1)

  4. On the #Properties pane, click on round + icon

  5. An Assign a New Property dialogue will open with "Single Parent" option in the drop-down menu

  6. Go to People -> Admin -> Family Properties menu

  7. Delete the Single Parent property and

  8. Create some new (other) property

  9. Go to Family View of your new Family (/v2/family/1)

  10. On the #Properties pane, click on round + icon

  11. An Assign a New Property dialogue will open with "Single Parent" option in the drop-down menu

    Error no. 1 - Single Parent should not be there (was deleted in step 7) Error no. 2 - Property created in step 8 should be there instead

  12. Choose Single Parent property from the drop-down menu and try to assign it

    Error no. 3 - ERROR dialogue will open: Error making API Call to: /ChurchCRMjsvxa30s4x/api/people/properties/family/1/2, Error text: Slim Application Error

  13. Refresh the Family View page several times, you should manage to get your new property (added in step 8) on the drop-down menu of the Assign a New Property dialogue eventually

  14. Assign the new property

    Error no. 4 - "No data available in table", "Showing 0 to 0 of 0 entries" and "No property assignments" messages are shown, and your new property is not shown in the table on the #Properties pane (but the property is actually properly assigned in the database in the 'record2property_r2p' table)

  15. Refresh the Family View page several times, you should manage to get your new property visible in the table on the #Properties pane. But

    Error no. 5 - "No data available in table", "Showing 0 to 0 of 0 entries" and "No property assignments" messages are still shown

  16. Try to delete your new property from the table on #Properties pane.

    Error no. 6 - your new property is still visible in the table (but it is actually properly removed from the database in the 'record2property_r2p' table)

  17. Refresh the Family View page several times, you should manage to have your new property removed from the table on the #Properties pane.

Expected behavior

The + Assign A New Property dialogue of the #Properties pane on the Family View should instantly reflect properties added (or removed) on the Family Properties admin menu. Properties assigned using the Assign A New Property dialogue should be instantly visible in the table of the #Properties pane. Entry count below said table should show correct counts when there is some entry in the table. Removing the property from the table on the #Properties pane should remove it from this table instantly. The drop-down menu of the + Assign a New Property dialogue of the #Properties pane should not show non-existent properties.

Screenshots and/or logs

If applicable, please include screenshots or share logs to assist in explaining your issue.

📋 Relevant screenshots: family-property-bug

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

It looks like there is some cache for the API calls?