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, jira product discovery, jpd premium, product management, idea management, product discovery, jira premium, product planning, atlassian community, product development, roadmap planning, product prioritization, feature management

Introducing Jira Product Discovery Premium ✨

Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.

Learn more
AUG Leaders

Atlassian Community Events