* feat: add option to set default email recipients
* fix: don't crash if no events
communication.js:206 Uncaught TypeError: Cannot read properties of undefined (reading 'events')
at frappe.views.CommunicationComposer.get_default_recipients (communication.js:206:16)
at frappe.views.CommunicationComposer.get_fields (communication.js:57:19)
at frappe.views.CommunicationComposer.make (communication.js:25:17)
at new frappe.views.CommunicationComposer (communication.js:16:8)
at Object.primary_action (communication__list_js:34:3)
at HTMLButtonElement.<anonymous> (list_view.js:1432:19)
at HTMLButtonElement.dispatch (jquery.js:5135:27)
at elemData.handle (jquery.js:4939:28)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
---------
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: Akhil Narang <me@akhilnarang.dev>
Ideally, this query should be converted to "Top N" variant and just pick
first 20 records, join only them with other table and send data back.
Currently we always group by `name` in list view. This makes "show title
in link field" join queries insanely slow as it first queries entire
table and then applies limit.
* fix: ensure that prepared report is set even on timeout
Under following condition prepared report is never enabled:
- Process takes too much time and is killed
- HTTP timeout
Fix:
- We spawn a thread and ask it to wait till prepared report threshold
time is elapsed and set prepared report on it.
- Condvar is used to immdiately wake up and end the thread if report
finsihed early.
* refactor: use threading.Timer
No need to implement it ourselves
* Revert "fix: default filter setup on todo list (#25455)"
This reverts commit 396bc4102e.
* Revert "Revert "fix: default filter setup on todo list (#25455)""
This reverts commit 5e6b6997d526446760c42e7e812ceef5fe416492.
* test: wait longer for filters to apply
* fix: route redirects after login
* test: use clear_filters
* fix: don't set default filters on ToDo
This messes with previous filters logic.
Happens here on a local setup if I click `Compose Email` button
communication.js:212 Uncaught TypeError: Cannot read properties of undefined (reading 'doc')
at frappe.views.CommunicationComposer.guess_language (communication.js:212:32)
at frappe.views.CommunicationComposer.setup_print (communication.js:536:8)
at frappe.views.CommunicationComposer.prepare (communication.js:239:8)
at frappe.views.CommunicationComposer.make (communication.js:41:8)
at new frappe.views.CommunicationComposer (communication.js:16:8)
at Object.primary_action (communication__list_js:34:3)
at HTMLButtonElement.<anonymous> (list_view.js:1426:19)
at HTMLButtonElement.dispatch (jquery.js:5135:27)
at elemData.handle (jquery.js:4939:28)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
`distinct count(fieldname)` is supported well but `count(distinct fieldname)` fails if fieldname contains full field with table name included. This PR just adds basic handling for it.
Needs to be rewritten entirely in QB __some day__.