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

0 votes
Accepted answer

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?

Like 1 person likes this

I have this exact problem, anyone found a solution?

Like 1 person likes this

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

Like 1 person likes this

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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,969 views 19 22
Read article

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