MediaWiki talk:Gadget-BugStatusUpdate.js

Bugs
See mw:User talk:Robmoen/bugStatusUpdate.js. Helder 09:51, 4 May 2012 (UTC)
Inform resolution in case the bug is "RESOLVED"
When a bug is marked as "RESOLVED", it would be useful to have the resolution available to know if it is a FIXED, INVALID, WONTFIX, DUPLICATED or a WORKSFORME. Helder 11:25, 25 January 2013 (UTC)
Stepping up to the plate...
Helder, I see you have made many scattered requests for enhancements/fixes to this template/gadget. I'm going to be working through trying to accomodate as many of them as I can, and would appreciate if you could go through the bulleted list here and make sure I don't miss any. Thanks Technical 13 (talk) 18:32, 18 June 2013 (UTC)
- You can track the progress by adding User:Technical 13/SandBox/Gadget-BugStatusUpdate.js and User:Technical 13/Templates/Bugzilla to your watchlist and you can track the results of my changes on User:Technical 13/Bugzilla#TEST SECTION for template & gadget revamp (you will have to add the following line of code to your custom js page to see the changes) Technical 13 (talk) 19:33, 18 June 2013 (UTC)
importScript('User:Technical 13/SandBox/Gadget-BugStatusUpdate.js'); // [[User:Technical 13/SandBox/Gadget-BugStatusUpdate.js]] testing
- Technical 13, sorry for taking so long to reply.
- What is the current status of the changes you did?
- BTW: our bugmaster (AKlapper (WMF)) might have suggestions about this gadget, since he seems to be very familiar with Bugzilla? Helder 17:22, 11 September 2013 (UTC)
- I've actually asked AKlapper (WMF) for some input, and he said he knows little about the actual api. I actually got distracted from this project, and you can see what I did manage to get done in my version in the list below. I've also made some adjustments to the template and started working on "resolutions" but have had the time to write the code to scrape the html of the bugs to get it (since it isn't returned by the api). I also looked at and thought about ways to indicate "security" bugs based on the error message returned by the api, but haven't gotten around to implementing it just yet. Technical 13 (talk) 17:47, 11 September 2013 (UTC)
- Yeah, sorry, knowledge of Bugzilla's API is definitely one of my weak points. I've played with it (and JIRA's API) a little bit around the beginning of this year for a technical paper but I only touched the surface (plus it was slightly frustrating, but upstream developers are now finally working on a REST API). If you have some specific questions, Arthur Richards might be able to help as he maintains a script to sync Bugzilla with Wikimedia's Mingle instance. --AKlapper (WMF) (talk) 17:02, 16 September 2013 (UTC)
- I've actually asked AKlapper (WMF) for some input, and he said he knows little about the actual api. I actually got distracted from this project, and you can see what I did manage to get done in my version in the list below. I've also made some adjustments to the template and started working on "resolutions" but have had the time to write the code to scrape the html of the bugs to get it (since it isn't returned by the api). I also looked at and thought about ways to indicate "security" bugs based on the error message returned by the api, but haven't gotten around to implementing it just yet. Technical 13 (talk) 17:47, 11 September 2013 (UTC)
List of things to fix or improve
Fix only the first instance of the template working per bug numberThis should be easily fixed by changing the system to use class= as opposed to the id= that it currently uses.Done by Technical 13 (talk) @ 19:33, 18 June 2013 (UTC)
- Add more details as to the status of "resolved" bugs as to whether it was resolved as:
- DUPLICATED, FIXED, INVALID, LATER, WONTFIX, WORKSFORME
- Not returned by API directly.
- DUPLICATED, FIXED, INVALID, LATER, WONTFIX, WORKSFORME
- Offer some kind of information for security-restricted bug reports such as Template:Bug
Failure in Chrome/Firefox
A short time ago, this gadget is failing in chrome with the following error: Uncaught TypeError: Cannot read property 'bugs' of null
on the line if(data.result.bugs)...
. Firefox has the same problem. I can find no recent edits that would cause this, but I can see no definition for 'result'. Anyone knows whats going on? — Edokter (talk) — 10:39, 22 June 2013 (UTC)
- It only seems to be broken at the Village Pump when viewed as a whole, so it must be something on the page itself. — Edokter (talk) — 13:12, 23 June 2013 (UTC)
- Edokter, are you still getting the error? I'm not seeing it on FF21. Technical 13 (talk) 16:49, 23 June 2013 (UTC)
- Still getting the error (but only on Wikipedia:Village pump (technical)). Chrome 28 reports
Uncaught TypeError: Cannot read property 'bugs' of null
, Firefox 21 reportsTypeError: data.result is null
. — Edokter (talk) — 17:19, 23 June 2013 (UTC)
- Okay, I am using a test script I've been working on (see above section) and didn't see the error on other pages... I flipped my script off and tried again with the live script on VPT. I went through one section at a time until I came across Template:Bugzilla which wouldn't load up with just that section. I've deactivated the {{Tracked}} for that bug and think I know what is going on. I think that is a "security" related bug which you can't see the details of (neither can I for that matter), and it is bugging the whole thing out. I'm already working on a patch/fix for that above, but the api returns a completely different result for those, so it may be a bit for my to formulate it. Let me know if commenting it out fixed VPT for you. Technical 13 (talk) 00:11, 24 June 2013 (UTC)
- Seems to be fixed. A simple check (if data.result) should remedy these faults. — Edokter (talk) — 18:07, 24 June 2013 (UTC)
- Still getting the error (but only on Wikipedia:Village pump (technical)). Chrome 28 reports
Adapting this gadget to Phabricator
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Hi, we are planning to deprecate Bugzilla (and a bunch of other tools) in favor of mw:Phabricator. We are looking for volunteers to adapt this gadget at Port {{tracked}} gadget to query Phabricator API. Any takers?--Qgil (talk) 19:31, 13 May 2014 (UTC)
- Qgil: it is probably better to ask on Wikipedia:Village pump (technical). I'm not familiar with Phabricator yet, much less its API (maybe Technical 13 is?). Helder 15:59, 8 September 2014 (UTC)
- I hadn't even created a user account on Phabricator until just now. I'm very interested in this however, but I may have a slow learning curve as I don't have a lot of free time at the moment with all my 300 level classes at school weighing me down in homework. If others are interested, I'd happily defer it to them, otherwise, there's no real deadline I suppose... — {{U|Technical 13}} (e • t • c) 17:22, 8 September 2014 (UTC)
- We have a new version of the Template:Tracked on its sandbox (see the diff). Helder 13:40, 9 September 2014 (UTC)
- That is just the template which auto-links to either Bugzilla od Phabricator (which does not work at the moment as it is in the process of moving). The Gadget queries the status of the bug/ticket and needs an API to communicate with.
-- [[User:Edokter]] {{talk}}
19:37, 9 September 2014 (UTC)
- That is just the template which auto-links to either Bugzilla od Phabricator (which does not work at the moment as it is in the process of moving). The Gadget queries the status of the bug/ticket and needs an API to communicate with.
- I've cast a glance at how to do the same thing with phabricator as with bugzilla. First, the API (conduit) “auto”-documentation is very light; second, we'll need an additional step to get a CSRF token, even for read-only requests (I still wonder why); third, I haven't found yet how to query information for several tasks at the same time (I certainly wouldn't use the gadget if it was doing one request per task) — but again, the documentation is subpar.
- Example, request for bugzilla was this one, now it'll be like this one (except that it only gets information for one task and that some other query — which one and why, I've no idea — is required first to get the CSRF token).
- I dunno if we had to patch bugzilla in the past, but I've the feeling that we'll have to contribute to phabricator in the future…
- Best regards — Arkanosis ✉ 01:50, 3 October 2014 (UTC)
- Thanks Arkanosis, I'm no Conduit expert, but you can surely find good advice in our Phabricator instance. I have created a task for this: phab:T539.--5.147.248.10 (talk) 11:53, 3 October 2014 (UTC)
- This is done. I've ported it over; the new version is it at User:Mattflaschen (WMF)/Gadget-BugStatusUpdate.js. It uses a simple JSONP service I implemented on Tool Labs. The new gadget does not support Bugzilla at all (the template still does); all Bugzilla bugs have been migrated to the Phabricator site, and any Bugzilla statuses are potentially out of date, so I don't think it's necessary.
- You can try it out if you'd like (see https://en.wikipedia.org/w/index.php?title=User:Mattflaschen_%28WMF%29/common.js&oldid=646451192 for import line). If it looks good, I'd like to have the gadget updated. Mattflaschen (WMF) (talk) 05:52, 10 February 2015 (UTC)
Done. I'll clean up the template later.
-- [[User:Edokter]] {{talk}}
10:07, 10 February 2015 (UTC)
- Thanks Arkanosis, I'm no Conduit expert, but you can surely find good advice in our Phabricator instance. I have created a task for this: phab:T539.--5.147.248.10 (talk) 11:53, 3 October 2014 (UTC)
Not working
I'm not getting any status; I keep getting a 500 error from tools.wmflabs.org in my console. -- [[User:Edokter]] {{talk}}
14:51, 8 March 2015 (UTC)
- @Mattflaschen (WMF): ^ Quiddity (talk) 17:28, 8 March 2015 (UTC)
- @Quiddity and Edokter: I'm not sure why it stopped working (I didn't make any recent code change), but I can't restart it due to phab:T92039. Mattflaschen (WMF) (talk) 22:56, 9 March 2015 (UTC)
- @Quiddity and Edokter: Tim.landscheidt quickly fixed webservice2, and the gadget is working again. Mattflaschen (WMF) (talk) 21:58, 10 March 2015 (UTC)
- @Mattflaschen (WMF): This gadget seems to be non-functional again, but there are no errors in console this time. Something something error at https://tools.wmflabs.org/phabricator-bug-status/queryTasks though. Quiddity (WMF) (talk) 01:52, 16 April 2015 (UTC)
- I do get a 500 error in my console.
-- [[User:Edokter]] {{talk}}
07:52, 16 April 2015 (UTC)- Restarted it, and it works again. Mattflaschen (WMF) (talk) 00:06, 22 April 2015 (UTC)
- I do get a 500 error in my console.
- @Mattflaschen (WMF): This gadget seems to be non-functional again, but there are no errors in console this time. Something something error at https://tools.wmflabs.org/phabricator-bug-status/queryTasks though. Quiddity (WMF) (talk) 01:52, 16 April 2015 (UTC)
- @Quiddity and Edokter: Tim.landscheidt quickly fixed webservice2, and the gadget is working again. Mattflaschen (WMF) (talk) 21:58, 10 March 2015 (UTC)
- @Quiddity and Edokter: I'm not sure why it stopped working (I didn't make any recent code change), but I can't restart it due to phab:T92039. Mattflaschen (WMF) (talk) 22:56, 9 March 2015 (UTC)