Fix order in "Recent Content" widget

Problem:

sbs452-order.png

The problem did occur after I did delete a user which did post 3 spam messages to the 3 threads “Geolocation, AD help, Chat Transcript”. SBS did not reset the modificationdate and thus the threads are still displayed.

Quick Workaround:

Set the modificationdate to the same value as the creationdate even though this is not completely right as the modificationdate should be set to the value of the last valid message post.

Open the Thread and click on “View print preview” - this will display the “threadid” which we need. We must not use the messageid!

http://community.igniterealtime.org/message/66778899 <-- messageid

http://community.igniterealtime.org/thread/12345?.… <-- threadid

Then connect to the PostgreSQL database:

su - jive
grep password /usr/local/jive/applications/sbs/home/jive_startup.xml
psql -h 127.0.0.1 -p 5432 -U jive
UPDATE jivethread SET modificationdate = creationdate WHERE threadid = 12345;
\q
exit

Solution:

Get the proper date of the last message and set then the modificationdate to this value:

select threadid from jiveMessage where messageid=66778899;
--12345
select max(modificationdate) from jiveMessage where threadid=12345;
--1281195507895
UPDATE jivethread SET modificationdate = 1281195507895 WHERE threadid = 12345;
--UPDATE 1

This is much more complicated, even though one could create one SQL statement which does the job.