Skip to content

Adding when= to a Folder as documented does not render when deployed #22

@jfink5

Description

@jfink5

folder = Folder("SampleFolder", when=Folder.When(week_days=['SUN']...)

That code only works with Job objects, not Folders. It generates JSON where the when gets ignored on deployment. At the Folder level RuleBasedCalendars require a "name" and that's missing.

I used the following code to correctly implement a when with RuleBasedCalendars in a Folder...

mycal = CalendarRuleBased("mwf", when=Folder.When(week_days=['MON', 'WED', 'FRI'])) workflow.add( Folder( "SampleFolder", order_method = "Manual", when=Folder.When( rule_based_calendars=Folder.When.RuleBasedCalendars( # this is a list of CalendarRuleBased objects calendar_rule_based_list=[mycal], # this is the complete list of folder based and global RuleBasedCalendars included=["mwf", "EVERYDAY", "jfi-weekdays3", "jfi-friday"] ), from_time="1000" ) ) )

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions