P: Problems creating Smart Collection filtered by months and capture date

4 Votes
LEGEND ,
Jul 30, 2011 Jul 30, 2011

Copy link to clipboard

Copied

Filtering a smart collection by "Capture Date" and Months sometimes doesn't work. I have a smart collection filtering by "captured in the last 5 months but not in the last 4 months" and I get almost all of the pictures in my catalogue in the collection.

I'm using LR3.4.1

Bug Fixed
TOPICS
macOS, Windows

Views

18

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Mar 24, 2017 Mar 24, 2017
This issue is solved in Lightroom 4 and later.

Votes

Translate

Translate
11 Comments
LEGEND ,
Jul 30, 2011 Jul 30, 2011

Copy link to clipboard

Copied

Somewhat bizarrely, the problem seems to be with the '5 months' element of the smart collection. If I create a simple smart collection with "Capture date is in the last n months", it works perfectly correctly for all values of n apart from 5! When n=5 the result is the same total as 'All Photographs'.

Win7 64bit, LR 3.4.1

Votes

Translate

Translate

Report

Report
Enthusiast ,
Jul 30, 2011 Jul 30, 2011

Copy link to clipboard

Copied

Seems to happen for 1, 3, 5, 8, 10, 13, 15, 17... Months. This is funny. By the way: The "is NOT in the last X months" has the same bug, but only negated, i.e. it will show no photos at all for these special values.

P.S. Bug seems to affect the rules for the modify date, too.
P.S. II. I use LR 3.4.1 WinXP SP3 32Bit.
P.S. III: Just a little detail: "Capture date is in the last X months" does not show photos that have no capture date in the metadata. The special values are no exception to this rule. So it seems to be an effect that sets the date to compare to somewhere very far into the past.

Votes

Translate

Translate

Report

Report
LEGEND ,
Jul 30, 2011 Jul 30, 2011

Copy link to clipboard

Copied

Thanks for the confirmation, I thought I was going crazy :)

I'm using weeks in the mean time, but it's not the same...

Votes

Translate

Translate

Report

Report
LEGEND ,
Jul 30, 2011 Jul 30, 2011

Copy link to clipboard

Copied

On my system, the problem happens with 5, 17, 29, 41, and 53 months (the current date is 7/30/2011). But if I set my computer's clock to be 7/31/2011, then it happens with 1, 3, 5, and 8 months.

I believe the bug arises from the way LR is computing the beginning date. It takes today's date in year, month, and day format and simply subtracts the number of months, forming the beginning date, without checking that the date is valid. For example, today's date is 7/30/2011; given "in the last 5 months", it constructs the beginning date as 2/30/2011, which isn't valid. It tries to convert that invalid date to internal form, and the conversion routine returns -1 as an error value. LR doesn't check for the error value, and -1 gets interpreted as the earliest possible date.

The correct method would be to set the day portion of the beginning date to the minimum of the day and the maximum number of days in the month.

Working with dates and calendars is much harder than it seems, and programmers often get it wrong.

Votes

Translate

Translate

Report

Report
LEGEND ,
Jul 30, 2011 Jul 30, 2011

Copy link to clipboard

Copied

So basically this problem occurs 1-3 days a month... Funny I never noticed it before.

It'll be fixed by itself tomorrow.

Thanks!

Votes

Translate

Translate

Report

Report
Enthusiast ,
Jul 31, 2011 Jul 31, 2011

Copy link to clipboard

Copied

Ok, this makes sense. I testet at the 31th and got 1, 3, 5, 8, etc. When I set the PCs clock to tomorrow, the problems are gone.

Votes

Translate

Translate

Report

Report
Adobe Community Professional ,
Jul 31, 2011 Jul 31, 2011

Copy link to clipboard

Copied

What an unusual bug!! Good catch........

Votes

Translate

Translate

Report

Report
People's Champ ,
Jul 31, 2011 Jul 31, 2011

Copy link to clipboard

Copied

This is a known and accepted bug and has been there since LR2.7 (or even before, which I cannot test).

Beat

Votes

Translate

Translate

Report

Report
Enthusiast ,
Jul 31, 2011 Jul 31, 2011

Copy link to clipboard

Copied

Yes, the bug seems to date back at least to 2.3 (http://forums.adobe.com/thread/441298 ), but curiously it seems to have had the opposite effect in 2.x, e.g. "last 3 month" showed no photos at all on the critical dates. So the bug persisted, and only the error handling for the invalid date seems to have changed in 3.x.

Ok, doesn't really matter, more important is to know that currently one should avoid the unit "months" (and "hours", see http://feedback.photoshop.com/photosh... ).

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Aug 17, 2011 Aug 17, 2011

Copy link to clipboard

Copied

Hi Erez,

Scratch my previous comment (now deleted). I am able to confirm that the bug occurs (on Windows only) and have also confirmed that it has been previously entered in our bug database.

Thanks,
Ben

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

LATEST
This issue is solved in Lightroom 4 and later.

Senior Product Manager - Customer Advocacy - Digital Imaging

Votes

Translate

Translate

Report

Report