{"action":"created","issue":{"url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/4470","labels_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/4470/labels{/name}","comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/4470/comments","events_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/4470/events","html_url":"https://github.com/HabitRPG/habitrpg/issues/4470","id":53309073,"number":4470,"title":"duplicated Tasks - identical text, notes, and ID. Different challenge element: empty object versus null","user":{"login":"Alys","id":1495809,"avatar_url":"https://avatars.githubusercontent.com/u/1495809?v=3","gravatar_id":"","url":"https://api.github.com/users/Alys","html_url":"https://github.com/Alys","followers_url":"https://api.github.com/users/Alys/followers","following_url":"https://api.github.com/users/Alys/following{/other_user}","gists_url":"https://api.github.com/users/Alys/gists{/gist_id}","starred_url":"https://api.github.com/users/Alys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alys/subscriptions","organizations_url":"https://api.github.com/users/Alys/orgs","repos_url":"https://api.github.com/users/Alys/repos","events_url":"https://api.github.com/users/Alys/events{/privacy}","received_events_url":"https://api.github.com/users/Alys/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-03T16:58:46Z","updated_at":"2015-02-26T21:01:02Z","closed_at":null,"body":"ping @lefnire @paglias \r\n\r\nIn the Tavern, a user reported that their Habits had been duplicated: _\"Hi, can someone tell me if my Habits will reset themselves daily? I only have four that I'm working on, but they are listed now twice in my Habit sections, so I didn't know if it was a bug or if that's what I should expect?\"_\r\n\r\nThe user does not have any Dailies, To-Dos, or Rewards so I can't tell if this bug affects only Habits or all tasks.\r\n\r\nTheir data displaying this problem is below. It's identical to what was in the database except that I have replaced all text and notes with placeholders like \"Text 1\", etc. Where the same piece of text appeared twice, I replaced it with the same placeholder.\r\n\r\nYou can see the following things:\r\n- All but one of their Habits was duplicated (\"Text 4\" had no duplicate).\r\n- Each duplicated Habit had identical text, note, and ID.\r\n- Each duplicated Habit had **different challenge elements**: one copy had an empty object `{ }` and the other copy had `null`.\r\n\r\n````\r\n{\r\n\t\"_id\" : \"de860fb0-159d-4ed5-9a32-9484c946b80a\",\r\n\t\"habits\" : [\r\n\t\t{\r\n\t\t\t\"text\" : \"Text 1\",\r\n\t\t\t\"challenge\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"attribute\" : \"str\",\r\n\t\t\t\"priority\" : 2,\r\n\t\t\t\"value\" : 0,\r\n\t\t\t\"tags\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"notes\" : \"Note 1\",\r\n\t\t\t\"dateCreated\" : ISODate(\"2015-01-02T18:24:04.478Z\"),\r\n\t\t\t\"id\" : \"8c6d6092-656c-49fa-b8e2-7d9854532e10\",\r\n\t\t\t\"down\" : true,\r\n\t\t\t\"up\" : true,\r\n\t\t\t\"history\" : [ ],\r\n\t\t\t\"type\" : \"habit\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"text\" : \"Text 2\",\r\n\t\t\t\"challenge\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"attribute\" : \"str\",\r\n\t\t\t\"priority\" : 1.5,\r\n\t\t\t\"value\" : 0,\r\n\t\t\t\"tags\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"notes\" : \"Note 2\",\r\n\t\t\t\"dateCreated\" : ISODate(\"2015-01-02T18:20:03.030Z\"),\r\n\t\t\t\"id\" : \"039ef9b3-cbea-4674-9270-f3a773be324d\",\r\n\t\t\t\"down\" : true,\r\n\t\t\t\"up\" : true,\r\n\t\t\t\"history\" : [ ],\r\n\t\t\t\"type\" : \"habit\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"text\" : \"Text 3\",\r\n\t\t\t\"challenge\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"attribute\" : \"str\",\r\n\t\t\t\"priority\" : 2,\r\n\t\t\t\"value\" : 0,\r\n\t\t\t\"tags\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"notes\" : \"Note 3\",\r\n\t\t\t\"dateCreated\" : ISODate(\"2015-01-02T18:21:54.688Z\"),\r\n\t\t\t\"id\" : \"d4e662cd-2f9b-480e-9cef-50dccc32d5f4\",\r\n\t\t\t\"down\" : true,\r\n\t\t\t\"up\" : true,\r\n\t\t\t\"history\" : [ ],\r\n\t\t\t\"type\" : \"habit\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"text\" : \"Text 4\",\r\n\t\t\t\"challenge\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"attribute\" : \"str\",\r\n\t\t\t\"priority\" : 1,\r\n\t\t\t\"value\" : 0,\r\n\t\t\t\"tags\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"notes\" : \"\",\r\n\t\t\t\"dateCreated\" : ISODate(\"2015-01-02T19:05:31.320Z\"),\r\n\t\t\t\"id\" : \"fba1e045-5921-4dfb-b0db-6e00cb240746\",\r\n\t\t\t\"down\" : true,\r\n\t\t\t\"up\" : true,\r\n\t\t\t\"history\" : [ ],\r\n\t\t\t\"type\" : \"habit\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"text\" : \"Text 5\",\r\n\t\t\t\"challenge\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"attribute\" : \"str\",\r\n\t\t\t\"priority\" : 2,\r\n\t\t\t\"value\" : 0,\r\n\t\t\t\"tags\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"notes\" : \"Note 5\",\r\n\t\t\t\"dateCreated\" : ISODate(\"2015-01-02T18:46:08.374Z\"),\r\n\t\t\t\"id\" : \"13fc65ed-8440-43b5-9b1f-584d3d4511ee\",\r\n\t\t\t\"down\" : false,\r\n\t\t\t\"up\" : true,\r\n\t\t\t\"history\" : [ ],\r\n\t\t\t\"type\" : \"habit\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"text\" : \"Text 5\",\r\n\t\t\t\"challenge\" : null,\r\n\t\t\t\"attribute\" : \"str\",\r\n\t\t\t\"priority\" : 2,\r\n\t\t\t\"value\" : 0,\r\n\t\t\t\"tags\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"notes\" : \"Note 5\",\r\n\t\t\t\"dateCreated\" : ISODate(\"2015-01-02T18:46:08.374Z\"),\r\n\t\t\t\"id\" : \"13fc65ed-8440-43b5-9b1f-584d3d4511ee\",\r\n\t\t\t\"down\" : false,\r\n\t\t\t\"up\" : true,\r\n\t\t\t\"history\" : [ ],\r\n\t\t\t\"type\" : \"habit\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"text\" : \"Text 1\",\r\n\t\t\t\"challenge\" : null,\r\n\t\t\t\"attribute\" : \"str\",\r\n\t\t\t\"priority\" : 2,\r\n\t\t\t\"value\" : 0,\r\n\t\t\t\"tags\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"notes\" : \"Note 1\",\r\n\t\t\t\"dateCreated\" : ISODate(\"2015-01-02T18:24:04.478Z\"),\r\n\t\t\t\"id\" : \"8c6d6092-656c-49fa-b8e2-7d9854532e10\",\r\n\t\t\t\"down\" : true,\r\n\t\t\t\"up\" : true,\r\n\t\t\t\"history\" : [ ],\r\n\t\t\t\"type\" : \"habit\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"text\" : \"Text 3\",\r\n\t\t\t\"challenge\" : null,\r\n\t\t\t\"attribute\" : \"str\",\r\n\t\t\t\"priority\" : 2,\r\n\t\t\t\"value\" : 0,\r\n\t\t\t\"tags\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"notes\" : \"Note 3\",\r\n\t\t\t\"dateCreated\" : ISODate(\"2015-01-02T18:21:54.688Z\"),\r\n\t\t\t\"id\" : \"d4e662cd-2f9b-480e-9cef-50dccc32d5f4\",\r\n\t\t\t\"down\" : true,\r\n\t\t\t\"up\" : true,\r\n\t\t\t\"history\" : [ ],\r\n\t\t\t\"type\" : \"habit\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"text\" : \"Text 2\",\r\n\t\t\t\"challenge\" : null,\r\n\t\t\t\"attribute\" : \"str\",\r\n\t\t\t\"priority\" : 1.5,\r\n\t\t\t\"value\" : 0,\r\n\t\t\t\"tags\" : {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\"notes\" : \"Note 2\",\r\n\t\t\t\"dateCreated\" : ISODate(\"2015-01-02T18:20:03.030Z\"),\r\n\t\t\t\"id\" : \"039ef9b3-cbea-4674-9270-f3a773be324d\",\r\n\t\t\t\"down\" : true,\r\n\t\t\t\"up\" : true,\r\n\t\t\t\"history\" : [ ],\r\n\t\t\t\"type\" : \"habit\"\r\n\t\t}\r\n\t]\r\n}\r\n````\r\n\r\nI have since removed the duplicates from the user's account.\r\n\r\nThis might be related to https://github.com/HabitRPG/habitrpg/issues/2456 but that issue is pretty old so it might be a separate problem.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7459532-duplicated-tasks-identical-text-notes-and-id-different-challenge-element-empty-object-versus-null?utm_campaign=plugin&utm_content=tracker%2F68393&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F68393&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/comments/76272479","html_url":"https://github.com/HabitRPG/habitrpg/issues/4470#issuecomment-76272479","issue_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/4470","id":76272479,"user":{"login":"jbbreck","id":11218676,"avatar_url":"https://avatars.githubusercontent.com/u/11218676?v=3","gravatar_id":"","url":"https://api.github.com/users/jbbreck","html_url":"https://github.com/jbbreck","followers_url":"https://api.github.com/users/jbbreck/followers","following_url":"https://api.github.com/users/jbbreck/following{/other_user}","gists_url":"https://api.github.com/users/jbbreck/gists{/gist_id}","starred_url":"https://api.github.com/users/jbbreck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbbreck/subscriptions","organizations_url":"https://api.github.com/users/jbbreck/orgs","repos_url":"https://api.github.com/users/jbbreck/repos","events_url":"https://api.github.com/users/jbbreck/events{/privacy}","received_events_url":"https://api.github.com/users/jbbreck/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T21:01:02Z","updated_at":"2015-02-26T21:01:02Z","body":"This happened to my account too. It repeated a bunch of my habits and checked some dailies without my click. Here's my user ID: ee41f326-c4df-44e4-a966-d1962877f5b3\r\n"}}