Forums

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

I don't understand how to work with the event CustomFieldUpdatedEven (jira custom listener SR)

Alex
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2024

Please help me figure out how to listen for changes in a task from the event "CustomFieldUpdatedEvent"

I've been sitting for 3 days now and can't get any sense from my script.

With the simple event "Issue updated" it works perfectly.

But I want to narrow the circle and start only from "CustomFieldUpdatedEvent"

 

djghjc.png

 

My beginning of the code working with a simple event "Issue updated" :

import com.atlassian.jira.event.type.EventDispatchOption
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.link.IssueLink;
import java.text.SimpleDateFormat
import java.util.Date
import java.time.temporal.ChronoUnit
import java.time.ZoneId
import static java.time.DayOfWeek.*

def change = event?.getChangeLog()?.getRelated("ChildChangeItem").find {it.field=="myCFname"}

if (change){

def issue = event.getIssue()

....//
....//

Thank you any help!

 

1 answer

1 accepted

1 vote
Answer accepted
Thomas Deiler
Community Champion
February 7, 2024

Dear @Alex ,

if you do not receive an answer the next days, I recommend to ask your question at https://community.developer.atlassian.com/

Bye

Thomas

Alex
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2024

@Thomas Deiler hi ! Thank you for answer. This is helpful. If I get solution on forum , will add here

Suggest an answer

Log in or Sign up to answer