Add tracking support to FormEngine

RESOLVED FIXED in 0.2

Status

Cloud Services
General
RESOLVED FIXED
10 years ago
8 years ago

People

(Reporter: anant, Assigned: anant)

Tracking

unspecified
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

10 years ago
FormEngine needs tracking support.
(Assignee)

Updated

10 years ago
Blocks: 434816
(Assignee)

Comment 1

10 years ago
Created attachment 322194 [details] [diff] [review]
Adds tracking support for FormsEngine

Comments on the chosen strategy are inline with the code.
Attachment #322194 - Flags: review?(thunder)

Comment 2

10 years ago
Comment on attachment 322194 [details] [diff] [review]
Adds tracking support for FormsEngine

Why not keep track of the number of rows on init/reset, and then the score becomes (cur_rows - saved_rows) * some_multiplier ?
(Assignee)

Comment 3

10 years ago
That's what we're doing now, aren't we?

_init: ... {
   ...
   this._rowCount = stmnt.getInt32(0);
   ...
}

get score() {
  ...
  var count = stmnt.getInt32(0);
  ...
  this._score = abs(this._rowCount - count) * 2;
  this._rowCount = count;
  ...
}

Comment 4

10 years ago
Ah, but you reset the row count inside get score().  Instead, only set it in _init() and reset().  That way it'll keep growing on each call.
(Assignee)

Comment 5

10 years ago
Created attachment 322212 [details] [diff] [review]
Add tracking support to FormsEngine v2

Indeed. Updated patch attached.
Attachment #322194 - Attachment is obsolete: true
Attachment #322212 - Flags: review?(thunder)
Attachment #322194 - Flags: review?(thunder)

Comment 6

10 years ago
Comment on attachment 322212 [details] [diff] [review]
Add tracking support to FormsEngine v2

Nice, looks good!
Attachment #322212 - Flags: review?(thunder) → review+
(Assignee)

Comment 7

10 years ago
Checked-in revision 367
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Updated

9 years ago
Component: Weave → General
Product: Mozilla Labs → Weave
QA Contact: weave → general
(Assignee)

Updated

8 years ago
Severity: blocker → normal
You need to log in before you can comment on or make changes to this bug.