Skip to content

Commit

Permalink
[BISERVER-14992] not showing the repeats with every day and setting t…
Browse files Browse the repository at this point in the history
…he value to 0 in edit mode
  • Loading branch information
srallapa committed Nov 20, 2023
1 parent a8af0e9 commit 5175c8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,10 @@ private static List<ITimeRecurrence> parseRecurrence( String cronExpression, int
String[] tokens = cronExpression.split( delims );
if ( tokens.length > tokenIndex ) {
String timeTokens = tokens[tokenIndex];
//Adding this block in case if it's for every 1 day case, where it's considering the token as * instead of */1
if( tokenIndex == 3 && timeTokens.equals( "*" ) ) {
timeTokens = timeTokens + "/1";
}
tokens = timeTokens.split( "," ); //$NON-NLS-1$
if ( ( tokens.length > 1 ) || !( tokens[0].equals( "*" ) || tokens[0].equals( "?" ) ) ) { //$NON-NLS-1$ //$NON-NLS-2$
RecurrenceList timeList = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void timeSliceTest() {
trigger = QuartzScheduler.createComplexTrigger( "* * * * * ? *" );
Assert.assertEquals( trigger.getYearlyRecurrences().size(), 0 );
Assert.assertEquals( trigger.getMonthlyRecurrences().size(), 0 );
Assert.assertEquals( trigger.getDayOfMonthRecurrences().size(), 0 );
Assert.assertEquals( trigger.getDayOfMonthRecurrences().size(), 1 );
Assert.assertEquals( trigger.getDayOfWeekRecurrences().size(), 0 );
Assert.assertEquals( trigger.getHourlyRecurrences().size(), 0 );
Assert.assertEquals( trigger.getMinuteRecurrences().size(), 0 );
Expand Down

0 comments on commit 5175c8d

Please sign in to comment.