Menu
SuiteCRM Pull Request Party hosted by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: After upgrade from 7.8.20 to 7.8.23 all activity stream items say "0 seconds ago"

After upgrade from 7.8.20 to 7.8.23 all activity stream items say "0 seconds ago" 1 month 1 week ago #75150

  • catchlightpro
  • catchlightpro's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
Currently using LTS 7.8.20. After updating to 7.8.23, all feeds in the activity stream, even the old ones, are marked as being created "0 seconds ago."

Expected Behavior: Should have correct time since the item was created
Actual Behavior: Only shows "0 seconds ago"

We saw that a similar issue was reported for upgraders to 7.10.5. A fix did not get in until 7.10.8:
#5918 Fixed #5918 - Activity Stream elapsed time calculation

What is the status of this fix for the LTS 7.8.x series? Can we expect one in the 7.8.x series?
The administrator has disabled public write access.

After upgrade from 7.8.20 to 7.8.23 all activity stream items say "0 seconds ago" 1 month 1 week ago #75164

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 8789
  • Thank you received: 1337
  • Karma: 323
I don't think it's getting included in the 7.8.x branch, probably because no one was aware that this was a problem in that branch.

Can you please try (after backing up those files) applying the fix in your system, to confirm it works?

github.com/salesagility/SuiteCRM/commit/...2babe97c221799fcf015

With that information we can arrange things so that it gets included in the 7.8.x branch also. Thanks.

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

After upgrade from 7.8.20 to 7.8.23 all activity stream items say "0 seconds ago" 1 month 3 days ago #75557

  • catchlightpro
  • catchlightpro's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
I upgraded to 7.8.24 first, then merged the fix and it's working well. I moved it into our production -- after some preliminary tests -- with the caveat that the team stop work immediately if they see any side effects on activity timestamps such as creation dates or modified dates. Two days and no issues.

The original 7.8.24 file, SugarFeed.php, is not using "public static" for methods/functions, only "static", but I did make getTimeLapse() "public static" for my patch, and no others. It looks like most methods are declared public static in the 7.10 branch. Also, the $timedate variable is the only global variable now in this file, whereas none existed in the original 7.8.24 release. Here's what we look like now...

public static function getTimeLapse($startDate)
{
global $timedate;

$nowTs = $timedate->getNow()->ts;

if (null !== ($userStartDate = $timedate->fromUser($startDate))) {
$userStartDateTs = $userStartDate->ts;
} else {
LoggerManager::getLogger()->warn('Invalid $startDate');
return '';
}
$seconds = $nowTs - $userStartDateTs;
$minutes = $seconds / 60;
$seconds = $seconds % 60;
$hours = floor($minutes / 60);
...


Thanks for the direction on this; nice to get the 4 new releases into production.
The administrator has disabled public write access.
Time to create page: 0.117 seconds
Powered by Kunena Forum