Bugzilla – Attachment 67952 Details for
Bug 55442
BUGZILLAASSISTANT: Impossible to submit a Bug - Bugzilla 4.2.3 incompatible?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fixes the bug
0001-new-bugzilla-demands-a-token.-That-works-now.patch (text/plain), 3.66 KB, created by
Rob Snelders
on 2012-10-01 21:04:49 UTC
(
hide
)
Description:
fixes the bug
Filename:
MIME Type:
Creator:
Rob Snelders
Created:
2012-10-01 21:04:49 UTC
Size:
3.66 KB
patch
obsolete
>From abaa1d52d080490ec04e881c1d3636ac2fa440f8 Mon Sep 17 00:00:00 2001 >From: Rob Snelders <programming@ertai.nl> >Date: Mon, 1 Oct 2012 23:02:08 +0200 >Subject: [PATCH] new bugzilla demands a token. That works now. > >--- > bug/bug.xhtml | 1 + > bug/bug/bug.js | 17 +++++++++++++++++ > bug/bug/test.js | 7 +++++++ > 3 files changed, 25 insertions(+) > >diff --git a/bug/bug.xhtml b/bug/bug.xhtml >index f4c4e05..fe365be 100644 >--- a/bug/bug.xhtml >+++ b/bug/bug.xhtml >@@ -181,6 +181,7 @@ Platform (if different from the browser): > <input type="hidden" name="rep_platform" value="Other"></input> > <input type="hidden" name="status_whiteboard" value="BSA"></input> > <input type="hidden" name="assigned_to" value="libreoffice-bugs@lists.freedesktop.org"></input> >+ <input type="hidden" name="token" value=""></input> > <input type="hidden" name="component" value=""></input> > <input type="hidden" name="version" value=""></input> > <input type="hidden" name="short_desc" value=""></input> >diff --git a/bug/bug/bug.js b/bug/bug/bug.js >index a0be19d..9a1ab1e 100644 >--- a/bug/bug/bug.js >+++ b/bug/bug/bug.js >@@ -94,6 +94,7 @@ > }, > > url: '', >+ token: '', > > state_signin_error_regexps: [/CLASS="THROW_ERROR">([^<]*)/i], > state_signin_success_regexp: /LOG&NBSP;OUT<\/A>([^<]*)/i, >@@ -232,8 +233,23 @@ > state_submit_element: 'html', > > state_submit: function() { >+ $.bug.logged_in().done(function(status) { >+ if(status) { >+ $.bug.submit_bug(); >+ } else { >+ $.bug.error_set("You're not logged in. Please login first"); >+ $.bug.state_signin(); >+ } >+ }); >+ }, >+ >+ submit_bug: function() { > var element = $('.state_submit'); > if(!element.hasClass('initialized')) { >+ $.bug.ajax('GET', $.bug.url + '/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED').pipe(function(data){ >+ $.bug.token = data.match(/<input type="hidden" name="token" value="([A-Za-z0-9]{10})">/)[1]; >+ }); >+ > var form = $('.submission_form form'); > $.bug.error_clear(); > form.attr('action', $.bug.url + '/post_bug.cgi'); >@@ -248,6 +264,7 @@ > var short_desc = $('.state_subcomponent .active_subcomponent .chosen').attr('data') + ': ' + $('.state_description .short').val(); > var comment = $('.state_description .long').val(); > $("body").css("cursor", "progress"); >+ $('input[name="token"]', form).val($.bug.token); > $('input[name="component"]', form).val(component); > $('input[name="version"]', form).val(version); > $('input[name="short_desc"]', form).val(short_desc); >diff --git a/bug/bug/test.js b/bug/bug/test.js >index defb842..1a36df2 100644 >--- a/bug/bug/test.js >+++ b/bug/bug/test.js >@@ -241,6 +241,12 @@ test("state_submit", function() { > equal(element.css('display'), 'none'); > ok(!element.hasClass('initialized'), 'is not initialized'); > $.bug.state_submit(); >+ >+ /*$.bug.ajax = function(type, url) { >+ return $.Deferred().resolve('logged in ok'); >+ }; >+ >+ $.bug.state_submit(); > equal(element.css('display'), 'block'); > ok(element.hasClass('initialized'), 'is initialized'); > $.bug.state_component(); >@@ -302,6 +308,7 @@ test("state_submit", function() { > equal($('.error').text(), error, 'error is set'); > > $.bug.state_success = state_success; >+ $.bug.ajax = $.ajax;*/ > }); > > test("state_success", function() { >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 55442
:
67842
|
67876
| 67952