Merge ~dbungert/ubuntu-sponsoring:sponsors-wrong-date-v2 into ubuntu-sponsoring:master

Proposed by Dan Bungert
Status: Merged
Merged at revision: 2c68b5a98f68336b4e2256557f9514ccabf8114b
Proposed branch: ~dbungert/ubuntu-sponsoring:sponsors-wrong-date-v2
Merge into: ubuntu-sponsoring:master
Diff against target: 19 lines (+5/-2)
1 file modified
sponsors-page.py (+5/-2)
Reviewer Review Type Date Requested Status
Benjamin Drung Approve
Robie Basak Approve
Review via email: mp+446529@code.launchpad.net

Commit message

fix missing sponsorship request date

An additional message needs to be checked. Currently LP: #2002043 shows
as requesting sponsorship on the open date of Jan-5-2023, but the
sponsorship request was July-10-2023.

To post a comment you must log in.
Revision history for this message
Dan Bungert (dbungert) wrote :

Tested on python2 and python3, both look fine.

Revision history for this message
Robie Basak (racb) wrote :

Ah. This is probably a consequence of me renaming the team description because based on the appearance of
“Ubuntu Sponsors Team” team at https://launchpad.net/~ubuntu-sponsors it was clearly not the intent of the Launchpad developers for every team description to be suffixed by " Team". It didn't occur to me that there would be hacks that rely on the description.

review: Approve
Revision history for this message
Benjamin Drung (bdrung) wrote :

Verified.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/sponsors-page.py b/sponsors-page.py
2index c53cc7f..1217988 100755
3--- a/sponsors-page.py
4+++ b/sponsors-page.py
5@@ -378,9 +378,12 @@ class SponsoringItem(object):
6
7
8 def sponsors_subscribed_date(bug):
9+ subscribed_teams = [
10+ "added subscriber Ubuntu Security Sponsors Team",
11+ "added subscriber Ubuntu Sponsors Team",
12+ "added subscriber Ubuntu Sponsors",
13+ ]
14 for activity in reversed(bug.activity_collection):
15- subscribed_teams = ["added subscriber Ubuntu Security Sponsors Team",
16- "added subscriber Ubuntu Sponsors Team"]
17 if activity.message in subscribed_teams:
18 return activity.datechanged
19 # If there was no activity subscribing sponsors, they must have

Subscribers

People subscribed via source and target branches