[tagging] bug, cloning a dooject, getting a free ID of a deleted dooject

×

狀態訊息

You are not a member of this team. If you want to be part of this team, click on 'Subscribe to this team'.
類型: 
Website bug
狀態: 
Resolved
優先: 
Normal
描述: 

Hi Jordi,

Laptop (5235) was the origin laptop to be cloned. At the moment tagging a new laptop (expected # 5236) someone deleted laptop # 4900. So far everything worked fine, the cloned new laptop got this free ID. I saw in the browser # 4900 and printed the labels for # 4900.

But then I received the notification mail below with the number #5235 (the template being cloned). This is not correct, should be # 4900.

So in this very special situation (cloning a laptop, getting a free Labdoo ID of a deleted laptop) the send-out of the mail seems to have the wrong Labdoo ID. Hope I could explain it so you could understand it :)

Thanks, not urgent, as vvveerryy seldom situation,

Ralf

---------- Weitergeleitete Nachricht ----------

Betreff: [Labdoo] IT-Spende 000005235 wurde registriert ("getagged")
Datum: Mittwoch, 12. August 2015, 11:16:28
Von: Labdoo
An: muelheim-hub@labdoo.org, muelheim-hub@labdoo.org, Michael.Seidel@klausner-group.com, a_uer@yahoo.de, contact@labdoo.org

Liebe Helferin, lieber Helfer,

Du erhältst diese E-Mail, weil eine mit dir verknüpfte IT-Spende
registriert ("getagged") wurde.

Die Labdoo-Nummer (ID) deines Gerätes ist 000005235 und dessen aktueller
Status ist: [S3] Assigned to an edoovillage, waiting to be shipped.

Dies bedeutet, es ist jetzt einen Schritt näher an einem "Edoovillage"
(einer Schule oder einem Jugendprojekt), wo es den Kindern den Zugang zu
Bildung ermöglichen wird. Sollte das Gerät noch in der technischen Prüfung
sein, kann in seltenen Fällen ein Recycling nötig werden, wenn das Gerät
nicht unsere Mindestanforderungen erfüllt oder nicht reparabel ist. Im Fall
einer Reparatur durch einen Labdoo-Helfer bitten wir um etwas Geduld.

Damit wollen wir Elektroschrott vermeiden bzw. sinnvoll recyclen. In jedem
Fall ist deine IT-Spende ein wichtiger Beitrag zur Überwindung des
"digitalen Graben" und zur Vermeidung von Elektroschrott.

Bitte prüfe den Status des Gerätes hier:
https://www.labdoo.org/de/content/000005235 [1]

Wenn die Angaben nicht korrekt sein sollten, hast du die Möglichkeit, dies
zu ändern und zu korrigieren. Oder teile uns dies per E-Mail an
contact@labdoo.org [2] mit. Dies hilft uns, die Datenbasis so aktuell wie
möglich zu halten.

Mit Hilfe der Labdoo-Tools im Dashboard ("Übersicht") kannst du weiter dazu
beitragen z.B. eine IT-Spende zu einem Bildungsprojekt ("Edoovillage") zu
bringen: https://www.labdoo.org/content/dashboard-slider [3]

Vielen Dank, dass du mit deiner Mini-Mission dazu beiträgst, Kindern mit
einer IT-Spende voller Lernsoftware und Lerninhalte Bildungschancen in einem
Edoovillage zu eröffnen. Gemeinsam können wir helfen, den "digitalen
Graben" zu überwinden.

Das Labdoo-Team
www.labdoo.de [4]

# Solltest du diese E-Mail versehentlich erhalten haben schicke bitte eine
Mail an contact@labdoo.org [5]

[1] https://www.labdoo.org/de/content/000005235
[2] mailto:contact@labdoo.org
[3] https://www.labdoo.org/content/dashboard-slider
[4] http://www.labdoo.de
[5] mailto:contact@labdoo.org
-------------------------------------------------------------

回應

Rhein-Ruhr-Hub's 的頭像
Rhein-Ruhr-Hub 在 三, 08/12/2015 - 13:03 發表

Having cloned # 4900 and tagged # 5236 everything worked well (including correct notification mail). So the above probem seems only to show up when a cloned laptop gets an ID of a former deleted laptops.

Gregg Marshall's 的頭像
Gregg Marshall 在 三, 08/12/2015 - 13:12 發表

Is there a reason to recycle tag numbers?

It would seem that even if a laptop gets recycled there could be some value much later to have the data about that laptop while it was inside the Labdoo system still available. Then it would be possible to go back and do analysis, like "what is the average life in the field of a Labdoo laptop?"

Not recycling the tag numbers would resolve the cause of this issue.

Rhein-Ruhr-Hub's 的頭像
Rhein-Ruhr-Hub 在 三, 08/12/2015 - 14:16 發表

Hi Gregg,

please read me message - even I agree my English is bad ;)

A Labdoo ID of a recycled laptop is never re-used (as you asked). The ID still exists, even the laptop doesn't as recycled.

But: an ID of a DELETED laptop will be re-used. The reason is that there should never be an unused Labdoo ID (I remember Jordi added some code some months ago to make sure all IDs are used).

That is why I explained for Jordi that the bug above only shows up with a re-used ID of a deleted laptop and cloning. Only this coincidence causes the wrong notification mail.

jordi's 的頭像
jordi 在 三, 08/12/2015 - 19:24 發表

Gregg one important comment (as Ralf says) is that Labdoo does not delete laptops that are recycled. Like you say, that's important information. Laptops are in fact never deleted from the system, unless someone tags a laptop by mistake. This is a very rare event, 4900 is one of the few.

In the very rare event that there is a deleted laptop, we prefer to use the ID because this way we ensure that all laptop IDs in the system are real IDs. It is cleaner to have zero gaps in the sequence space. Also, it's nice to know that that when you tag a laptop and you get the ID 1234, that you are really the laptop number 1234 in the system.

Ralf, the original issue is now resolved. The issue was the order in which the hook_node_presave() was executed. I changed the weight to ensure that the hook under labdoo_lib module is invoked before the hook under lbd_communicate module.

https://github.com/Labdoo/Labdoo/commit/bae8364dc4908790f814a1517bf752d6...