Closed Bug 1089946 Opened 11 years ago Closed 11 years ago

[API] last_report_date in the future

Categories

(Mozilla Reps Graveyard :: reps.mozilla.org, task)

task
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: Nukeador, Assigned: tasos)

Details

(Whiteboard: [kb=1586546] )

Hi, Checking Reps last_report_date I get some dates in the future: https://reps.mozilla.org/api/v1/rep/129/ "last_report_date": "2014-11-11" This is not present in the profile, where last report is 12 Sep 2014: https://reps.mozilla.org/u/brianking/
Hi Ruben, Due to passive reports it's possible for a report to have a date in the future. For example if you are going to attend an event, a report is created in the Reps db with the date of the event. In the profiles we filtered out all the reports with their date in the future. We can either change this or add a second field to expose the last report to date.
Group: mozilla-reps-admins
OS: Linux → All
Hardware: x86_64 → All
I think it would be better to expose just past reports, since the event hasn't take place yet and it's not displayed on Rep profile. The problem right now is that the Rep status is calculated based on past reports, because if not, I could add an event for next year, be inactive for 6 months and I will still get an "Active" status.
Hi Ruben, According to the initial specs of the reporting system the inactivity is calculated based on the reports submitted in a timespan of 8 weeks. Specifically email notifications are sent if no report is created for 8 weeks in total (4 weeks in the past and 4 weeks in the future from the current date). Regarding the API we could remove the future reports but this, if used in an external application to calculate the inactivity, will give false reports and will be inconsistent with the portal. Thoughts?
Conversion point for Reps: https://wiki.mozilla.org/Contribute/Conversion_points#Reps The external app is using this for calculating status. I don't know why "4 weeks in the future from the current date" is used to calculate activity in the portal right now.
These conversion points were created during the design phase of the reporting system and are used to calculate the status of a user. The only technicality is that the reporting system looks in both past and future for reports. I believe a suitable argument is the following: If a Rep is spending the next month to organize a big event, probably (s)he won't have much time to engage in other activities and it would be unfair to mark this user as inactive. Maybe :williamr can elaborate more on this subject.
Flags: needinfo?(williamr)
After discussion, it's OK to calculate status looking at 4 weeks in the past and 4 weeks in the future from the current date, but last_report_date should return the last report date in this timeframe. Right now I see Reps having last_report_date for May 2015: https://reps.mozilla.org/api/v1/rep/1493/
I agree with comment 6. The need for last_report_date is to see the last time someone completed an activity in the past and it should not include future activities. The calculated status that is used elsewhere on the /stats page can remain as it it. Thanks!
Flags: needinfo?(williamr)
Assignee: nobody → tasos
Status: NEW → ASSIGNED
Whiteboard: [kb=1586546]
Just to clarify this, if the activity is in a 8 week time frame, 4 weeks in the past and 4 weeks in the future from the current date, then the report date of the activity should be returned through the API. What should be returned in the case that there isn't a report in this timespan? The date of the last report in the past? Nothing?
Flags: needinfo?(williamr)
Flags: needinfo?(nukeador)
Nukeador best understands the primary use case, so I defer to him.
Flags: needinfo?(williamr)
(In reply to Tasos Katsoulas [:tasos] from comment #8) > Just to clarify this, if the activity is in a 8 week time frame, 4 weeks in > the past and 4 weeks in the future from the current date, then the report > date of the activity should be returned through the API. What should be > returned in the case that there isn't a report in this timespan? The date of > the last report in the past? Nothing? Yes, last report in the past.
Flags: needinfo?(nukeador)
Commits pushed to master at https://github.com/mozilla/remo https://github.com/mozilla/remo/commit/ab37e10cf7d32adf6e9a3e917e5ae949e6938041 [fix bug 1089946] Export last activity date through API. https://github.com/mozilla/remo/commit/acfc0573f0229433365387f315ce25d67c2e475b Merge pull request #871 from akatsoulas/1089946 [fix bug 1089946] Export last activity date through API.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Version: unspecified → next
Verified on stage that the last report date returns the date described in comments 8 and 10.
Status: RESOLVED → VERIFIED
Version: next → 446
Product: Mozilla Reps → Mozilla Reps Graveyard
You need to log in before you can comment on or make changes to this bug.