This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const customerFacingVarbatimField = getFieldById("customfield_27449"); | |
const customerFacingVarbatimFieldValue = customerFacingVarbatimField.getValue()?.value; | |
const responseField = getFieldById("customfield_20579"); | |
const responses = { | |
"Fix Released": "The issue has been fixed in [Version X.Y.Z] released on [Date]. Please upgrade to apply the fix.", | |
"Fix in Progress": "Actively working on a fix, expected in our upcoming patch [on Date].", | |
"Under Investigation": "The issue/request is under investigation. Updates will follow.", | |
"Workaround Provided": "[Share workaround].", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uacField = getFieldById("customfield_10322"); | |
uacField.setRequired(true); | |
const mobileField = getFieldById("customfield_10323"); | |
mobileField.setVisible(false); | |
mobileField.setRequired(false); | |
const productareaField = getFieldById("customfield_10536"); | |
productareaField.setVisible(false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
def eventIssue = Issues.getByKey(issue.key as String) | |
def issueKey = eventIssue.key | |
// Correctly extract the custom field value | |
def rawProductArea = eventIssue.getCustomFieldValue("Product Area") | |
def productAreaValue = rawProductArea instanceof Map ? rawProductArea.value : rawProductArea?.toString() | |
logger.info("Product Area = ${productAreaValue}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def eventIssue = Issues.getByKey(issue.key as String) | |
// Construct JQL query | |
def jqlQuery = "issue in linkedIssues(\"${eventIssue.key}\") AND project = \"MTP\"" | |
// Run search using the latest API | |
def searchResult = get("/rest/api/3/search/jql") | |
.queryString("jql", jqlQuery) | |
.queryString("fields", "summary,key,status") | |
.queryString("maxResults", "50") // adjust as needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const transitionId = await getContext().then(context => context.extension.issueTransition.id); | |
const releaseNotesField = getFieldById("customfield_10324"); | |
releaseNotesField.setVisible(false) | |
// Get the custom field (10323) that controls the logic (Yes/No) | |
const changeField = getFieldById("customfield_10323"); | |
const changeFieldValue = changeField.getValue().value | |
// Check condition: if transitioned to Done and changeField value is "Yes" | |
if (transitionId == 21 && changeFieldValue == "Yes") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['accountID', 'accountID'].includes(user.accountId) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import os | |
import csv | |
# Confluence credentials and domain | |
JIRA_DOMAIN = "https://your_domain.atlassian.net" | |
EMAIL = os.getenv("JIRA_EMAIL", "EMAIL_ADDRESS") | |
API_TOKEN = os.getenv("JIRA_API_TOKEN", "API_TOKEN") | |
# Headers for authentication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import csv | |
# Constants | |
ORG_ID = "YOUR_ORG_ID" | |
BASE_URL = f"https://api.atlassian.com/admin/v1/orgs/{ORG_ID}/users" | |
BEARER_TOKEN = "your_bearer_token_here" # Replace with your actual token | |
HEADERS = { | |
"Authorization": f"Bearer {BEARER_TOKEN}", | |
"Accept": "application/json" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fieldsResponse = get('/rest/api/2/field').asObject(List).body | |
def fieldCounts = [:] | |
fieldsResponse.each { field -> | |
def fieldId = field.id | |
def fieldName = field.name | |
def fieldType = field.schema?.type ?: 'N/A' | |
def jqlQuery | |
if (fieldId.startsWith('customfield_')) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Retrieve the list of projects | |
def projectsResponse = get('/rest/api/2/project').asObject(List).body | |
def fieldMappings = [:] | |
projectsResponse.each { project -> | |
def projectId = project.id | |
def projectName = project.name | |
// Retrieve the list of screens for the project |
NewerOlder