rossrowe / sauce-teamcity-plugin

Plugin for TeamCity which provides integration with Sauce Labs
Apache License 2.0
15 stars 5 forks source link

Selecting a new Job ID in the Sauce Labs Results tab does not work after you already have one selected #7

Closed MikeEvansLarah closed 10 years ago

MikeEvansLarah commented 10 years ago

In the Sauce Labs Results window, once you have selected a job ID, if you select a different job ID it just loads the results from the previously selected job again.

The problem appears to lie here in sauceBuildResults.jsp:

<a href="<%=request.getAttribute("javax.servlet.forward.request_uri")%>?<%=request.getAttribute("javax.servlet.forward.query_string")%>&jobId=${jobInfo.jobId}&hmac=${jobInfo.hmac}">${jobInfo.jobId}</a>

Once you select a job ID, the request URI already contains the jobId and hmac query parameters - so instead of replacing the existing ones, this is just appending the new parameters it to the end. Since the first instance of the query parameter is used, we always end up back at the original job ID when clicking the link.

rossrowe commented 10 years ago

Hi Mike, thanks for letting me know, I'll let you know when I've fixed the issue.

MikeEvansLarah commented 10 years ago

Thanks for the quick fix!

rossrowe commented 10 years ago

No dramas, I've released version 1.20 (https://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/teamcity/sauceplugin/1.20/sauceplugin-1.20.zip) which includes the fix, please let me know if there are any problems.

MikeEvansLarah commented 10 years ago

Just deployed and all working as expected. Cheers.