rssidlowski / Pollution_Source_Tracking

City of Baltimore Pollution Source Tracking
0 stars 0 forks source link

Samples: unable to upload photo #177

Closed rssidlowski closed 9 years ago

rssidlowski commented 9 years ago

Reported by COB personnel: We are suddenly unable to upload photos to the investigation sample pages. We can upload the same photos to investigation details page. See below for screenshot of what appears. The widget to do the upload is not shown.

samplephoto

gerrykelly commented 9 years ago

I cannot reproduce this error. I see the upload component and I've successfully uploaded and deleted test images for old and new samples. Can you see this problem? Can we get more info? (do they see the issue on every device? In Chrome? ...)

rssidlowski commented 9 years ago

It works in Chrome and in the iPad. I have asked COB personnel where they are seeing this.

rssidlowski commented 9 years ago

From COB personnel: We are having problems downloading photos on both the Ipads and Desktops (using Chrome). When attempting to download a photo within the sample page a loading bar appears and after it reaches 100%, in then vooms off to the left of the screen but these is no photo under existing photos at the top. This only occurs within the sample page, the investigation page will allow the photo downloading. To make matters a bit more confusing, samples that were entered two weeks ago will allow photos to load. The problem seems to only apply to newer entries.

  1. Selected a photo and clicked submit, Progress bar reached 100% very fast and zoomed to the left upload1
  2. There is no available photo under existing photos upload2
gerrykelly commented 9 years ago

OK, so they mean upload when they say download, but this looks different than the original statement that " The widget to do the upload is not shown.". Either way I can't reproduce it. Can they note specifically what sample#? Can they clear their cache (history) and try again? Try in an incognito page?

rssidlowski commented 9 years ago

That widget comment was from me trying in Firefox...

rssidlowski commented 9 years ago

From Matt at COB: I cleared cache and browsing history in chrome (on desktop). Problem still exists. I can choose a photo and load it to a sample entry of an investigation that was entered two weeks ago, but the same photo will not load to a sample entered today or anytime in past two weeks. However, it will load to the investigation page of a new entry. I hope this helps, I am trying to find a pattern. I will try on Ipad soon.

rssidlowski commented 9 years ago

I can recreate. I added a new investigation, Regina's test investigation and I can't upload a photo.

gerrykelly commented 9 years ago

This is odd. I am able to recreate this error now when I select your investigation by name or number then select samples, select the sample and try to add a photo. However, if I get to that same sample# 21944 by selecting by sample ID, adding the image works fine. That's something for me to figure out, but meanwhile this workflow method should work for them.

rssidlowski commented 9 years ago

I tried to go to the sample by number and am not able to upload the image. I cleared cache prior as well.

gerrykelly commented 9 years ago

Should be working now. There was a foreign key between sample-objectID and sampleImage_sampleID that I did not know about and was now invalid. I corrected it to use sampleID and will look for any other cases. A problem would be that if they deleted samples where the ObjectID <> SampleID, any records sampleImage with that objectID would have been incorrectly deleted -- unlikely this happened, but maybe worth following up.

rssidlowski commented 9 years ago

I don't understand how to ask them about the case where they may have deleted by accident...

gerrykelly commented 9 years ago

It’s not that they would have accidently deleted a sample, it’s that they (or we in testing) would have intentionally deleted a sample and as a consequence records for photos with that sample’s objectID were deleted. No harm if: 1) SampleID=ObjectID, which is the case for all samples until a few weeks ago (there are 108 samples SampleID<>ObjectID 2) No sample, where a sample was deleted that had SampleID<>ObjectID, had the ObjectID equal to the deleted sample’s SampleID 3) A sample, where a sample was deleted that had SampleID<>ObjectID, had the ObjectID equal to the deleted sample’s SampleID, but there were no photos for that sample with ObjectID equal to the deleted sample’s SampleID. Looking at the data I see that they could not have lost photo records for samples they have entered. So you don’t need to ask them anything. However records could have been lost from the migrated data. I can look into that and restore the records (the photos themselves should still be on the server in that case, but I’ll check it out.)

gerrykelly commented 9 years ago

A quick check shows that there are 545 sample image records from before they started using the app, and that is the same number as I migrated, so that's good enough for me. There are 19 sample image records new since migration -- most or all are junk that from our testing and not deleted because of the sampleID vs ObjectID foreign key issue that is now found and fixed. Rather than looking at these, I'll just leave them since they don't do any harm (they might see a weird test photo for some recent samples and can ignore or delete it)

rssidlowski commented 9 years ago

Verified.