Closed Bug 731456 Opened 10 years ago Closed 10 years ago

<bugzilla> extension doesn't interpret templates in the query string values

Categories

(Websites :: wiki.mozilla.org, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: lsblakk, Assigned: lmandel)

References

Details

(Whiteboard: [mediawiki-bugzilla])

I've set up a template for {{AURORA_VERSION}} where the value is here https://wiki.mozilla.org/Template:AURORA_VERSION (and same for BETA) but when using it in the query like so:

<bugzilla>
{
"field0-0-0":"cf_tracking_firefox{{AURORA_VERSION}}",
"type0-0-0":"equals",

...
</bugzilla>

it's not getting replaced properly and no results are returned. So I tried using just a template for the whole string value, creating an {{AURORA_STATUS}} template, value: "cf_tracking_firefox{{AURORA_VERSION}}" and still no dice.

Looks like maybe this extension needs to check for templates before sending the query?
Whiteboard: [mediawiki-bugzilla]
I found a solution that is working locally. As described in https://bugzilla.wikimedia.org/show_bug.cgi?id=2257#c80 the extension needs to call the $parser with the $frame object in order to apply the template to the wiki text before it is passed to the Bugzilla API. 

I'm off on Wed but will look at this more on Thursday.
Assignee: nobody → lmandel
Further testing shows that with the fix I am now able to use templates in queries. I have initiated a pull request for this fix to the mozilla repo.

Note that mediawiki-bugzilla is currently disabled on wikimo as per bug 731672.
The version with this fix is deployed... this bug should be resolved now. Please re-open if it's not. :)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Thanks all, this works great now.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.