You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The user can delete a list from the campaign UI including the campaigns which are associated with an existing(past campaign). Due to this, the system is throwing 500 error as the list associated with the campaigns are not anymore in the database after deletion.
To Reproduce
Steps to reproduce the behaviour:
Login to the campaign tool
Go to the List tab
Delete one list which is associated with any campaign in the past - The list should be deleted without any issue/warning.
Come back to the campaign page - The campaign page should be throwing fatal error Trying to get property 'name' of non-object due to this code snippet $campaign->subscriptionList->name - Reference link to codebase
Expected behaviour
If the list is associated with an old campaign, the system should not let it deleted.
There should be a warning/alert while deleting such a list from the campaign tool.
Additional context
Ideally, there should be a reference between the campaigns table and the lists table. However, it is being referenced in the codebase - Codebase Reference
The column name could have been simply list_id in campaigns table rather than subscription_list_id, which may create confusion.
Acceptance Criteria
Add the foreign key constraint in the campaigns table for the subscription_list_id and add the lists table as a reference table for that.
The system should not let us delete the list if it is associated with an old campaign.
The text was updated successfully, but these errors were encountered:
Describe the bug
The user can delete a list from the campaign UI including the campaigns which are associated with an existing(past campaign). Due to this, the system is throwing 500 error as the list associated with the campaigns are not anymore in the database after deletion.
To Reproduce
Steps to reproduce the behaviour:
Trying to get property 'name' of non-object
due to this code snippet$campaign->subscriptionList->name
- Reference link to codebaseExpected behaviour
Additional context
campaigns
table and thelists
table. However, it is being referenced in the codebase - Codebase Referencelist_id
incampaigns
table rather thansubscription_list_id
, which may create confusion.Acceptance Criteria
campaigns
table for thesubscription_list_id
and add thelists
table as a reference table for that.The text was updated successfully, but these errors were encountered: