is there any way to use SQL-Statemants in the templates?
Background: I will show the last Bug_ID in the Bug - Creation Process.
So i think a good way is to use the sql-statemant
SELECT MAX(bug_id) FROM `bugs`
in the template file create.html.tmpl
support-bugzilla mailing list
[hidden email] https://lists.mozilla.org/listinfo/support-bugzilla PLEASE put [hidden email] in the To: field when you reply.
Am Donnerstag, 9. November 2017 10:41:11 UTC+1 schrieb Thorsten Schöning:
> That sounds like a very error prone approach and you should consider
> implementing an extension that does all that for you. There are hooks
> available so you can run arbitrary code before/after the bug has been
> created, maybe create the directory in that code, but at least set the
> URL to the directory you need.
Hello Mr. Schöning,
thank you for this detailed explanation!
Now i have created an extension named ShowBugID (with the create.pl).
I found the following in the documentation:
"If your extension wants to implement a hook, all you have to do is write a subroutine in your hook package that has the same name as the hook."
On 09/11/17 09:48, [hidden email] wrote:
> We need the bug id, because at the same time we create a directory
> containing the bug-id. Then we copy this directory path into the url
Why not instead have Bugzilla automatically generate the contents of the
URL field when the bug is filed, based on the actual bug number. And
then, once the bug is filed and shown to the user and they know the bug
number, they can go and create the directory.