jdm / bugsahoy

A landing page to make finding relevant bugs easier for new Mozilla contributors.
http://www.joshmatthews.net/bugsahoy/
69 stars 95 forks source link

Move product:component mapping into external config files #11

Open jdm opened 12 years ago

jdm commented 12 years ago

The goal is to keep bugsahoy as customizable as possible for other groups using Bugzilla to track work items. It would be ideal to move all definition of mappings into an external config file that could be processed at deployment time, creating the static index.html that would be served to visitors. This mapping would include:

In other words, everything that defines the non-universal aspects of the current UI. JSON would be a reasonable choice for the config file format, with a python script to perform the translation.

jdm commented 12 years ago

Sample JSON spec:

{
"groups": [{
  "text": "Are you interested in:",
  "operation": "union",
  "choices": [{
    "text": "Choice A",
    "search_data": [
      {"type": "simple", "product": "Core", "component": "General"}, {"type": "simple", "product": "Firefox", "component": "General"}
    ],
    "extra": [{
      "title": "Extra information!", "text": "Stuff about information! <a href='http://example.com'>Link!</a>"
    }]
  }]
}. {
  "text": "Do you know:",
  "operation": "intersection",
  "choices": [{
    "text": "Choice 1",
    "search_data": [
      {"type": "language", "lang"="c++"}
    ],
    "extra": []
  }]
}],
"base_search_parameters": {
  "status_whiteboard": "mentor=",
  "whiteboard_type": "contains_all",
  "bug_status": ["NEW", "ASSIGNED", "REOPENED"]
},
"search_types": [{
  "name": "simple",
  "parameters": ["product", "component"]
}, {
  "name": "language",
  "parameters": [{"lang": "status_whiteboard"}]
}]
}

I'm pretty sure this covers all the existing UI options.