Commit Graph
308 Commits
Author SHA1 Message Date
stumpylog 14931c02e6 Fixes v9 API compatability with testing coverage 2026-04-16 09:14:00 -07:00
stumpylogandClaude Sonnet 4.6 1012dc887b test(tasks): fill coverage gaps in task system
- test_task_signals: add TestTaskRevokedHandler (marks REVOKED, ignores
  None request, ignores unknown id); switch existing direct
  PaperlessTask.objects.create calls to PaperlessTaskFactory; import
  pytest_mock and use MockerFixture typing on mocker params
- test_api_tasks: add test_rejects_invalid_days_param to TestSummary
- tasks.service.spec: add dismissAllTasks test (POST acknowledge_all +
  reload)
- models: add pragma: no cover to __str__, is_complete, and
  related_document_ids (trivial delegates, covered indirectly)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:34:34 -07:00
stumpylogandClaude Sonnet 4.6 e86c37f717 feat(tasks): extend and harden the task system redesign
- TaskType: add EMPTY_TRASH, CHECK_WORKFLOWS, CLEANUP_SHARE_LINKS;
  remove INDEX_REBUILD (no backing task — beat schedule uses index_optimize)
- TRACKED_TASKS: wire up all nine task types including the three new ones
  and llmindex_index / process_mail_accounts
- Add task_revoked_handler so cancelled/expired tasks are marked REVOKED
- Fix double-write: task_postrun_handler no longer overwrites result_data
  when status is already FAILURE (task_failure_handler owns that write)
- v9 serialiser: map EMAIL_CONSUME and FOLDER_CONSUME to AUTO_TASK
- views: scope task list to owner for regular users, admins see all;
  validate ?days= query param and return 400 on bad input
- tests: add test_list_admin_sees_all_tasks; rename/fix
  test_parses_duplicate_string (duplicates produce SUCCESS, not FAILURE);
  use PaperlessTaskFactory in modified tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:34:34 -07:00
stumpylogandClaude Sonnet 4.6 0bc9227d6f refactor(tasks): simplify task tracking code after redesign
- Extract COMPLETE_STATUSES as a class constant on PaperlessTask,
  eliminating the repeated status tuple across models.py, views.py (3×),
  and filters.py
- Extract _CELERY_STATE_TO_STATUS as a module-level constant instead of
  rebuilding the dict on every task_postrun
- Extract _V9_TYPE_TO_TRIGGER_SOURCE and _RUNNABLE_TASKS as class
  constants on TasksViewSet instead of rebuilding on every request
- Extract _TRIGGER_SOURCE_TO_V9_TYPE as a class constant on
  TaskSerializerV9 instead of rebuilding per serialized object
- Extract _get_consume_args helper to deduplicate identical arg
  extraction logic in _extract_input_data, _determine_trigger_source,
  and _extract_owner_id
- Move inline imports (re, traceback) and Avg to module level
- Fix _DOCUMENT_SOURCE_TO_TRIGGER type annotation key type to
  DocumentSource instead of Any
- Remove redundant truthiness checks in SystemStatusView branches
  already guarded by an is-None check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:34:34 -07:00
