1

Topic: Update Last Survey Date for r6 location

Hi Folks, I've just imported some data in to a location in R6 but the 'last survey date' for the location still says unknown. Is there any way of forcing this to update? R6 v6.22.2

Thanks

Ian

2

Re: Update Last Survey Date for r6 location

I can't duplicate a problem with this. The date is not held as such, but calculated when the location is opened. It should be the latest sample date.  Please could you try the following

1. Open the Location hierarchy and highlight the location causing the problem
2. In the bottom right hand corner of the window click on related data and then on sample.
3. Check that the data you have imported is there as expected.

Mike Weideli

3

Re: Update Last Survey Date for r6 location

Hi Mike, thanks for the response. I've done as suggested, the imported data is there but the last survey date is still not updated.

4

Re: Update Last Survey Date for r6 location

I've had a look in a bit more detail at this. The location concerned had a habitat record attached prior to the import - the habitat record had a date of 'unknown' and this is what is displayed in the date of last survey. Could this be causing the problem, would Recorder know to replace unknown with a proper date once a record with a date was attached?

Ian

5

Re: Update Last Survey Date for r6 location

From the quick test I have run it all looks like it works ok.  The date displayed should be  most recent sample date for the Location.  Is this not what you are experiencing ?

Mike Weideli

6 (edited by ian 19-02-2015 16:23:41)

Re: Update Last Survey Date for r6 location

Hi Mike,
the location has 3 samples - the first one added donkeys years ago has a date of 'unknown' and the two that I imported have dates of 14/08/1996 and 13/07/1988.

I would expect the last survey date to be changed to 14/08/1996, but it still says 'unknown'.

I've tried temporarily replacing the 'unknown' sample date with 13/07/1988 - still no change to the last survey date.

I've just changed the 'unknown' date to today's date and finally the last survey date has changed from 'unknown' to today's date. Changing the date on the sample back to unknown again has finally left me with the correct last survey date of 14/08/1996

Seems to me that my copy of R6 is interpreting 'Unknown' as sometime between 14/08/1996 and 19/02/2015!

I'd love to know what was going on here as I have a number of locations whose last survey date is unknown and they all have samples with proper dates attached.

Ian

7

Re: Update Last Survey Date for r6 location

From the tests you have done it looks like unknown may not always being held internally in the format expected. This would explain why changing the unknown date to as valid date, then back again solves the problem. Also why I can't duplicate the problem with new test data.  Where did the original data come from ?

We can try a batch update to find and correct any which may be wrong, but before doing that I will check the code to see what it is actually doing.

Mike Weideli

8

Re: Update Last Survey Date for r6 location

Thanks Mike. It looks as though the data originally came from Recorder 3, it would have then gone to 2000, 2002 and finally in to R6. It looks as though it was an attempt to do something with the habitat data from the Recorder 3 sites table as they are all habitat records with an unknown date and unknown recorder.

Please don't spend any more time on it. I'm thinking I might remove the whole survey - we use GIS to manage our habitat data now.

Ian

9

Re: Update Last Survey Date for r6 location

I think I know what this is now and it will be down to the R3 data. If you need it, I can easily give you an immediate fix which will adjust the data.  I am aiming to put a fix in 6.24 which will stop it happening in future irrespective of the way 'unknown' is held.

Mike Weideli

10

Re: Update Last Survey Date for r6 location

Thanks Mike, I'll take you up on your offer of a fix as whilst I'm happy to remove the Survey containing the habitat data there may be other dodgy dates around.

I've just checked the Sample table and it looks as though you were right about the odd date format:

SAMPLE_KEY                 VAGUE_DATE_START    VAGUE_DATE_END    VAGUE_DATE_TYPE
LC00001400000FSC     18264                            37820                    U

The following shows what it should look like!
SAMPLE_KEY                    VAGUE_DATE_START    VAGUE_DATE_END    VAGUE_DATE_TYPE
LC0000140000AZK7               0                                     0                             U

Is the fix an update query that checks for non zeros in the start and end dates for vague date type 'U'?