Automatically Populate Timezone from a Created Issue

Usage FAQ

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

Atlassian Support likes to use customers' timezones to respond more effectively to support tickets. We extract timezone information automatically, so customers don't need to enter it manually. To do that, we add JavaScript to our custom field description:

 

No longer works starting JIRA 4.4

This Javascript no longer works starting from JIRA 4.4. It only works up until JIRA 4.3.

Your timezone. The value is set automatically from your browser, so please only modify if it's incorrect. <br>
<b><a href="http://www.worldtimezone.com/" target="timezone">World Timezones</a></b>

<script language="JavaScript"> 

<!-- 
function setCustomerTimezone()
{
	tzlist = document.getElementById("customfield_10421");
	if (tzlist) {
		if (/CreateIssueDetails.jspa/.test(tzlist.form.action)) {
// Value has not yet been set			if (tzlist.value == -1) { 
				offset = new Date().getTimezoneOffset() / 60; // hours from GMT
				if (offset <= 0) { tzlist.value="GMT+"+(-offset);  }
				else { tzlist.value = "GMT-"+offset; }
//			}
		}
	}
}

window.onload = setCustomerTimezone; 

//-->
</script>
Related Pages

Setting Priority field value based on customfield value
How to Set Default Comment Security Level
Creating Help for a Custom Field
Displaying a Field Based on Another Field Selection

最終更新日 2012 年 9 月 3 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.