stumpylogandClaude Sonnet 4.6 ef4e3d31ef feat(tasks): replace PaperlessTask model with structured redesign
Drop the old string-based PaperlessTask table and recreate it with
Status/TaskType/TriggerSource enums, JSONField result storage, and
duration tracking fields. Update all call sites to use the new API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:34:34 -07:00
Trenton H 8c1225e120 Fixes an N+1 query in matching with the version content fetching by prefetching versions (#12562) 2026-04-13 13:10:28 -07:00
shamoon 566afdffca Enhancement: unify text search to use tantivy (#12485) 2026-04-03 13:53:45 -07:00
aed9abe48c Feature: Replace Whoosh with tantivy search backend (#12471)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Antoine Mérino <3023499+Merinorus@users.noreply.github.com>
2026-04-02 12:38:22 -07:00
Trenton H 9383471fa0 Feature: Transition all checksums to use SHA256 (#12432) 2026-03-26 11:28:02 -07:00
shamoon 3efc9a5733 Fix: use effective content for matching and suggestion content (#12293) 2026-03-10 23:45:56 +00:00
shamoon df03207eef Fix: correct doc version filename handling (#12223) 2026-03-04 23:28:07 +00:00
shamoon 85a18e5911 Enhancement: saved view sharing (#12142) 2026-03-04 14:15:43 -08:00
shamoon d51a118aac Merge branch 'main' into dev 2026-03-04 13:31:20 -08:00
shamoon 8b8307571a Fix: enforce path limit for db filename fields (#12235) 2026-03-03 13:19:56 -08:00
Trenton H 43406f44f2 Feature: Improve the retagger output using rich (#12194) 2026-03-03 07:14:59 -08:00
shamoon ceee769e26 Feature: document file versions (#12061) 2026-02-26 16:46:54 +00:00
Jan Kleineandshamoon c4ea332c61 Feature: move to trash action for workflows (#11176)
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2026-02-23 16:42:50 -08:00
Trenton H e8e027abc0 Chore: Optimizes the integer fields for choice types mostly, while leaving plenty of room to grow (#12057) 2026-02-10 15:11:44 -08:00
shamoon e45fca475a Feature: password removal workflow action (#11665) 2026-02-03 17:10:07 +00:00
Sebastian Steinbeißer 3b5ffbf9fa Chore(mypy): Annotate None returns for typing improvements (#11213) 2026-02-02 08:44:12 -08:00
shamoon 1f074390e4 Feature: sharelink bundles (#11682) 2026-01-27 18:54:51 +00:00
Antoine Mérino df07b8a03e Performance: faster statistics panel on dashboard (#11760) 2026-01-26 12:10:57 -08:00
shamoon 4428354150 Feature: allow duplicates with warnings, UI for discovery (#11815) 2026-01-26 18:55:08 +00:00
shamoon 45f5025f78 Enhancement: Add 'any of' workflow trigger filters (#11683) 2026-01-25 13:45:50 -08:00
Trenton H d0032c18be Breaking: Remove support for document and thumbnail encryption (#11850) 2026-01-24 19:29:54 -08:00
shamoon 742c136773 Fix: use explicit order field for workflow actions (#11781) 2026-01-16 07:39:00 -08:00
shamoon 055ce9172c Fix: use explicit order field for workflow actions (#11781) 2026-01-15 22:49:21 +00:00
shamoon e940764fe0 Feature: Paperless AI (#10319) 2026-01-13 16:24:42 +00:00
shamoon d0bd111eab Change: make workflowrun a softdeletemodel (#11194) 2025-10-27 20:51:39 +00:00
shamoon fcae006afa Tweak: improve tag parent validation error handling (#11096) 2025-10-20 22:42:01 -07:00
shamoon f6c004183e Feature: Advanced Workflow Trigger Filters (#11029) 2025-10-13 22:23:56 +00:00
shamoonandTrenton H 4cff907ba0 Feature: Nested Tags (#10833)
---------

Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
2025-09-17 21:41:39 +00:00
jojo2357andshamoon feb5d534b5 Enhancement: long text custom field (#10846)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2025-09-14 03:19:00 +00:00
david-loeandshamoon 2dc4f1f49b Enhancement: add storage path as workflow trigger filter (#10771)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2025-09-11 17:41:04 +00:00
9e11e7fd05 Enhancement: jinja template support for workflow title assignment (#10700)
---------

Co-authored-by: Trenton Holmes <797416+stumpylog@users.noreply.github.com>
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2025-09-11 06:56:16 -07:00
Antoine Mérino 8adc26e09d Enhancement: Limit excessively long content length when computing suggestions (#10656)
This helps prevent excessive processing times on very large documents
by limiting the text analyzed during date parsing, tag prediction,
and correspondent matching.

If the document exceeds 1.2M chars, crop to 1M char.
2025-09-09 13:02:16 -07:00
shamoon 59bf25edb1 Fix: created date fixes in v2.16 (#10026) 2025-05-24 09:45:07 -07:00
shamoon 1a6f32534c Change: treat created as date not datetime (#9793) 2025-05-16 14:23:04 +00:00
shamoon 344cc70cd5 Enhancement: support negative offset in scheduled workflows (#9746) 2025-05-11 20:04:46 +00:00
Sebastian Steinbeißer 76d363f22d Chore: switch from os.path to pathlib.Path (#9060) 2025-03-05 21:06:01 +00:00
shamoon edc7181843 Enhancement: support assigning custom field values in workflows (#9272) 2025-03-05 12:30:19 -08:00
Trenton H f205c4d0e2 Removes undocumented FileInfo (#9298) 2025-03-04 13:49:47 -08:00
Trenton H f3e6ed56b9 Removes the unused Log model and LogFilterSet (#9294) 2025-03-04 18:26:25 +00:00
shamoon 2d52226732 Enhancement: system status report sanity check, simpler classifier check, styling updates (#9106) 2025-02-26 22:12:20 +00:00
shamoon 4f08b5fa20 Enhancement: "webui" workflowtrigger source option (#9170) 2025-02-21 08:26:00 -08:00
shamoonandTrenton H e49ecd4dfe Enhancement: use charfield for webhook url, custom validation (#9128)
---------

Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
2025-02-16 14:26:30 -08:00
shamoon 63bb3644f6 Enhancement: filter by file type (#8946) 2025-02-10 08:09:50 -08:00
Sebastian Steinbeißer e560fa3be0 Chore: Enable ruff FBT (#8645) 2025-02-07 09:12:03 -08:00
shamoon e08606af6e Enhancement: date picker and date filter dropdown improvements (#9033) 2025-02-06 23:01:48 -08:00
shamoon ed1775e689 Enhancement: allow specifying JSON encoding for webhooks (#8799) 2025-01-18 12:19:50 -08:00