Bug Summary
When requesting the Person Feed with a min_entry_date:
- If expiry_date has been extended (or reduced) after min_entry_date, this is not propagated to the feed because entry_date is not modified. so people with a copy will not know about this change (either they will delete the person thinking record expired, or they will keep it because they do not know expiration date change).
Documentation to read to understand the API:
PFIF format: http://zesty.ca/pfif/ (in particular http://zesty.ca/pfif/1.3/#data-expiry)
The Downloading data section of http://code.google.com/p/googlepersonfinder/wiki/DataAPI
DataModel: http://code.google.com/p/googlepersonfinder/wiki/DataModel
How to Reproduce the bug:
in http://japan.ghc-dev.appspot.com/?lang=en
1) Create a record for a missing person.
2) See that you can see this person in the person feed through
https://japan.ghc-dev.appspot.com/feeds/person?skip=0&min_entry_date=2011-11-11T
10:00:00Z&max_results=200
Notice the field pfif:expiry_date
3) Go to your record and change the expiration_date.
4) Go back to the feed and notice that the new expiration_date has changed
5) Now update the min_entry_date in the feed request to be a time which was
after you created your record and before you updated it. Notice that your
record is not returned by the feed. This is because changing the expiration
date was not take into account as a change to the record.
The consequence of this bug is that people who might got the record after it
was created may not know that the expiration date was extended, so they might
delete it too early. Or they might not know that the expiration date was
reduced and they will keep the record too long.
The issues is that in model.py/def put_expiry_flags(self):
we update entry_date and source_date only if we are changing the expired status
of the record. So this means we do not update entry_date and source_date when
we change the expiration date.
Suggested Fix:
- update this code so that entry_date and source_date are updated when expired_date is changed
- code change in app/model.py and/or app/extend.py
- Make sure the original_creation_date is not changed.
- make sure to update unit_tests and server_tests
Original issue reported on code.google.com by ali...@google.com on 12 Nov 2011 at 7:16
Original issue reported on code.google.com by
ali...@google.com
on 12 Nov 2011 at 7:16