Skip to content

Instantly share code, notes, and snippets.

@dougn
Created June 10, 2013 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dougn/5746659 to your computer and use it in GitHub Desktop.
Save dougn/5746659 to your computer and use it in GitHub Desktop.
FogBugz Customization to allow for URL filling of custom fields
name: Auto Fill Custom Fields
description: Find any arguments on in the URL for a new case which start with 'custom_' and attempt to fill that field with the value.
author: Doug Napoleone
version: 1.0.0.0
js:
// based on inspiration from:
// http://fogbugz.stackexchange.com/questions/2427/feature-request-pre-fill-custom-fields-on-new-case-edit-page-via-url-parameter
// But only 1 line remains from that origional.
//only run on new bug
if(goBug && goBug.ixBug == 0)
{
var searchString = window.location.search.substring(1);
var params = searchString.split("&");
for (var i = 0; i < params.length; i++) {
var val = params[i].split("=");
var name = unescape(val[0]);
if (name.substring(0,7) == "custom_")
{
$("#"+name.substring(7)).val(unescape(val[1]));
}
}
}
css:
/* body { background-color: red !important; } */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment