Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script Runner Listener Issue Update

Batuhan Kandiran October 25, 2024

Hi,

i want to set new custom field by older values.

i am using function below,

issue.update { setCustomFieldValue("newcustomfield", "new value") }

is there any way to make this update operation without sending mail to all users.

 

2 answers

0 votes
Batuhan Kandiran October 25, 2024

i want to set customfield with value with groovy script 

 

CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()
GroupManager groupManager = ComponentAccessor.getGroupManager()
CustomField NewAssigneeGroupCF = customFieldManager.getCustomFieldObject("customfield_29311")
CustomField NewReporterGroupCF = customFieldManager.getCustomFieldObject("customfield_29312")
String startdate = '2024-10-01'
String enddate = '2024-11-01'



List<Issue> issues = new ArrayList<Issue>()
Issues.search(" assignee is not EMPTY and AssigneeGroup is EMPTY and created >= "+startdate+" and created < "+enddate+" and project = VSPR ").each { issue ->
issues.add(issue)
}

for(Issue issue : issues){
try{
issue.update { setCustomFieldValue(NewAssigneeGroupCF.getName(), findExactGroup(issue.assignee)) }
}catch(Exception ex){ return ex }
}
0 votes
Mohamed Benziane
Community Champion
October 25, 2024

Hi,

can you show us all your code please ?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events