Hello,
I wonder is it possible from technical point of view to fire an event (using Automation, Scriptrunner, or something else) and not update ChangeHistory of an issue in any way? Or maybe firing an event is always related to changes recored in issue history?
Maybe somebody would find it useful in the future so I'm posting a final working solution using suggested dispatchEvent method and Escalation Service provided by ScriptRunner.
Inspired by: https://answers.atlassian.com/questions/35778186 I've modified a little the code and produced following script that I've put into escalation service that is fired periodically:
import com.atlassian.jira.event.issue.IssueEventBundle import com.atlassian.jira.event.issue.IssueEventManager import com.atlassian.jira.event.issue.IssueEventBundleFactory import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.event.issue.IssueEvent Long EVENT_ID = new Long("10500") def issueManager = ComponentAccessor.getIssueManager() def user = ComponentAccessor.getUserManager().getUserByName('some_user') IssueEventManager issueEventM = ComponentAccessor.getIssueEventManager() IssueEventBundleFactory issueEventFactory = (IssueEventBundleFactory) ComponentAccessor.getComponent(IssueEventBundleFactory.class) IssueEventBundle eventBundle = issueEventFactory.wrapInBundle(new IssueEvent (issue, null, user, EVENT_ID, true)) issueEventM.dispatchEvent(eventBundle)
The event("10500") is fired correctly, can be processed by listeners and there is no trace in history of an issue that something changed in the issue.
Hi Bartek
You can use JIRAs custom events, where you can fire them in a workflow transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thanos,
Maybe I wasn't clear: can I fire an event without causing any change in a history of an issue?
When I fire an event as a part of a workflow transition then there is a change stored in a issue history that can be viewed by users and updatedDate will be changed (transition from one status to the other - event if it's status1 -> status1)
I would like to do it "silently" so the majority of users wouldn't know in any way that the event has been fired and for them nothing would happen.
Such "silent" event could be further caught by listener but no user would know about it.
Do you know if it is possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bartek,
Sorry, I misunderstood. Yes you can use the JIRA api - dispatchEvent to dispatchEvent (this is the how). Now there is the second part of the question, the when. You can create a scheduler plugin that will dispatch the event every <schedule time>.
You can also use ScriptRunner Service to schedule a dispatch event.
Or there may be other plugins who can help you with the "when" (but I am not sure therefore I will not risk a false answer)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.