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.
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?
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)
I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG