Project

General

Profile

Actions

Defect #20648

closed

Users' "Last connection" is not updated correctly.

Added by kaz k over 9 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Accounts / authentication
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

In the User Profile, there are following two date fields.
  • Registered on: 2015-01-01 (value is an example)
  • Last connection: 2015-09-01 (value is an example)

For some users, "Last connection" is not correct. Although the user logs in Redmine, "Last connection" date is not updated.
In our system, for example, a user logged in on August 31, 2015. But "Last connection" date is still "August 22, 2015".

It is also true in the Administration=>Users listing.

We are using this field to determine if the user is active or not. So We hope this field is correct.

Thank you all, in advance.

  • Reported version
    Redmine 2.5.0.stable.
    Details are as follows.
    Environment:
      Redmine version                2.5.0.stable
      Ruby version                   1.9.3-p484 (2013-11-22) [x86_64-linux]
      Rails version                  3.2.17
      Environment                    production
      Database adapter               PostgreSQL
    

Files

Last_connection_and_activity_log.jpg (62.4 KB) Last_connection_and_activity_log.jpg User profile screen capture: Last connection and activity record kaz k, 2015-09-14 08:50
last_connection_fix.diff (1.63 KB) last_connection_fix.diff patch (Update "Last connection" value every time) Go MAEDA, 2015-09-26 09:08

Related issues

Related to Redmine - Feature #28952: Update User#last_login_on only once per minuteClosedJean-Philippe Lang

Actions
Related to Redmine - Feature #37115: Update last_login_on when sending requests with API KeyNew

Actions
Actions #1

Updated by kaz k over 9 years ago

kaz k wrote:

It is also true in the Administratyion=>Users listing.

Sorry...typo.
"Administratyion"=>"Administration"

Actions #2

Updated by Toshi MARUYAMA over 9 years ago

  • Description updated (diff)
Actions #3

Updated by Toshi MARUYAMA over 9 years ago

  • Status changed from New to Needs feedback

From #2820

  1. When a user logs in the User.last_login_on field is updated to the current time.
  2. When logging in via an autologin cookie the user's last_login_on be updated

How do you expect?

Actions #4

Updated by kaz k over 9 years ago

Toshi MARUYAMA wrote:

From #2820

  1. When a user logs in the User.last_login_on field is updated to the current time.
  2. When logging in via an autologin cookie the user's last_login_on be updated

How do you expect?

My expectations are as follows.

  1. As the field says "Last connection", it is natural that "Last connection" is to be updated every time when a user logs in, regardless of the autologin cookie ( and its expiration).
    • There is a time duration of user's activity from Log-in to Log-out. "Last Connection" is not clear if it points the log-in time or log-out time, and sometimes log-out time is not captured precisely (for example, when the connection is broken). This is why I think Last log-in time is appropriate.
    • "Last connection" might be renamed as "Last Log in".
  2. From the administrator's view, he/she wants to know how long a user has not logged in to determine if the user seems inactive or not. It does not depend on the use of autologin cookie.

Kind regards,

Actions #5

Updated by kaz k over 9 years ago

Attached is a screenshot of our Redmine user profile screen captured today. There are comments in it.
Hope this helps.

Actions #6

Updated by Toshi MARUYAMA over 9 years ago

  • Status changed from Needs feedback to New
Actions #7

Updated by minkbear minkbear over 9 years ago

Found the same issue on version 2.6.1

Actions #8

Updated by Luiz Carlos Junior over 9 years ago

+1

My environment is:

Environment:
  Redmine version                2.6.2.stable
  Ruby version                   1.9.3-p551 (2014-11-13) [x86_64-linux]
  Rails version                  3.2.21
  Environment                    production
  Database adapter               Mysql2

Actions #9

Updated by Go MAEDA over 9 years ago

  • File last_connection_fix.diff added

I have wrote a patch to fix this issue.
With this patch applied, "Last connection" is updated every time the application is accessed.

Actions #11

Updated by Go MAEDA over 9 years ago

  • File deleted (last_connection_fix.diff)
Actions #12

Updated by Sebastian Paluch over 9 years ago

Go MAEDA wrote:

I have wrote a patch to fix this issue.
With this patch applied, "Last connection" is updated every time the application is accessed.

Great! This is how it should work.

Actions #13

Updated by kaz k about 9 years ago

Go MAEDA wrote:

I have wrote a patch to fix this issue.
With this patch applied, "Last connection" is updated every time the application is accessed.

Thank you very much !
I think the description of "Last connection" is better to be replaced with "Last Activity".
Because user may keep login for a few days and keep making updates. In this case, "Last connection" is older than the current date. If the patch works as described, the field indicates last access.

Actions #14

Updated by Go MAEDA about 9 years ago

  • Target version set to Candidate for next major release
Actions #15

Updated by Ronald Heggenberger almost 9 years ago

I'm running redmine with the following environment:

  Redmine version                3.2.0.stable
  Ruby version                   2.1.8-p440 (2015-12-16) [x86_64-linux-gnu]
  Rails version                  4.2.5

but having the same issue... Will that patch be applied to 3.2.0 too?

Actions #16

Updated by Lotfi Trigui over 8 years ago

Ronald Heggenberger wrote:

I'm running redmine with the following environment:
[...]
but having the same issue... Will that patch be applied to 3.2.0 too?

I also have the same issue in 3.2.1 version

Actions #17

Updated by Go MAEDA over 6 years ago

  • Related to Feature #28952: Update User#last_login_on only once per minute added
Actions #18

Updated by Go MAEDA over 2 years ago

  • Related to Feature #37115: Update last_login_on when sending requests with API Key added
Actions #19

Updated by Go MAEDA 12 months ago

  • Status changed from New to Closed
  • Target version deleted (Candidate for next major release)
  • Resolution set to Wont fix

The label "Last connection" was changed to "Last sign in" in Redmine 5.1.0 (see #38477). So, it now displays a consistent value.

Actions

Also available in: Atom PDF