IssueTracker

This example demonstrates how to build a simple Issue Tracker Doc App using a spreadsheet template with a form in.

IssueTracker.js
//   --- DocsFree Sheetster ECMAScript API ---------------------------
//    For more information see:                                       
//    http://extentech.com/uimodules/docs/docs_home.jsp?meme_id=2305  
//   -----------------------------------------------------------------
/* Copyright (c) 2011 Extentech Inc. All Rights Reserved
	##### Sheetsterâ„¢ Web Application #####
	This file is a part of the Sheetsterâ„¢ Web Application
* 
*/
/** This example demonstrates:
 
 - Form opening
 - Form submit handling
 - Form validations
 
 To use this example:
 * 
 * 1. Login to Sheetster
 * 2. Create a New Spreadsheet
 * 3. Create a Form named 'insert_issue' using the form definition:
 * 
----- Issue Tracker Data -----
Extentech Issue Tracker Form			
Issue Description	issue_description	enter a short description of the issue	na
Product Affected	||^product_name|ExtenXLS,Sheetster Pro, Sheetster CE, OpenXLS, DocsFree Server	select the product name from the list	na
Major Version	||^major_version|0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15	enter the product major version number	na
Minor Version	||^minor_version|0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15	enter the minor version	na
Build	build_stamp	enter the build number or other identifier	na
Issue Status	||^status|new,resolved,notbug,wontfix,confirmed	select the current issue status from the list	na
Issue Priority	||^priority|lo,med,hi	select the current issue status from the list	na
Detailed Description	detailed_description	enter a detailed description of the issue	na
Assigned To	||^assigned_to|4520|1,2,3,4	enter the id of the contact responsible for this issue	na
Customer ID	customer_id	optional id of the customer contact dependency upon this issue	na
External Link	hlink	optional link to an external reference item such as a 3rd party bug tracker	na
Rating	rating	contacts may "vote" for an item, this is the current rating	na
Resolve Date	resolve_date	the date this item is closed out or otherwise resolved	na
Bounty	bounty	optional cash bounty offered for a fix or implementation	na
Meme Link	meme_id	the id of the detailed meme article which may contain attachments and further artifacts	na
onsubmit	parent.insertIssue()		
----- End Issue Tracker Data -----
* 
 * 
 * 	For info on creating Sheetster Forms see the following article:
 * 	http://extentech.com/uimodules/docs/docs_home.jsp?meme_id=1873
 * 
 * 4. Under Developer Tab, click "Create App"
 * 5. Paste code into the Scripting window and hit "Run Script"
//   --- DocsFree Sheetster ECMAScript API ---------------------------
//    For more information see:                                       
//    http://extentech.com/uimodules/docs/docs_home.jsp?meme_id=2305  
//   -----------------------------------------------------------------
*/
var formurl = '/workbook/id/2/html/namedrange/getform/insert_issue';
// write to the debug window
debug('Loaded Issue Tracker DocApp');
// open the form
parent.createDialogWindow("Insert Issue",formurl,"extentech");
/**
 * performs some action after the form submittal
 * 
 */
function insertIssue(){
	parent.showStatus('Thank you for submitting Issue #123!');
}
/**
 * performs a validation on the form values as they are entered
 * 
 * @param {Object} val
 */
function validate(val){
	parent.showStatus("OK:" + val.getValue());	
}

/**
 * placeholder for openMeme functionality
 */
function openMeme(){
    // get meme id from cells
    var mmx = book.getSelectedSheet().getCell("A1");
    alert(mmx.getVal('G1'));
    mmx.setVal('12345');
    book.cursor.setFocus(mmx);
}

// save original setCursorLocation function
book.cursor.setCursorLocationOLD = book.cursor.setCursorLocation;
// override default cell click behavior
book.cursor.setCursorLocation = function(e){
   // book.cursor.setCursorLocationOLD
   alert('clicked on: ' + book.cursor.getLocation() );
   book.cursor.setCursorLocationOLD(e);
};

  File Modified

Microsoft Excel Sheet IssueTrackerForm.xls

Oct 25, 2012 by Robert Avery