From scm@users.codelutin.com Thu Jul 12 13:56:47 2018
From: "codelutin.com scm" <scm@users.codelutin.com>
To: faxtomail-commits@list.forge.codelutin.com
Subject: [Faxtomail-commits] branch develop updated (98bfb1e2 -> dc9805a2)
Date: Thu, 12 Jul 2018 13:56:46 +0200
Message-ID: <20180712115646.19828.43337@bihar.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0958575481884940210=="

--===============0958575481884940210==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

This is an automated email from the git hooks/post-receive script.

New change to branch develop in repository faxtomail.

See https://gitlab.nuiton.org/codelutin/faxtomail.git

      from  98bfb1e2  fixes #10029
       new  dc9805a2  fixes #10030

The 1 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 dc9805a2d8470b1c8e675e419f02543db2318b1f
Author: jcouteau <couteau@codelutin.com>
Date:   Thu Jul 12 13:54:55 2018 +0200

    fixes #10030

Summary of changes:
 .../franciaflex/faxtomail/services/service/EmailServiceImpl.java  | 6 +++++-
 .../franciaflex/faxtomail/services/service/EmailServiceTest.java  | 8 ++++++=
++
 2 files changed, 13 insertions(+), 1 deletion(-)

--=20
To stop receiving notification emails like this one, please contact
codelutin.com SCM administrator <admin+scm@codelutin.com>.

--===============0958575481884940210==--


From scm@users.codelutin.com Thu Jul 12 13:56:47 2018
From: "codelutin.com scm" <scm@users.codelutin.com>
To: faxtomail-commits@list.forge.codelutin.com
Subject: [Faxtomail-commits] 01/01: fixes #10030
Date: Thu, 12 Jul 2018 13:56:47 +0200
Message-ID: <20180712115647.0973E5C0F8A@goh.codelutin.com>
In-Reply-To: <20180712115646.19828.43337@bihar.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4251744727472781235=="

--===============4251744727472781235==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

This is an automated email from the git hooks/post-receive script.

New commit to branch develop in repository faxtomail.

See https://gitlab.nuiton.org/codelutin/faxtomail.git

commit dc9805a2d8470b1c8e675e419f02543db2318b1f
Author: jcouteau <couteau@codelutin.com>
Date:   Thu Jul 12 13:54:55 2018 +0200

    fixes #10030
---
 .../franciaflex/faxtomail/services/service/EmailServiceImpl.java  | 6 +++++-
 .../franciaflex/faxtomail/services/service/EmailServiceTest.java  | 8 ++++++=
++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/faxtomail-service/src/main/java/com/franciaflex/faxtomail/servic=
es/service/EmailServiceImpl.java b/faxtomail-service/src/main/java/com/franci=
aflex/faxtomail/services/service/EmailServiceImpl.java
index 813db13c..277e019c 100644
--- a/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/serv=
ice/EmailServiceImpl.java
+++ b/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/serv=
ice/EmailServiceImpl.java
@@ -400,7 +400,11 @@ public class EmailServiceImpl extends FaxToMailServiceSu=
pport implements EmailSe
                     try (PreparedStatement updateStatement =3D connection.pr=
epareStatement("UPDATE email SET takenby =3D ? WHERE topiaid =3D ?");
                          PreparedStatement historyStatement =3D connection.p=
repareStatement("UPDATE history SET email =3D ? WHERE topiaid =3D ?")) {
=20
-                        updateStatement.setString(1, user.getTopiaId());
+                        if (user !=3D null) {
+                            updateStatement.setString(1, user.getTopiaId());
+                        } else {
+                            updateStatement.setString(1, null);
+                        }
                         updateStatement.setString(2, email.getTopiaId());
                         int result =3D updateStatement.executeUpdate();
=20
diff --git a/faxtomail-service/src/test/java/com/franciaflex/faxtomail/servic=
es/service/EmailServiceTest.java b/faxtomail-service/src/test/java/com/franci=
aflex/faxtomail/services/service/EmailServiceTest.java
index 154141be..595b8dbd 100644
--- a/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/serv=
ice/EmailServiceTest.java
+++ b/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/serv=
ice/EmailServiceTest.java
@@ -322,6 +322,14 @@ public class EmailServiceTest extends AbstractFaxToMailS=
erviceTest {
=20
         Assert.assertEquals(cmarquis.getTrigraph(),emailToTest.getTakenBy().=
getTrigraph());
=20
+        //put back taken by to null and test it works
+        service.takeBy(emails, null);
+
+        emailToTest =3D service.getEmailById(email.getTopiaId());
+
+        Assert.assertNull(emailToTest.getTakenBy());
+
+
         //TODO should test history to
     }
=20

--=20
To stop receiving notification emails like this one, please contact
codelutin.com SCM administrator <admin+scm@codelutin.com>.

--===============4251744727472781235==--


