diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-07-27 22:47:21 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-07-27 22:47:42 +0300 |
commit | 3c257b20aaea22412e6d782df7ccf0c143d38fed (patch) | |
tree | 473b5a4fd0ab63fe4cdc3a92c07adddda80956f2 /yarns | |
parent | 11a7cda0991050a46140bcb4768f0905ea87d8ca (diff) | |
download | distix-3c257b20aaea22412e6d782df7ccf0c143d38fed.tar.gz |
Import individual mails to existing tickets
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/080-import-mail.yarn | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/yarns/080-import-mail.yarn b/yarns/080-import-mail.yarn index f947de2..31a8283 100644 --- a/yarns/080-import-mail.yarn +++ b/yarns/080-import-mail.yarn @@ -41,3 +41,28 @@ Next, import an mbox. AND user attempts to run distix list THEN attempt succeeded AND output matches "^[0-9a-f]{32} bar$" + +When importing e-mails, distix needs to automatically recognise when +they belong existing tickets: if the new mail refers to a mail in an +existing ticket, put the new mail to that ticket and don't open a new +one. The referring is done with the `In-Reply-To` and `References` +headers. + + SCENARIO import mails for the same ticket + + WHEN user attempts to run distix init REPO + THEN attempt succeeded + + GIVEN file MSG1 containing "From: foo@example.com\nSubject: bar\nMessage-Id: one@example.com\n\nyo\n" + WHEN user attempts to run distix import-mail REPO MSG1 + THEN attempt succeeded + + GIVEN file MSG2 containing "From: foo2@example.com\nSubject: blerf\nMessage-Id: <two@example.com>\nReferences: <one@example.com>\n\nyo\n" + WHEN user attempts to run distix import-mail REPO MSG2 + THEN attempt succeeded + + WHEN user changes working directory to REPO + AND user attempts to run distix list + THEN attempt succeeded + AND output matches "^[0-9a-f]{32} bar$" + AND output doesn't match "^[0-9a-f]{32} blerf$" |