Closed Bug 965791 Opened 10 years ago Closed 10 years ago

[tracker] implement product table

Categories

(Input :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2014Q1

People

(Reporter: willkg, Unassigned)

References

Details

Input supports getting feedback for a number of products now. Currently we have various data about these products hard-coded. This means we have to make code changes and push them out whenever we want to do the following:

* add valid products for product urls
* add valid products for the input api


Further, there are things we want to be able to turn on and off on a product-by-product basis:

1. whether the product shows up in the front page dashboard
2. whether the feedback for that product is machine translated (machine translation is being implemented in bug #927888)


Also, at some point p, we want to make leaving feedback easier probably by changing /feedback/ to show a list of products a user can leave feedback for. This list would be generated automatically.

All these things require a product table.

Further, we want to make it possible for some group of people to add new products, deactivate old products and change product settings. This will require a group (we can re-use analyzers for now) and templates.

This tracker covers the bugs for that work.
Making this a P1 for Q1 and adding whiteboard data.
Priority: -- → P1
Whiteboard: u=analyzer c=product p= s=input.2014q1
Target Milestone: --- → 2014Q1
Depends on: 965794
Depends on: 965796
Depends on: 965798
I think we need the following fields:

Product table:
1. display name -- not translated, used across site for display

2. db name -- not translated, used in the "product" column in the db

3. slug -- slug used in feedback product urls and the Input API product field

4. aliases -- other strings used in feedback product urls and other places for future backwards compatability

5. on_dashboard -- whether or not the product shows up in the dashboard (this needs some thinking because if it doesn't show up in the dashboard, it's not viewable on the site at all right now--do we really want that?
I think that's it for now.


There are some other things we can toss in there, but we don't need them now and we can add them later when we need them.

Will ping Matt for other things we need now.
Implemented this:

class Product(ModelBase):
    """Represents a product we capture feedback for"""
    # Whether or not this product is enabled
    enabled = models.BooleanField(default=True)

    # Used internally for notes to make it easier to manage products
    notes = models.CharField(max_length=255)

    # This is the name we display everywhere
    display_name = models.CharField(max_length=20)

    # We're not using foreign keys, so when we save something to the
    # database, we use this name
    db_name = models.CharField(max_length=20)

    # This is the slug used in the feedback product urls; we don't use
    # the SlugField because we don't require slugs be unique
    slug = models.CharField(max_length=20)

    # Whether or not this product shows up on the dashboard
    on_dashboard = models.BooleanField(default=True)


That covers my immediate needs plus gives us some minor future proofing. We can add other things later in different bugs.
This is a tracker, so I'm nixing the whiteboard data.
Whiteboard: u=analyzer c=product p= s=input.2014q1
Undepending on the outstanding bug and marking this as FIXED.
Status: NEW → RESOLVED
Closed: 10 years ago
No longer depends on: 965796
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.