From ceb5a601ed339533e22bfbce0b77fb0f6c9c30b5 Mon Sep 17 00:00:00 2001 From: Julen Landa Alustiza Date: Feb 06 2020 16:51:52 +0000 Subject: [PATCH 1/3] update last_updated instead of updated_on on add_pull_request_comment --- diff --git a/pagure/lib/query.py b/pagure/lib/query.py index 4cba70e..8b9de1a 100644 --- a/pagure/lib/query.py +++ b/pagure/lib/query.py @@ -1311,7 +1311,7 @@ def add_pull_request_comment( # Make sure we won't have SQLAlchemy error before we continue session.flush() - request.updated_on = datetime.datetime.utcnow() + request.last_updated = datetime.datetime.utcnow() pagure.lib.git.update_git(request, repo=request.project) From d8a2c1cd66659d4b75f18781717769e7b0f92b52 Mon Sep 17 00:00:00 2001 From: Julen Landa Alustiza Date: Feb 06 2020 16:51:52 +0000 Subject: [PATCH 2/3] update updated_on on add_pull_request_flag --- diff --git a/pagure/lib/query.py b/pagure/lib/query.py index 8b9de1a..1ac549f 100644 --- a/pagure/lib/query.py +++ b/pagure/lib/query.py @@ -1497,6 +1497,7 @@ def add_pull_request_flag( user_id=user_obj.id, token_id=token, ) + request.updated_on = datetime.datetime.utcnow() session.add(pr_flag) # Make sure we won't have SQLAlchemy error before we continue session.flush() From 9fc085429e0bcf87a9a913c19fb7fc71b41795ae Mon Sep 17 00:00:00 2001 From: Julen Landa Alustiza Date: Feb 06 2020 16:51:52 +0000 Subject: [PATCH 3/3] templates/pull-request: render last_updated instead of updated_on --- diff --git a/pagure/templates/_render_pullrequests.html b/pagure/templates/_render_pullrequests.html index 4f3d325..094f3ff 100644 --- a/pagure/templates/_render_pullrequests.html +++ b/pagure/templates/_render_pullrequests.html @@ -93,8 +93,8 @@ }}">{{ request.date_created | humanize}} by {{ request.user.user }}. Modified {{ request.updated_on | humanize}} + request.last_updated | format_datetime + }}">{{ request.last_updated | humanize}} {% endif %} {% if showproject %} diff --git a/pagure/templates/repo_pull_request.html b/pagure/templates/repo_pull_request.html index 4ef4ea2..08aeadc 100644 --- a/pagure/templates/repo_pull_request.html +++ b/pagure/templates/repo_pull_request.html @@ -56,8 +56,8 @@ Opened {{ pull_request.date_created |humanize }} by {{ pull_request.user.user }}. - - Modified {{ pull_request.updated_on |humanize }} + + Modified {{ pull_request.last_updated |humanize }} {% elif pull_request.status == 'Merged' %}