Feature proposal #5825
closed
Replace type, subtype, ittem, and parent with asset
Added by krileon over 8 years ago.
Updated over 7 years ago.
Description
Replace the relationship columns type, subtype, item, and parent with a single asset column. This can help eliminate issues of using 1 column, but not another. Migration will be needed and the assets need to be properly constructed as follows (general; it really depends on the usage exactly).
type.subtype.parent.item
Example usage.
Type: groupjive
SubType: group.wall
Item: 42
Parent: 15
Asset: groupjive.group.15.wall.42
Query to grab all activity of a specific group could be LIKE 'groupjive.group.15%'.
Type: gallery
SubType: photos
Item: 52
Asset: gallery.photos.52
Additionally a new trigger should be implemented on stream construct that lets additional steam objects to be built based off asset. So if the asset is profile.user_id it should add a user object to the stream params as asset_object, asset_user, target, or something of the sort that can be used to get further information about the asset. This could then be used in CB Auto Actions for example as [var1_asset_user_id] or [var1_asset_user_username].
Comments of an activity entry should also always be activity.ACTIVITY_ID. In the case of CB Gallery it needs to change the asset source for the comments before they're output so that the comments become linked to the gallery entry. This same usage should be applied to tags, etc..
Then when outputting comments of an activity entry it should grab all comments linked to activity.ACTIVITY_ID AND to the asset. This means "profile.42" comments would show basically on every status post for user 42. So usage should be done with care.
- % Done changed from 0 to 50
- % Done changed from 50 to 60
Implement support for array of assets. The API it self strictly uses "assets" instead of "asset" now and treats all of its handling as array. For the asset for storage you use ->asset() which returns the first asset of ->assets(). This means the first asset given in an array is determined for storage, etc.. Parameter usages can supply a comma separated list of assets.
CB GroupJive Migration CONCAT: CONCAT_WS( '.', 'groupjive.group', IF( `parent` != '', `parent`, `item` ), IF( `subtype` != '', IF( `subtype` != 'group', REPLACE( `subtype`, 'group.', '' ), NULL ), NULL ), IF( `parent` != '', `item`, NULL ) )
- Status changed from Assigned to Resolved
- % Done changed from 60 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF