branch feature/sync updated (3cda6fb -> 2ba81c9)
This is an automated email from the git hooks/post-receive script. New change to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git from 3cda6fb fix to display error message when the sync went wrong new 2635e0d edited to change update into synchronization new 8720f1d disables send sync button when sync has been done once new d9b3a17 added possibility to edit a url and adds it to the syncURLList of the task new 47ce041 added url shows up in combobox list new 2524961 changed timestamp to remove milliseconds and standardized timezone to match iso new 7ca1419 changed acceptance new 2ba81c9 corrected sent time (was sending milliseconds instead of seconds) The 7 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 2ba81c9314c261e2c16ddfff53a269a6943c597b Author: servantie <servantie.c@gmail.com> Date: Mon Jun 13 14:56:37 2016 +0200 corrected sent time (was sending milliseconds instead of seconds) commit 7ca141995ce65d6e55b78902c61097d913ee4c5e Author: servantie <servantie.c@gmail.com> Date: Mon Jun 13 14:20:25 2016 +0200 changed acceptance commit 2524961607e75307ad3ba833cd7a06342df803f5 Author: servantie <servantie.c@gmail.com> Date: Mon Jun 13 12:35:15 2016 +0200 changed timestamp to remove milliseconds and standardized timezone to match iso commit 47ce041af4f1e53bf768c71ab6bd619c24eb4385 Author: servantie <servantie.c@gmail.com> Date: Mon Jun 13 10:39:36 2016 +0200 added url shows up in combobox list commit d9b3a1752c01035163bf4779740d141d6d303980 Author: servantie <servantie.c@gmail.com> Date: Fri Jun 10 11:10:54 2016 +0200 added possibility to edit a url and adds it to the syncURLList of the task (not updated in the combobox yet, but saved) commit 8720f1d5bf2abb245d64ac36abcc94025cabe1e1 Author: servantie <servantie.c@gmail.com> Date: Fri Jun 10 10:18:24 2016 +0200 disables send sync button when sync has been done once commit 2635e0d65d6c09224e1c6a337ba5daef6939bd22 Author: servantie <servantie.c@gmail.com> Date: Fri Jun 10 09:54:08 2016 +0200 edited to change update into synchronization Summary of changes: src/main/java/org/chorem/jtimer/JTimerConfig.java | 2 +- .../java/org/chorem/jtimer/entities/TimerTask.java | 11 +++++ .../chorem/jtimer/entities/TimerTaskHelper.java | 12 ++--- .../chorem/jtimer/io/TimerTaskSynchronizer.java | 5 +- .../jtimer/ui/report/TimerTaskUpdaterView.java | 55 ++++++++++++++++++---- .../org/chorem/jtimer/resources/JTimer.properties | 4 +- .../chorem/jtimer/resources/JTimer_fr.properties | 4 +- .../resources/TimerTaskUpdaterView_fr.properties | 2 +- 8 files changed, 72 insertions(+), 23 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 2635e0d65d6c09224e1c6a337ba5daef6939bd22 Author: servantie <servantie.c@gmail.com> Date: Fri Jun 10 09:54:08 2016 +0200 edited to change update into synchronization --- .../chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 16 +++++++++------- .../org/chorem/jtimer/resources/JTimer.properties | 4 ++-- .../org/chorem/jtimer/resources/JTimer_fr.properties | 4 ++-- .../report/resources/TimerTaskUpdaterView_fr.properties | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index 3c9f162..6fdc404 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -93,7 +93,6 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener /** * UpdaterView constructor. - * * @param application parent reference * @param core core reference * @param task the task to update @@ -470,28 +469,31 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener connection.disconnect(); } catch (MalformedURLException e) { log.error("URL malformed"); - //abort synchronization of this task if the url is wrong } catch (ProtocolException e) { log.error("Protocol error."); } catch (UnsupportedEncodingException e) { log.error("Problem with encoding"); } catch (IOException e) { log.error("Problem with the connection"); - //abort synchronization of this task if connection impossible } if (hasUpdated) { core.getData().editTaskLastSync(task, LocalDateTime.now()); } else { - log.error("Update error, wrong URL?"); String message = getResourceMap().getString("action.updateError"); String title = getResourceMap().getString("action.updateErrorTitle"); - infoBox(message, title); + errorBox(message, title); } + canUpdate = false; } - public static void infoBox(String infoMessage, String titleBar) + /** + * Method to display an error message (in case the sync goes wrong) + * @param errorMessage the message to display + * @param titleBar the title of the frame + */ + public static void errorBox(String errorMessage, String titleBar) { - JOptionPane.showMessageDialog(null, infoMessage, "Erreur : " + titleBar, JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(null, errorMessage, titleBar, JOptionPane.ERROR_MESSAGE); } @Override public void changedUpdate(DocumentEvent e) { diff --git a/src/main/resources/org/chorem/jtimer/resources/JTimer.properties b/src/main/resources/org/chorem/jtimer/resources/JTimer.properties index a926505..5233547 100644 --- a/src/main/resources/org/chorem/jtimer/resources/JTimer.properties +++ b/src/main/resources/org/chorem/jtimer/resources/JTimer.properties @@ -62,9 +62,9 @@ editTask.Action.text = &Edit Task editTask.Action.accelerator = F2 editTask.Action.shortDescription = Edit task -updateTask.Action.text = &Update Task +updateTask.Action.text = &Synchronise Task updateTask.Action.accelerator = F5 -updateTask.Action.shortDescription = Update task +updateTask.Action.shortDescription = Synchronise task closeTask.Action.text = &Open/Close Task closeTask.Action.accelerator = control O diff --git a/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties b/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties index eb4c7e3..c7ab52b 100644 --- a/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties +++ b/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties @@ -42,8 +42,8 @@ editTask.Action.text = \u00C9dition de la t\u00E2ch&e editTask.Action.shortDescription = \u00C9dition de la t\u00E2che -updateTask.Action.text = &Mettre \u00E0 jour -updateTask.Action.shortDescription = Mettre \u00E0 jour +updateTask.Action.text = &Synchroniser la t\u00E2che +updateTask.Action.shortDescription = Synchroniser closeTask.Action.text = &Ouvrir/Fermer la t\u00E2che closeTask.Action.shortDescription = Ouvrir ou fermer la t\u00E2che diff --git a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties index d34c270..9dd1b73 100644 --- a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties +++ b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties @@ -46,7 +46,7 @@ isIncludingAnnotations.Action.text = Inclure les annotations generateUpdate.Action.text = &G\u00E9n\u00E9rer generateUpdate.Action.icon = applications-system.png -generateUpdate.Action.shortDescription = G\u00E9n\u00E9rer les données de synchronisation +generateUpdate.Action.shortDescription = G\u00E9n\u00E9rer les donn\u00E9es de synchronisation sendUpdate.Action.text = &Envoyer sendUpdate.Action.icon = mail-forward.png -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 8720f1d5bf2abb245d64ac36abcc94025cabe1e1 Author: servantie <servantie.c@gmail.com> Date: Fri Jun 10 10:18:24 2016 +0200 disables send sync button when sync has been done once --- src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index 6fdc404..5f46583 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -483,7 +483,10 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener String title = getResourceMap().getString("action.updateErrorTitle"); errorBox(message, title); } + //advise that it's done, to grey-out the send sync button + boolean oldValue = canUpdate; canUpdate = false; + firePropertyChange("updatingEnabled", oldValue, canUpdate); } /** -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit d9b3a1752c01035163bf4779740d141d6d303980 Author: servantie <servantie.c@gmail.com> Date: Fri Jun 10 11:10:54 2016 +0200 added possibility to edit a url and adds it to the syncURLList of the task (not updated in the combobox yet, but saved) --- .../java/org/chorem/jtimer/entities/TimerTask.java | 11 +++++++++ .../jtimer/ui/report/TimerTaskUpdaterView.java | 26 +++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTask.java b/src/main/java/org/chorem/jtimer/entities/TimerTask.java index 6ef8165..35ff460 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTask.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTask.java @@ -276,6 +276,17 @@ public class TimerTask implements Cloneable, } /** + * Add one URL to the task's syncURLList + * @param urlToAdd : the url to add + */ + public void addURLToSyncList(String urlToAdd) { + //no need to have redundant elements + if (!synchronisingURLList.contains(urlToAdd)) { + synchronisingURLList.add(urlToAdd); + } + } + + /** * Add task's subtask. * * Also add parent reference. diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index 5f46583..19e838c 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -40,6 +40,10 @@ import javax.swing.*; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.*; @@ -56,7 +60,7 @@ import static org.chorem.jtimer.entities.TimerTaskHelper.taskToJSONFormat; * * Created by servantie on 13/05/16. */ -public class TimerTaskUpdaterView extends FrameView implements DocumentListener { +public class TimerTaskUpdaterView extends FrameView implements DocumentListener, ActionListener { /** Class logger */ protected static Log log = LogFactory.getLog(TimerTaskUpdaterView.class); @@ -207,6 +211,9 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener //display the various urls to sync to in a combobox to choose which one will be updated JLabel urlcomboBoxLabel = new JLabel(getResourceMap().getString("urlComboLabel")); urlComboBox = new JComboBox<>(); + //make it editable to add new urls -todo: save these urls to the task- + urlComboBox.setEditable(true); + urlComboBox.addActionListener(this); //add the urls to the combobox for (String url : urlSyncList) { urlComboBox.addItem(url); @@ -521,4 +528,21 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener protected void documentChanged() { setUpdatingEnabled(updateArea.getText().trim().length() > 0); } + + /** + * when an item is added to the list, + * add it to the urls + */ + public void itemAdded(){ + String urlToAdd = (String) urlComboBox.getSelectedItem(); + if (!urlToAdd.isEmpty()) { + task.addURLToSyncList(urlToAdd); + } + + } + + @Override + public void actionPerformed(ActionEvent actionEvent) { + itemAdded(); + } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 47ce041af4f1e53bf768c71ab6bd619c24eb4385 Author: servantie <servantie.c@gmail.com> Date: Mon Jun 13 10:39:36 2016 +0200 added url shows up in combobox list --- src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java | 8 ++++---- src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java | 3 +++ .../java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 9 +++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index 6c40ed5..2d20deb 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -375,9 +375,9 @@ public class TimerTaskHelper { String dateString = date.toString(); //as jtimer has time entries only for a day, the id of the times will be the date in yyyy-mm-dd format JsonObject periodElement = new JsonObject(); - periodElement.addProperty("periodId", dateString); - periodElement.addProperty("periodStartDate", dateString + "T00:00:00.000" + timezone); - periodElement.addProperty("periodDuration", entry.getValue()); + periodElement.addProperty("id", dateString); + periodElement.addProperty("startDate", dateString + "T00:00:00.000" + timezone); + periodElement.addProperty("duration", entry.getValue()); if (withAnnotations && !(getAnnotation(task, entry.getKey()).isEmpty())) { StringBuilder builder = new StringBuilder(); for (String s : getAnnotation(task, entry.getKey())) { @@ -385,7 +385,7 @@ public class TimerTaskHelper { builder.append(","); } String annotations = builder.toString(); - periodElement.addProperty("periodInfo", annotations); + periodElement.addProperty("info", annotations); } periodArray.add(periodElement); diff --git a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java index 37c685f..601c0a5 100644 --- a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java +++ b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java @@ -161,6 +161,9 @@ public class TimerTaskSynchronizer implements DataEventListener { if ("HTTP/1.1 200 OK".equals(s)) { hasUpdated = true; } + else { + log.info("Error" + s); + } } } } catch (MalformedURLException e) { diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index 19e838c..b302fde 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -211,7 +211,7 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener, //display the various urls to sync to in a combobox to choose which one will be updated JLabel urlcomboBoxLabel = new JLabel(getResourceMap().getString("urlComboLabel")); urlComboBox = new JComboBox<>(); - //make it editable to add new urls -todo: save these urls to the task- + //make it editable to add new urls urlComboBox.setEditable(true); urlComboBox.addActionListener(this); //add the urls to the combobox @@ -469,8 +469,12 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener, for (String s : entry.getValue()) { //positive answer, synchronization accepted if ("HTTP/1.1 200 OK".equals(s)) { + log.debug("OK (200)"); hasUpdated = true; } + else if ("HTTP/1.1 400 Bad Request".equals(s)) { + log.debug("Bad Request (400)"); + } } } connection.disconnect(); @@ -535,7 +539,8 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener, */ public void itemAdded(){ String urlToAdd = (String) urlComboBox.getSelectedItem(); - if (!urlToAdd.isEmpty()) { + if ((!urlToAdd.isEmpty()) && (!urlSyncList.contains(urlToAdd))) { + urlComboBox.addItem(urlToAdd); task.addURLToSyncList(urlToAdd); } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 2524961607e75307ad3ba833cd7a06342df803f5 Author: servantie <servantie.c@gmail.com> Date: Mon Jun 13 12:35:15 2016 +0200 changed timestamp to remove milliseconds and standardized timezone to match iso --- src/main/java/org/chorem/jtimer/JTimerConfig.java | 2 +- src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java | 6 +++--- src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java | 2 +- .../java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 7 ++++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/JTimerConfig.java b/src/main/java/org/chorem/jtimer/JTimerConfig.java index 9ea5497..1a857c4 100644 --- a/src/main/java/org/chorem/jtimer/JTimerConfig.java +++ b/src/main/java/org/chorem/jtimer/JTimerConfig.java @@ -300,7 +300,7 @@ public class JTimerConfig { IO_SYNC_CLASS("jtimer.io.synchronizer.class", "org.chorem.jtimer.io.TimerTaskSynchronizer"), IO_SYNC_AUTOSYNCDELAY("jtimer.io.synchronizer.autosyncdelay", "10"), - IO_SYNC_TIMEZONE("jtimer.io.synchronizer.timezone", "+0100"), + IO_SYNC_TIMEZONE("jtimer.io.synchronizer.timezone", "+01:00"), UI_IDLE_TIME("jtimer.ui.idletime", "300"), UI_SHOW_CLOSED("jtimer.ui.showclosed", "false"), diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index 2d20deb..cfc188a 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -376,7 +376,7 @@ public class TimerTaskHelper { //as jtimer has time entries only for a day, the id of the times will be the date in yyyy-mm-dd format JsonObject periodElement = new JsonObject(); periodElement.addProperty("id", dateString); - periodElement.addProperty("startDate", dateString + "T00:00:00.000" + timezone); + periodElement.addProperty("startDate", dateString + "T00:00:00" + timezone); periodElement.addProperty("duration", entry.getValue()); if (withAnnotations && !(getAnnotation(task, entry.getKey()).isEmpty())) { StringBuilder builder = new StringBuilder(); @@ -392,8 +392,8 @@ public class TimerTaskHelper { } } responseJSON.addProperty("URL", url); - responseJSON.addProperty("startDate", startPeriodDate.toString()); - responseJSON.addProperty("endDate", endPeriodDate.toString()); + responseJSON.addProperty("startDate", startPeriodDate.toString() + "T00:00:00" + timezone); + responseJSON.addProperty("endDate", endPeriodDate.toString() + "T00:00:00" + timezone); responseJSON.add("periods", periodArray); jsonObjectList.add(responseJSON); diff --git a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java index 601c0a5..557a96a 100644 --- a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java +++ b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java @@ -34,7 +34,7 @@ public class TimerTaskSynchronizer implements DataEventListener { protected Collection<TimerTask> tasksToSync; /** Timezone */ - protected String timezone = "+0100"; + protected String timezone = "+01:00"; /** * TimerTaskSynchronizer constructor diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index b302fde..e497368 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -110,7 +110,7 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener, this.core = core; this.task = task; - timezone = "+0100"; + timezone = "+01:00"; urlSyncList = task.getSynchronisingURLList(); setComponent(getMainComponent()); @@ -469,12 +469,13 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener, for (String s : entry.getValue()) { //positive answer, synchronization accepted if ("HTTP/1.1 200 OK".equals(s)) { - log.debug("OK (200)"); + log.info("OK (200)"); hasUpdated = true; } else if ("HTTP/1.1 400 Bad Request".equals(s)) { - log.debug("Bad Request (400)"); + log.info("Bad Request (400)"); } + log.info(s); } } connection.disconnect(); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 7ca141995ce65d6e55b78902c61097d913ee4c5e Author: servantie <servantie.c@gmail.com> Date: Mon Jun 13 14:20:25 2016 +0200 changed acceptance --- src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index e497368..24b697f 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -468,8 +468,8 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener, for (Map.Entry<String, List<String>> entry : map.entrySet()) { for (String s : entry.getValue()) { //positive answer, synchronization accepted - if ("HTTP/1.1 200 OK".equals(s)) { - log.info("OK (200)"); + if (s.startsWith("HTTP/1.1 2")){ + log.info("OK git" + s); hasUpdated = true; } else if ("HTTP/1.1 400 Bad Request".equals(s)) { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 2ba81c9314c261e2c16ddfff53a269a6943c597b Author: servantie <servantie.c@gmail.com> Date: Mon Jun 13 14:56:37 2016 +0200 corrected sent time (was sending milliseconds instead of seconds) --- src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index cfc188a..4dbf343 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -377,7 +377,7 @@ public class TimerTaskHelper { JsonObject periodElement = new JsonObject(); periodElement.addProperty("id", dateString); periodElement.addProperty("startDate", dateString + "T00:00:00" + timezone); - periodElement.addProperty("duration", entry.getValue()); + periodElement.addProperty("duration", entry.getValue()/1000); if (withAnnotations && !(getAnnotation(task, entry.getKey()).isEmpty())) { StringBuilder builder = new StringBuilder(); for (String s : getAnnotation(task, entry.getKey())) { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm