Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-102706

MBThreadLocalServiceUtil.deleteThread(threadId) does not delete the expando records (expandorow and expandovalue) belonging to the thread's messages

    Details

      Description

      Steps to reproduce:

      1. Create a custom field (text) for message boad messages. (Control Panel/Custom Fields)
      2. Go to site admin/Content/Message Boards and add a new thread, then add a couple of replies.
      3. Assess that a new record was added to the mbthread table, and a few records were added to the mbmessage table. Also new expandorow and expandovalue rows have been created, one for each message.
      4. Get the threadId of the thread, replace it in the below groovy script and run it.

      import com.liferay.message.boards.service.MBThreadLocalServiceUtil;
      import com.liferay.message.boards.service.MBMessageLocalServiceUtil;
      import com.liferay.message.boards.model.MBThread;
      import com.liferay.message.boards.model.MBMessage;
      
      MBThread thread;
      MBMessage message;
      
      MBThreadLocalServiceUtil.deleteThread([thread_id]);
      

      Result: The script executes successfully, but only the mbthread record and the related mbmessage records are deleted from the db. The expandorow and expandovalue rows belonging to the messages are not deleted.

        Attachments

          Activity

            People

            Assignee:
            jeremy.chen Jeremy Chen
            Reporter:
            laszlo.hudak Laszlo Hudak
            Participants of an Issue:
            Recent user:
            Joel Garman
            Engineering Assignee:
            Laszlo Hudak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 2 weeks, 1 day ago

                Packages

                Version Package
                7.0.0 DXP FP89
                7.0.10.13 DXP SP13
                7.0.X
                7.1.10 DXP FP16
                7.1.X
                7.2.10 DXP FP4
                7.2.X
                7.3.0 CE GA1
                7.3.10 DXP GA1
                Master