Support closing soon and falling back soon via natural language

This commit is contained in:
Jorge Manrubia
2025-06-27 13:32:56 +02:00
parent aa656dc2f4
commit cabf57dec3
22 changed files with 57252 additions and 62 deletions
+10 -2
View File
@@ -122,8 +122,16 @@ class Command::Ai::TranslatorTest < ActionDispatch::IntegrationTest
end
test "filter by time ranges" do
assert_command({context: {closure: "thisweek", indexed_by: "closed"}}, "cards completed this week")
assert_command({context: {creation: "thisweek", tag_ids: ["design"], creator_ids: [ "jz" ]}}, "cards created this week by jz tagged as #design")
assert_command({ context: { closure: "thisweek", indexed_by: "closed" } }, "cards completed this week")
assert_command({ context: { creation: "thisweek", tag_ids: [ "design" ], creator_ids: [ "jz" ] } }, "cards created this week by jz tagged as #design")
end
vcr_record!
test "closing soon and falling back soon" do
assert_command({ context: { indexed_by: "falling_back_soon" } }, "cards to be reconsidered soon")
assert_command({ context: { indexed_by: "falling_back_soon" } }, "cards to be reconsidered soon")
assert_command({ context: { assignee_ids: [ "david" ], indexed_by: "closing_soon" } }, "my cards that are going to be auto closed")
end
private