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
Please describe the feature you would like to see implemented.
It would be great to have a Data Cleanup tab that is listing unused data making cleanup easier
Unused Rule Builder Rules
Unused Product Streams
Used at least in product_export, category, product_cross_selling, rule_condition and cms_slot_translation (slot = product-slider)
Otherwise Cleaning Up is dangerous currently - deleting a Product Stream is possible even if the Stream is assigned to a product_export / rule_condition
For Rules situation is improving in the backend with a "assignments" tab within the rule edit view but filtering for unused rules is also not possible.
Next to the listed Entities there should be an action to either edit or delete the entity.
What's making it a little hard is those rules can be used in so many places.
Raw SQL to select unused product streams:
with used as (
selectp.idfrom product_stream p
left join product_stream_translation pst onp.id=pst.product_stream_idwherep.idin (select product_stream_id from category)
orp.idin (select product_stream_id from product_export)
orp.idin (select product_stream_id from product_cross_selling)
orp.idin (select unhex(json_unquote(json_extract(rc.value, '$[0]'))) from rule_condition rc where rc.`type`='cartLineItemInProductStream') # TODO: There can be multiple Streams chosenorp.idin (select unhex(json_unquote(json_extract(cst.config, '$.products.value'))) from cms_slot cs inner join cms_slot_translation cst oncs.id=cst.cms_slot_idandcs.version_id=cst.cms_slot_version_idand cs.`type`='product-slider'and json_unquote(json_extract(cst.config, '$.products.source')) ='product_stream')
)
selectps.id, pst.name, ps.invalid, ps.api_filter, pst.descriptionfrom product_stream ps
inner join product_stream_translation pst onps.id=pst.product_stream_idinner join`language` l onpst.language_id=l.idandl.name='Deutsch'whereps.id not in (select*from used)
The text was updated successfully, but these errors were encountered:
Please describe the feature you would like to see implemented.
It would be great to have a Data Cleanup tab that is listing unused data making cleanup easier
Otherwise Cleaning Up is dangerous currently - deleting a Product Stream is possible even if the Stream is assigned to a product_export / rule_condition
For Rules situation is improving in the backend with a "assignments" tab within the rule edit view but filtering for unused rules is also not possible.
Next to the listed Entities there should be an action to either edit or delete the entity.
What's making it a little hard is those rules can be used in so many places.
Raw SQL to select unused product streams:
The text was updated successfully, but these errors were encountered: