question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Agenda does not work as expected

See original GitHub issue

Do you want to request a feature or report a bug?

I think it is a bug.

What’s the current behavior?

The current behavior is that a event for today won’t be showed in the agenda. I checked the code of the Agenda component (Agenda.js) and I saw, that the library removes events which should not be showed in the agenda view. Thats totally ok for now!

The code looks like this:

export function inRange(e, start, end, accessors) {
  let eStart = dates.startOf(accessors.start(e), 'day')
  let eEnd = accessors.end(e)

  let startsBeforeEnd = dates.lte(eStart, end, 'day')
  // when the event is zero duration we need to handle a bit differently
  let endsAfterStart = !dates.eq(eStart, eEnd, 'minutes')
    ? dates.gt(eEnd, start, 'minutes')
    : dates.gte(eEnd, start, 'minutes')

  return startsBeforeEnd && endsAfterStart
}

Please take a look into the eEnd variable. Why is this different from the eStart variable? I tought the code should look like this: dates.endOf(accessors.end(e), 'day') ?

As you can see in the following image, my event starts at 5:30am and ends 10am. image

If I continue the debugger to the end, you can see that the endsAfterStart returns false. But thats not true! The event definitely ends after the start date. image

The end and start property from the arguments always have to same value for the agenda view, because this value is the current time.

Hopefully anyone can help me out if I do something wrong :x

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

1reaction
stale[bot]commented, Oct 28, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

1reaction
davidhan527commented, Aug 23, 2019

I’m seeing a similar issue. I have an all-day event for today, and it doesn’t show on the Agenda view unless I hit the back button. The default Agenda view which includes today should show today’s all-day event.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Agenda groups not working as expected in Drools
Agenda groups allow you to place rules into groups, and to place those groups onto a stack. The stack has push/pop behavior.
Read more >
agenda jobs are not running after restart node server #996
The 'start' event is not fired when the time comes. In order to get the thing working as expected again I am forced...
Read more >
Common Problems with Google Calendar - Zapier Help
If you click on agenda view in Google Calendar you will see the event show up. Google Calendar doesn't show events with a...
Read more >
Tasks are not scheduled as expected in Microsoft Project - Office
This article describes why a task may not be scheduled as expected in Microsoft Project and offers suggestions for correcting the behavior.
Read more >
Org mode not working as expected - Emacs Stack Exchange
When I run org-agenda m it provides tag1 and tag2 to choose from. But when selected it does not produce any results. Can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found