Add support for filtering by creation or completion windows of times

This commit is contained in:
Jorge Manrubia
2025-06-27 09:52:36 +02:00
parent fe8e73015c
commit 3fbfa1404c
28 changed files with 86907 additions and 60 deletions
@@ -121,6 +121,13 @@ class Command::Ai::TranslatorTest < ActionDispatch::IntegrationTest
assert_command({ commands: [ "/add_card urgent issue" ] }, "create card urgent issue")
end
vcr_record!
test "filter by time ranges" do
assert_command({context: {completion: "thisweek", indexed_by: "closed"}}, "cards completed this week")
assert_command({context: {creation: "thisweek", tag_ids: ["design"], creator_id: "jz"}}, "cards created this week by jz tagged as #design")
end
private
def assert_command(expected, query, context: :list)
assert_equal expected, translate(query, context:)