Skip Menu |

This queue is for tickets about the WebService-FogBugz CPAN distribution.

Report information
The Basics
Id: 91997
Status: resolved
Priority: 0/
Queue: WebService-FogBugz

People
Owner: Nobody in particular
Requestors: jeff.holt [...] method-r.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Logon doesn't work with Fogbugz version 8
Date: Thu, 9 Jan 2014 16:29:26 -0600
To: bug-WebService-FogBugz [...] rt.cpan.org
From: "jeff6times7 ." <jeff.holt [...] method-r.com>
Do you have any updates for this module that support version 8 of Fogbugz?
Thank you for your report. I can logon FogBugz 8 successfully. The version of FogBugz was below. FogBugz Version 8.9.93.0H (DB 822, Build 0) Could you try to run following script? Please edit email, password and endpoint in the script before running. http://cpansearch.perl.org/src/SHIGETA/WebService-FogBugz-0.0.4/example/requests.pl If you get any errors in stdout, would you paste it? Show quoted text
> Do you have any updates for this module that support version 8 of Fogbugz?
I don't think any updates so far. If you have any suggestions, please let me know. Regards,
Subject: Re: [rt.cpan.org #91997] Logon doesn't work with Fogbugz version 8
Date: Fri, 17 Jan 2014 12:43:33 -0600
To: bug-WebService-FogBugz [...] rt.cpan.org
From: "jeff6times7 ." <jeff.holt [...] method-r.com>
I modified the constructor as follows: 9 my $fogbugz = WebService::FogBugz->new({ 10 email => 'myemailaddress', 11 password => 'mypassword', 12 base_url => 'https://method-r.fogbugz.com/default.asp' 13 }); Please note, from the base url, that I am using fogcreek's online fogbugz service. I can imagine that their version is different than the one that you might install locally behind your firewall. But my hope is that they use the same version that you do. If that's not true, then you might want to either publish a caveat or work with fogcreek to make your code work with cookies, which is how they're doing authentication with their online service. It takes quite a while for your code to return the html file that I've attached. All it does it return the login html page code. Below is the shell script that I've been able to make work consistently. email='myemailaddress' password='mypassword' data="pre=preLogon&dest=&sPerson=$email&sPassword=$password&fRememberPassword=1" curl --cookie-jar kook.notjar --data "$data" " https://method-r.fogbugz.com/default.asp" > login.html curl --cookie kook.notjar "https://method-r.fogbugz.com/default.asp?89" > 89.html fogcreek published a web page that describes how to use their api.asp but it returns only xml structures. I didn't even try it to see if their instructions worked because I wanted a 'pretty' html report. On Fri, Jan 17, 2014 at 8:46 AM, Takatsugu Shigeta via RT < bug-WebService-FogBugz@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=91997 > > > Thank you for your report. > > I can logon FogBugz 8 successfully. > The version of FogBugz was below. > FogBugz Version 8.9.93.0H (DB 822, Build 0) > > Could you try to run following script? > Please edit email, password and endpoint in the script before running. > > http://cpansearch.perl.org/src/SHIGETA/WebService-FogBugz-0.0.4/example/requests.pl > > If you get any errors in stdout, would you paste it? > >
> > Do you have any updates for this module that support version 8 of
> Fogbugz? > I don't think any updates so far. If you have any suggestions, please let > me know. > > Regards, >

Message body is not shown because sender requested not to inline it.

Also I am using Fog Creek's online FogBugz. My code of creating the object is below. my $fogbugz = WebService::FogBugz->new({ email => 'myemailaddress', password => 'mypassword', base_url => 'http://movabletype.fogbugz.com/api.asp' }); I think that you use 'api.asp' instead 'default.asp' like below. my $fogbugz = WebService::FogBugz->new({ email => 'myemailaddress', password => 'mypassword', base_url => 'https://method-r.fogbugz.com/api.asp' }); $fogbugz->logon; my $res = $fogbugz->request_method('search', { q => 'FooBar', }); print $res . "\n"; Basically WebService::FogBugz returns XML from 'request_method 'method. If you want to get title of a case, following code will work fine. #!/usr/bin/perl use strict; use warnings; use WebService::FogBugz; my $fogbugz = WebService::FogBugz->new({ email => 'myemailaddress', password => 'mypassword', base_url => 'http://movabletype.fogbugz.com/api.asp' }); $fogbugz->logon; # retrieve title of the case from https://movabletype.fogbugz.com/default.asp?111350 my $res = $fogbugz->request_method('search', { q => '111350', cols => 'sTitle', }); print $res . "\n"; # show plain XML # get the title use XML::LibXML; my $parser = XML::LibXML->new; my $dom = $parser->load_xml(string => $res); my $doc = $dom->documentElement(); print Dumper($doc->findvalue('*[local-name()="cases"]')) . "\n"; You can see like following result in STDOUT. <?xml version="1.0" encoding="UTF-8"?><response><cases count="1"><case ixBug="111350" operations="edit,assign,resolve,remind"><sTitle><![CDATA[FB: Tooltip can be garbage with static publishing]]></sTitle></case></cases></response> $VAR1 = 'FB: Tooltip can be garbage with static publishing'; I hope this can help you. Regards, -- shigeta On Fri Jan 17 13:43:46 2014, jeff.holt@method-r.com wrote: Show quoted text
> I modified the constructor as follows: > > 9 my $fogbugz = WebService::FogBugz->new({ > 10 email => 'myemailaddress', > 11 password => 'mypassword', > 12 base_url => 'https://method-r.fogbugz.com/default.asp' > 13 }); > > Please note, from the base url, that I am using fogcreek's online > fogbugz > service. I can imagine that their version is different than the one > that > you might install locally behind your firewall. But my hope is that > they > use the same version that you do. If that's not true, then you might > want > to either publish a caveat or work with fogcreek to make your code > work > with cookies, which is how they're doing authentication with their > online > service. > > It takes quite a while for your code to return the html file that I've > attached. All it does it return the login html page code. > > Below is the shell script that I've been able to make work > consistently. > > email='myemailaddress' > password='mypassword' > data="pre=preLogon&dest=&sPerson=$email&sPassword=$password&fRememberPassword=1" > curl --cookie-jar kook.notjar --data "$data" " > https://method-r.fogbugz.com/default.asp" > login.html > curl --cookie kook.notjar "https://method- > r.fogbugz.com/default.asp?89" > > 89.html > > fogcreek published a web page that describes how to use their api.asp > but > it returns only xml structures. I didn't even try it to see if their > instructions worked because I wanted a 'pretty' html report. > > > On Fri, Jan 17, 2014 at 8:46 AM, Takatsugu Shigeta via RT < > bug-WebService-FogBugz@rt.cpan.org> wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=91997 > > > > > Thank you for your report. > > > > I can logon FogBugz 8 successfully. > > The version of FogBugz was below. > > FogBugz Version 8.9.93.0H (DB 822, Build 0) > > > > Could you try to run following script? > > Please edit email, password and endpoint in the script before > > running. > > > > http://cpansearch.perl.org/src/SHIGETA/WebService-FogBugz- > > 0.0.4/example/requests.pl > > > > If you get any errors in stdout, would you paste it? > > > >
> > > Do you have any updates for this module that support version 8 of
> > Fogbugz? > > I don't think any updates so far. If you have any suggestions, please > > let > > me know. > > > > Regards, > >
Subject: Re: [rt.cpan.org #91997] Logon doesn't work with Fogbugz version 8
Date: Fri, 17 Jan 2014 23:08:23 -0600
To: bug-WebService-FogBugz [...] rt.cpan.org
From: "jeff6times7 ." <jeff.holt [...] method-r.com>
Thanks for the feedback but I needed to get the fancy styling without having to write code to format their XML output. I'll stick with the curl'y code. Therefore, please close this case. Regards. Jeff On Fri, Jan 17, 2014 at 10:50 PM, Takatsugu Shigeta via RT < bug-WebService-FogBugz@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=91997 > > > Also I am using Fog Creek's online FogBugz. > > My code of creating the object is below. > my $fogbugz = WebService::FogBugz->new({ > email => 'myemailaddress', > password => 'mypassword', > base_url => 'http://movabletype.fogbugz.com/api.asp' > }); > > I think that you use 'api.asp' instead 'default.asp' like below. > > my $fogbugz = WebService::FogBugz->new({ > email => 'myemailaddress', > password => 'mypassword', > base_url => 'https://method-r.fogbugz.com/api.asp' > }); > $fogbugz->logon; > my $res = $fogbugz->request_method('search', { > q => 'FooBar', > }); > print $res . "\n"; > > Basically WebService::FogBugz returns XML from 'request_method 'method. > If you want to get title of a case, following code will work fine. > > #!/usr/bin/perl > > use strict; > use warnings; > > use WebService::FogBugz; > > my $fogbugz = WebService::FogBugz->new({ > email => 'myemailaddress', > password => 'mypassword', > base_url => 'http://movabletype.fogbugz.com/api.asp' > }); > > $fogbugz->logon; > > # retrieve title of the case from > https://movabletype.fogbugz.com/default.asp?111350 > my $res = $fogbugz->request_method('search', { > q => '111350', > cols => 'sTitle', > }); > print $res . "\n"; # show plain XML > # get the title > use XML::LibXML; > my $parser = XML::LibXML->new; > my $dom = $parser->load_xml(string => $res); > my $doc = $dom->documentElement(); > print Dumper($doc->findvalue('*[local-name()="cases"]')) . "\n"; > > You can see like following result in STDOUT. > > <?xml version="1.0" encoding="UTF-8"?><response><cases count="1"><case > ixBug="111350" operations="edit,assign,resolve,remind"><sTitle><![CDATA[FB: > Tooltip can be garbage with static > publishing]]></sTitle></case></cases></response> > $VAR1 = 'FB: Tooltip can be garbage with static publishing'; > > I hope this can help you. > > Regards, > -- shigeta > > On Fri Jan 17 13:43:46 2014, jeff.holt@method-r.com wrote:
> > I modified the constructor as follows: > > > > 9 my $fogbugz = WebService::FogBugz->new({ > > 10 email => 'myemailaddress', > > 11 password => 'mypassword', > > 12 base_url => 'https://method-r.fogbugz.com/default.asp' > > 13 }); > > > > Please note, from the base url, that I am using fogcreek's online > > fogbugz > > service. I can imagine that their version is different than the one > > that > > you might install locally behind your firewall. But my hope is that > > they > > use the same version that you do. If that's not true, then you might > > want > > to either publish a caveat or work with fogcreek to make your code > > work > > with cookies, which is how they're doing authentication with their > > online > > service. > > > > It takes quite a while for your code to return the html file that I've > > attached. All it does it return the login html page code. > > > > Below is the shell script that I've been able to make work > > consistently. > > > > email='myemailaddress' > > password='mypassword' > >
> data="pre=preLogon&dest=&sPerson=$email&sPassword=$password&fRememberPassword=1"
> > curl --cookie-jar kook.notjar --data "$data" " > > https://method-r.fogbugz.com/default.asp" > login.html > > curl --cookie kook.notjar "https://method- > > r.fogbugz.com/default.asp?89" > > > 89.html > > > > fogcreek published a web page that describes how to use their api.asp > > but > > it returns only xml structures. I didn't even try it to see if their > > instructions worked because I wanted a 'pretty' html report. > > > > > > On Fri, Jan 17, 2014 at 8:46 AM, Takatsugu Shigeta via RT < > > bug-WebService-FogBugz@rt.cpan.org> wrote: > >
> > > <URL: https://rt.cpan.org/Ticket/Display.html?id=91997 > > > > > > > Thank you for your report. > > > > > > I can logon FogBugz 8 successfully. > > > The version of FogBugz was below. > > > FogBugz Version 8.9.93.0H (DB 822, Build 0) > > > > > > Could you try to run following script? > > > Please edit email, password and endpoint in the script before > > > running. > > > > > > http://cpansearch.perl.org/src/SHIGETA/WebService-FogBugz- > > > 0.0.4/example/requests.pl > > > > > > If you get any errors in stdout, would you paste it? > > > > > >
> > > > Do you have any updates for this module that support version 8 of
> > > Fogbugz? > > > I don't think any updates so far. If you have any suggestions, please > > > let > > > me know. > > > > > > Regards, > > >
> > > >
This ticket is worth for me. I appreciate you telling me that. Regards. -- shigeta On Sat Jan 18 00:08:39 2014, jeff.holt@method-r.com wrote: Show quoted text
> Thanks for the feedback but I needed to get the fancy styling without > having to write code to format their XML output. I'll stick with the > curl'y > code. > > Therefore, please close this case. > > Regards. > Jeff > > > On Fri, Jan 17, 2014 at 10:50 PM, Takatsugu Shigeta via RT < > bug-WebService-FogBugz@rt.cpan.org> wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=91997 > > > > > Also I am using Fog Creek's online FogBugz. > > > > My code of creating the object is below. > > my $fogbugz = WebService::FogBugz->new({ > > email => 'myemailaddress', > > password => 'mypassword', > > base_url => 'http://movabletype.fogbugz.com/api.asp' > > }); > > > > I think that you use 'api.asp' instead 'default.asp' like below. > > > > my $fogbugz = WebService::FogBugz->new({ > > email => 'myemailaddress', > > password => 'mypassword', > > base_url => 'https://method-r.fogbugz.com/api.asp' > > }); > > $fogbugz->logon; > > my $res = $fogbugz->request_method('search', { > > q => 'FooBar', > > }); > > print $res . "\n"; > > > > Basically WebService::FogBugz returns XML from 'request_method > > 'method. > > If you want to get title of a case, following code will work fine. > > > > #!/usr/bin/perl > > > > use strict; > > use warnings; > > > > use WebService::FogBugz; > > > > my $fogbugz = WebService::FogBugz->new({ > > email => 'myemailaddress', > > password => 'mypassword', > > base_url => 'http://movabletype.fogbugz.com/api.asp' > > }); > > > > $fogbugz->logon; > > > > # retrieve title of the case from > > https://movabletype.fogbugz.com/default.asp?111350 > > my $res = $fogbugz->request_method('search', { > > q => '111350', > > cols => 'sTitle', > > }); > > print $res . "\n"; # show plain XML > > # get the title > > use XML::LibXML; > > my $parser = XML::LibXML->new; > > my $dom = $parser->load_xml(string => $res); > > my $doc = $dom->documentElement(); > > print Dumper($doc->findvalue('*[local-name()="cases"]')) . "\n"; > > > > You can see like following result in STDOUT. > > > > <?xml version="1.0" encoding="UTF-8"?><response><cases > > count="1"><case > > ixBug="111350" > > operations="edit,assign,resolve,remind"><sTitle><![CDATA[FB: > > Tooltip can be garbage with static > > publishing]]></sTitle></case></cases></response> > > $VAR1 = 'FB: Tooltip can be garbage with static publishing'; > > > > I hope this can help you. > > > > Regards, > > -- shigeta > > > > On Fri Jan 17 13:43:46 2014, jeff.holt@method-r.com wrote:
> > > I modified the constructor as follows: > > > > > > 9 my $fogbugz = WebService::FogBugz->new({ > > > 10 email => 'myemailaddress', > > > 11 password => 'mypassword', > > > 12 base_url => 'https://method-r.fogbugz.com/default.asp' > > > 13 }); > > > > > > Please note, from the base url, that I am using fogcreek's online > > > fogbugz > > > service. I can imagine that their version is different than the one > > > that > > > you might install locally behind your firewall. But my hope is that > > > they > > > use the same version that you do. If that's not true, then you > > > might > > > want > > > to either publish a caveat or work with fogcreek to make your code > > > work > > > with cookies, which is how they're doing authentication with their > > > online > > > service. > > > > > > It takes quite a while for your code to return the html file that > > > I've > > > attached. All it does it return the login html page code. > > > > > > Below is the shell script that I've been able to make work > > > consistently. > > > > > > email='myemailaddress' > > > password='mypassword' > > >
> > data="pre=preLogon&dest=&sPerson=$email&sPassword=$password&fRememberPassword=1"
> > > curl --cookie-jar kook.notjar --data "$data" " > > > https://method-r.fogbugz.com/default.asp" > login.html > > > curl --cookie kook.notjar "https://method- > > > r.fogbugz.com/default.asp?89" > > > > 89.html > > > > > > fogcreek published a web page that describes how to use their > > > api.asp > > > but > > > it returns only xml structures. I didn't even try it to see if > > > their > > > instructions worked because I wanted a 'pretty' html report. > > > > > > > > > On Fri, Jan 17, 2014 at 8:46 AM, Takatsugu Shigeta via RT < > > > bug-WebService-FogBugz@rt.cpan.org> wrote: > > >
> > > > <URL: https://rt.cpan.org/Ticket/Display.html?id=91997 > > > > > > > > > Thank you for your report. > > > > > > > > I can logon FogBugz 8 successfully. > > > > The version of FogBugz was below. > > > > FogBugz Version 8.9.93.0H (DB 822, Build 0) > > > > > > > > Could you try to run following script? > > > > Please edit email, password and endpoint in the script before > > > > running. > > > > > > > > http://cpansearch.perl.org/src/SHIGETA/WebService-FogBugz- > > > > 0.0.4/example/requests.pl > > > > > > > > If you get any errors in stdout, would you paste it? > > > > > > > >
> > > > > Do you have any updates for this module that support version 8 > > > > > of
> > > > Fogbugz? > > > > I don't think any updates so far. If you have any suggestions, > > > > please > > > > let > > > > me know. > > > > > > > > Regards, > > > >
> > > > > > > >