branch develop-1.1.x created (now d27f6db)
This is an automated email from the git hooks/post-receive script. New change to branch develop-1.1.x in repository faxtomail. See http://git.codelutin.com/faxtomail.git at d27f6db Add test for findArchivedEmail() This branch includes the following new commits: new 94e5a64 fixes #7532 Ne plus prendre en compte les noms de domaine dans les adresses expéditeur dans les réponses new 22865a8 Update version to 1.1.2-SNAPSHOT new c94ee85 Use pdfbox version 2.0.0-RC1 new d27f6db Add test for findArchivedEmail() The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit d27f6db12205c88404f22e88444eaca6d6cf6851 Author: Eric Chatellier <chatellier@codelutin.com> Date: Tue Oct 27 16:52:52 2015 +0100 Add test for findArchivedEmail() commit c94ee85d847208332e8f1836c3157a77b9c1007d Author: Eric Chatellier <chatellier@codelutin.com> Date: Tue Oct 27 16:51:23 2015 +0100 Use pdfbox version 2.0.0-RC1 commit 22865a887ec3928deb3df0eca3086c301de4c55d Author: Eric Chatellier <chatellier@codelutin.com> Date: Tue Oct 27 16:02:32 2015 +0100 Update version to 1.1.2-SNAPSHOT commit 94e5a64c6b6e00b0b68908b1dd27ddd96bd16f65 Author: Kevin Morin <morin@codelutin.com> Date: Thu Sep 17 10:29:45 2015 +0200 fixes #7532 Ne plus prendre en compte les noms de domaine dans les adresses expéditeur dans les réponses -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop-1.1.x in repository faxtomail. See http://git.codelutin.com/faxtomail.git commit 94e5a64c6b6e00b0b68908b1dd27ddd96bd16f65 Author: Kevin Morin <morin@codelutin.com> Date: Thu Sep 17 10:29:45 2015 +0200 fixes #7532 Ne plus prendre en compte les noms de domaine dans les adresses expéditeur dans les réponses --- .../faxtomail/ui/swing/content/reply/ReplyFormUIModel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java index 7576737..d3af493 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java @@ -295,7 +295,9 @@ public class ReplyFormUIModel extends AbstractSerializableBean { if (PROPERTY_FROM.equals(field)) { // valid if the email address is in the list of the authorized addresses // or if the domain is in the authorized domains, or if the domain list is empty - result = isEmailAllowed(getFrom()) || isDomainAllowed(getFrom()); + // 20150917 kmorin #7532 Ne plus prendre en compte les noms de domaine dans les adresses expéditeur dans les réponses + + result = isEmailAllowed(getFrom());// || isDomainAllowed(getFrom()); } return result; } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop-1.1.x in repository faxtomail. See http://git.codelutin.com/faxtomail.git commit 22865a887ec3928deb3df0eca3086c301de4c55d Author: Eric Chatellier <chatellier@codelutin.com> Date: Tue Oct 27 16:02:32 2015 +0100 Update version to 1.1.2-SNAPSHOT --- .gitignore | 1 + faxtomail-persistence/pom.xml | 2 +- faxtomail-service/pom.xml | 2 +- faxtomail-ui-swing/pom.xml | 2 +- faxtomail-ui-web/pom.xml | 2 +- pom.xml | 3 ++- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f09b769..b4d98b5 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ tmp/ local.properties .settings/ .loadpath +.project # External tool builders .externalToolBuilders/ diff --git a/faxtomail-persistence/pom.xml b/faxtomail-persistence/pom.xml index 189cf8a..de1801e 100644 --- a/faxtomail-persistence/pom.xml +++ b/faxtomail-persistence/pom.xml @@ -25,7 +25,7 @@ <parent> <artifactId>faxtomail</artifactId> <groupId>com.franciaflex</groupId> - <version>1.1</version> + <version>1.1.2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/faxtomail-service/pom.xml b/faxtomail-service/pom.xml index 4d06cdc..1068ef4 100644 --- a/faxtomail-service/pom.xml +++ b/faxtomail-service/pom.xml @@ -27,7 +27,7 @@ <parent> <artifactId>faxtomail</artifactId> <groupId>com.franciaflex</groupId> - <version>1.1</version> + <version>1.1.2-SNAPSHOT</version> </parent> <groupId>com.franciaflex.faxtomail</groupId> diff --git a/faxtomail-ui-swing/pom.xml b/faxtomail-ui-swing/pom.xml index 4249117..a883e68 100644 --- a/faxtomail-ui-swing/pom.xml +++ b/faxtomail-ui-swing/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>com.franciaflex</groupId> <artifactId>faxtomail</artifactId> - <version>1.1</version> + <version>1.1.2-SNAPSHOT</version> </parent> <groupId>com.franciaflex.faxtomail</groupId> diff --git a/faxtomail-ui-web/pom.xml b/faxtomail-ui-web/pom.xml index ce22e33..c98e829 100644 --- a/faxtomail-ui-web/pom.xml +++ b/faxtomail-ui-web/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>com.franciaflex</groupId> <artifactId>faxtomail</artifactId> - <version>1.1</version> + <version>1.1.2-SNAPSHOT</version> </parent> <groupId>com.franciaflex.faxtomail</groupId> diff --git a/pom.xml b/pom.xml index bcb569d..1a7b6f1 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ <groupId>com.franciaflex</groupId> <artifactId>faxtomail</artifactId> - <version>1.1</version> + <version>1.1.2-SNAPSHOT</version> <packaging>pom</packaging> <name>FaxToMail</name> @@ -146,6 +146,7 @@ <!-- issues status to include in changelog --> <!--<redmine.statusIds>18,19,3,10,11</redmine.statusIds>--> + <jgitflow.developBranchName>develop-1.1.x</jgitflow.developBranchName> </properties> <repositories> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop-1.1.x in repository faxtomail. See http://git.codelutin.com/faxtomail.git commit c94ee85d847208332e8f1836c3157a77b9c1007d Author: Eric Chatellier <chatellier@codelutin.com> Date: Tue Oct 27 16:51:23 2015 +0100 Use pdfbox version 2.0.0-RC1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1a7b6f1..54f948b 100644 --- a/pom.xml +++ b/pom.xml @@ -701,7 +701,7 @@ <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId> - <version>2.0.0-SNAPSHOT</version> + <version>2.0.0-RC1</version> </dependency> <dependency> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop-1.1.x in repository faxtomail. See http://git.codelutin.com/faxtomail.git commit d27f6db12205c88404f22e88444eaca6d6cf6851 Author: Eric Chatellier <chatellier@codelutin.com> Date: Tue Oct 27 16:52:52 2015 +0100 Add test for findArchivedEmail() --- .../services/service/EmailServiceTest.java | 50 ++++++++++++++-------- .../services/service/InitTestDataImpl.java | 19 ++++---- 2 files changed, 42 insertions(+), 27 deletions(-) diff --git a/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java b/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java index 8720163..3258e70 100644 --- a/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java +++ b/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java @@ -24,6 +24,21 @@ package com.franciaflex.faxtomail.services.service; * #L% */ +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.nuiton.topia.persistence.TopiaEntities; +import org.nuiton.util.pagination.PaginationParameter; +import org.nuiton.util.pagination.PaginationResult; import com.franciaflex.faxtomail.persistence.entities.AttachmentFile; import com.franciaflex.faxtomail.persistence.entities.DemandStatus; import com.franciaflex.faxtomail.persistence.entities.Email; @@ -34,20 +49,6 @@ import com.franciaflex.faxtomail.persistence.entities.Range; import com.franciaflex.faxtomail.persistence.entities.SearchFilter; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.nuiton.topia.persistence.TopiaEntities; -import org.nuiton.util.pagination.PaginationParameter; -import org.nuiton.util.pagination.PaginationResult; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.Collections; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; /** * Email service tests. @@ -160,7 +161,7 @@ public class EmailServiceTest extends AbstractFaxToMailServiceTest { // tests fetch + pagination - PaginationParameter page = PaginationParameter.of(0, 7, Email.PROPERTY_RECEPTION_DATE, false); + PaginationParameter page = PaginationParameter.of(0, 4, Email.PROPERTY_RECEPTION_DATE, false); MailFolderTopiaDao mailFolderDao = getServiceContext().getPersistenceContext().getMailFolderDao(); MailFolder cyril = mailFolderDao.forNameEquals("Cyril").findUnique(); @@ -168,12 +169,12 @@ public class EmailServiceTest extends AbstractFaxToMailServiceTest { cyril.setFolderReadable(true); PaginationResult<Email> page1 = service.getEmailForFolder(cyril, getCurrentUser(), new EmailFilter(), page); - Assert.assertEquals(10, page1.getCount()); - Assert.assertEquals(7, page1.getElements().size()); + Assert.assertEquals(5, page1.getCount()); // + 5 archived now + Assert.assertEquals(4, page1.getElements().size()); PaginationResult<Email> page2 = service.getEmailForFolder(cyril, getCurrentUser(), new EmailFilter(), page1.getNextPage()); - Assert.assertEquals(10, page2.getCount()); - Assert.assertEquals(3, page2.getElements().size()); + Assert.assertEquals(5, page2.getCount()); // + 5 archived now + Assert.assertEquals(1, page2.getElements().size()); Set<String> page1Ids = Sets.newHashSet(Iterables.transform(page1.getElements(), TopiaEntities.getTopiaIdFunction())); Set<String> page2Ids = Sets.newHashSet(Iterables.transform(page2.getElements(), TopiaEntities.getTopiaIdFunction())); @@ -214,6 +215,17 @@ public class EmailServiceTest extends AbstractFaxToMailServiceTest { // NPE : Assert.assertEquals(600, entry.getValue()[2].longValue()); } + /** + * Test le fonctionnement de search archives qui contennait une erreur de synthax en 1.1. + */ + @Test + public void testSearchArchives() { + // il y a une compagnie de test FXCOMP + // les range row sont préfixé par FXRR + Collection<Email> emails = service.searchArchives("FXRR", "FXCOMP"); + Assert.assertFalse(emails.isEmpty()); + } + // @Test // public void testConvertHTMLToPdf() { // diff --git a/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/InitTestDataImpl.java b/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/InitTestDataImpl.java index 504a70d..82c9b9d 100644 --- a/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/InitTestDataImpl.java +++ b/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/InitTestDataImpl.java @@ -142,7 +142,8 @@ public class InitTestDataImpl extends FaxToMailServiceSupport implements InitTes // create folders MailFolderTopiaDao folderDao = getPersistenceContext().getMailFolderDao(); Map<String, MailFolder> foldersByName = new HashMap<>(); - MailFolder franciaflex = folderDao.create(MailFolder.PROPERTY_NAME, "Franciaflex"); + MailFolder franciaflex = folderDao.create(MailFolder.PROPERTY_NAME, "Franciaflex", + MailFolder.PROPERTY_COMPANY, "FXCOMP"); // categories MailFolder chargesClientelle = folderDao.create(MailFolder.PROPERTY_NAME, "Chargés de clientèle", @@ -243,8 +244,6 @@ public class InitTestDataImpl extends FaxToMailServiceSupport implements InitTes List<Range> ranges, List<Client> clients, List<DemandType> types, List<Priority> priorities, MailFolder folder, FaxToMailUser user) throws InvalidClientException { - List<RangeRow> rangeRows = new ArrayList<>(); - Client client = clients.get(0); boolean fax = false; List<String> senders = client.getEmailAddresses(); @@ -294,13 +293,14 @@ public class InitTestDataImpl extends FaxToMailServiceSupport implements InitTes if (opened) { + List<RangeRow> rangeRows = new ArrayList<>(); getEmailService().addToHistory(email.getTopiaId(), HistoryType.OPENING, user, now); DemandType demandType = types.get(0); // types.get(0) à des gammes obligatoires if (FaxToMailServiceUtils.contains(demandType.getRequiredFields(), MailField.RANGE_ROW)) { for (int j = 0; j < 4; j++) { RangeRow rangeRow = rangeRowDao.create( RangeRow.PROPERTY_RANGE, ranges.get(j), - RangeRow.PROPERTY_COMMAND_NUMBER, RandomStringUtils.randomNumeric(6), + RangeRow.PROPERTY_COMMAND_NUMBER, "FX-" + RandomStringUtils.randomNumeric(4), RangeRow.PROPERTY_PRODUCT_QUANTITY, 50, RangeRow.PROPERTY_SAV_QUANTITY, 60); rangeRows.add(rangeRow); @@ -314,6 +314,7 @@ public class InitTestDataImpl extends FaxToMailServiceSupport implements InitTes getEmailService().saveEmail(email, user, Email.PROPERTY_DEMAND_TYPE, Email.PROPERTY_PRIORITY, Email.PROPERTY_RANGE_ROW); } + // create another test mail one month ago in archived state Calendar cal = Calendar.getInstance(); cal.add(Calendar.DAY_OF_MONTH, -1); Date yesterday = cal.getTime(); @@ -334,18 +335,20 @@ public class InitTestDataImpl extends FaxToMailServiceSupport implements InitTes + client.getName() + " / " + faxNumber + " / " + dateDecorator.toString(yesterday), Email.PROPERTY_RECEPTION_DATE, yesterday, Email.PROPERTY_MAIL_FOLDER, folder, - Email.PROPERTY_DEMAND_STATUS, opened ? DemandStatus.IN_PROGRESS : DemandStatus.UNTREATED, + Email.PROPERTY_DEMAND_STATUS, DemandStatus.ARCHIVED, Email.PROPERTY_HISTORY, Lists.newArrayList(history), Email.PROPERTY_ORIGINAL_EMAIL, originalEmail); if (opened) { - getEmailService().addToHistory(email.getTopiaId(), HistoryType.OPENING, user, now); + List<RangeRow> rangeRows = new ArrayList<>(); + getEmailService().addToHistory(email.getTopiaId(), HistoryType.OPENING, user, yesterday); DemandType demandType = types.get(0); // types.get(0) à des gammes obligatoires if (FaxToMailServiceUtils.contains(demandType.getRequiredFields(), MailField.RANGE_ROW)) { for (int j = 0; j < 4; j++) { RangeRow rangeRow = rangeRowDao.create(RangeRow.PROPERTY_RANGE, ranges.get(j), - RangeRow.PROPERTY_COMMAND_NUMBER, RandomStringUtils.randomNumeric(6), RangeRow.PROPERTY_PRODUCT_QUANTITY, - 50, RangeRow.PROPERTY_SAV_QUANTITY, 60); + RangeRow.PROPERTY_COMMAND_NUMBER, "FXRR-" + RandomStringUtils.randomNumeric(4), + RangeRow.PROPERTY_PRODUCT_QUANTITY, 50, + RangeRow.PROPERTY_SAV_QUANTITY, 60); rangeRows.add(rangeRow); } email.setRangeRow(rangeRows); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm