Custom field update notification in Jira?

Hi All

Is there a plugin which allows us to set notifications/alerts whenever a said custom field is updated in a Jira issue?

Is there a way we could achieve this in Jira?

Thanks and Regards,

Jenin C M

4 answers

1 accepted

then you can write listener(you van write using groovey script runner plugin) and implement you login on issue update event

for your reference, sample code will be something like

public void issueUpdated(IssueEvent event)
{
    ComponentManager componentManager = ComponentManager.getInstance()
    MutableIssue issue = componentManager.getIssueManager().getIssueObject(event.getIssue().getLong("id"))
    VersionManager versionManager = componentManager.getVersionManager()
    IssueChangeHolder changeHolder = new DefaultIssueChangeHolder();
 
    try
    {
        List changeItems = event.getChangeLog().getRelated("ChildChangeItem");
        Iterator iter = changeItems.iterator();
        while (iter.hasNext())
        {
            GenericValue changeItem = (GenericValue) iter.next();
            if ( changeItem.get("field") == "Found in Version")
            {               
                issue.setAffectedVersions([versionManager.getVersion(issue.getGenericValue().project, changeItem.get("newstring"))]);               
            }
            if ( changeItem.get("field") == "Target Version" )
            {              
                issue.setFixVersions([versionManager.getVersion(issue.getGenericValue().project, changeItem.get("newstring"))]);               
            }
        }
        Map actionParams = EasyMap.build("issue", issue.getGenericValue(), "issueObject", issue, "remoteUser", issue.getAssignee(), "dispatchEvent", Boolean.TRUE)
        ActionResult aResult = CoreFactory.getActionDispatcher().execute(ActionNames.ISSUE_UPDATE, actionParams)
    }
    catch (GenericEntityException e)
    {
        log("Error: "+e);
    }
}

just you need to modify the above code as per your requirement


using issue update event on notification scheme you can send notifications/alerts

check this doc

https://confluence.atlassian.com/display/JIRA/Creating+a+Notification+Scheme

or

you can write a listener and can send notifications from Issue Update event

Hi Ram,

Thanks for the response!

But my requirement is different here, I need to get a notification when a specific custom field is updated but not for rest of the fields. Its like setting an alert for a specific custom field.

Regards,

Jenin C M

I have the same problem. Did you find a solution?

I have this exact problem, anyone found a solution?

anyone find a solution? i'm having the same problem

I have been able to accomplish this using this add-on: https://marketplace.atlassian.com/plugins/com.metainf.jira.plugin.emailissue/server/overview

It allows you to send an email notification on issue update, but to filter it to only cases when a specific custom field changes. So updates to any other fields do not result in a notification.

Jenin, you can specify a condition in Jirassimo messenger template like this:

#foreach ($issue in $issues)

   #foreach ($item in $issue.lastchange.items)

      #if ($item.field = 'YOURCUSTOMFIELDNAME')

          Hi there, issue $issue.key was updated. The new value for customfield is $item.toString.

      #end

   #end

#end

 

Hope this helps,

Vladimir

Jenin, Jan

Please check out our add-on https://marketplace.atlassian.com/plugins/net.vacom.jirassimo/server/overview 

You can precisely configure it to fire notifications only on specific field being changed

Cheers,

Vladimir

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

221 views 1 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you