[DOCS-13302] Investigate changes in SERVER-43360: $dateFromParts errors in an aggregation pipeline where the year is 0 and a sort is performed Created: 13/Dec/19  Updated: 13/Nov/23  Resolved: 18/Feb/20

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.3.3, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Jeffrey Allen
Resolution: Fixed Votes: 0
Labels: docs-grab-bag
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-43360 $dateFromParts errors in an aggregati... Closed
Participants:
Days since reply: 3 years, 51 weeks, 1 day ago
Epic Link: DOCS: 4.4 Server Release Work
Story Points: 3

 Description   

Description

Downstream Change Summary

As Carl noted in the Jira description, the documentation here shows the lower bound for week and isoWeekYear to be 0 (inclusive):
https://docs.mongodb.com/manual/reference/operator/aggregation/dateFromParts/

Our fix for this ticket modifies $dateFromParts so that the new lower bound for week and isoWeekYear is 1 (inclusive). We should update the documentation with the new bounds and perhaps also mention the change in our 4.4 release notes. Thanks.

Description of Linked Ticket

The similar $dateFromString expression does not err. The $dateFromParts expression will only err if there is a sort and the year is 0. The documentation says that the value 0 for year is supported. No error results if there are no documents in the database, and the error will occurr no matter what field is sorted on or the direction of the sort.

 

The equivalent find expression will not produce an error.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 18/Feb/20 ]

Author:

{'name': 'jeff-allen-mongo', 'username': 'jeff-allen-mongo', 'email': 'jeffrey.allen@10gen.com'}

Message: (DOCS-13302): dateFromParts has lower bound of 1 for year and isoWeekYear
Branch: master
https://github.com/mongodb/docs/commit/1142b053c78f51b9c66cf230f962d17f71b615a0

Generated at Thu Feb 08 08:07:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.