Merge lp://staging/~bryce/launchpad-gm-scripts/stockreplies-revamp into lp://staging/launchpad-gm-scripts
Status: | Merged |
---|---|
Merged at revision: | 188 |
Proposed branch: | lp://staging/~bryce/launchpad-gm-scripts/stockreplies-revamp |
Merge into: | lp://staging/launchpad-gm-scripts |
Diff against target: |
930 lines (+268/-626) 2 files modified
README (+3/-4) lp_stockreplies.user.js (+265/-622) |
To merge this branch: | bzr merge lp://staging/~bryce/launchpad-gm-scripts/stockreplies-revamp |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Murray (community) | Approve | ||
Review via email: mp+377470@code.staging.launchpad.net |
Description of the change
This is a rewrite of the stockreplies script.
* The core functionality all works - stock reply data is loaded from external files, and presented to the user as clickable links. On activation, the links fill in the bug report text area, and sets other form widgets like assignee, importance, package, etc.
* Modern Greasemonky drops support for dynamically loading external XML files, but has a reliable mechanism for loading JSON files. So, with this change, stockreply data is stored as JSON rather than XML.
* The previous script implementation had a live-edit functionality. In addition to no longer functioning, this involved a large amount of UI code making it difficult to debug. To simplify script maintenance, this feature has been dropped.
* Due to the above two changes there is no longer a 'reload' functionality. I'd like to have this, but haven't figured out a way to implement it.
I've taken the opportunity to cleanup and restructure the code for the script, which I hope makes it a bit easier to maintain going forward.
Thanks for working on this, I'm excited to have it functioning again. One thing I seem to recall (but I could be wrong) about the previous one was that you could have different sets of replies for different packages. This ended up reducing the number of replies you had to browse through when trying to find the right one. Does that sound familiar to you and if so does your script do that?
When testing this with a bug report without a package the description ended up containing the following oddity:
"report this bug, LP #1857789 against 1857789"
It looks like PKGNAME had the same value as BUGNUMBER.
I also noticed that importance was not being unset if there was no importance defined in the json file e.g. clicking "good" then "missing". Rather than setting it to "Undecided" if importance is null it should probably set it to whatever the importance originally was to prevent mistakenly overwriting data. That same thing also appears to be true when the package is not defined in the json file.
Otherwise this look great thanks again for working on it.