The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe
1
0
-1
2 answers
- 10-1
Would it be possible to use this kind of code to access the exalate API in scriptrunner?
static def ttrepo = ComponentAccessor.getOSGiComponentInstanceOfType(ttRepoClass)
static def essClass = exaCl.loadClass("com.exalate.api.replication.out.IEventSchedulerService")
static def ess = ComponentAccessor.getOSGiComponentInstanceOfType(essClass)
static def relationRepoClass = exaCl.loadClass("com.exalate.api.persistence.relation.IRelationRepository")
static def relrepo = ComponentAccessor.getOSGiComponentInstanceOfType(relationRepoClass)Add your comment... - 10-1
The simplest approach is to set in your incoming sync script a custom field.
Something likeissue."Remote Key" = replica.key
Finding all the issues which have been exalated is then very simple
"Remote Key" is not empty
Using scriptrunner requires you to access the Exalate API which is not public atm.
- Mouna Hammoudi
yes but I do not want to add an extra field in my incoming script , I want to do everything with scriptrunner, your suggestion would mean I would need to add a new custom field to my Jira and I do not want that
- Francis Martens (Exalate)
hmm - but you do have a scripted field :thinking_face:
- Mouna Hammoudi
what do you mean? my scripted field is the following and what I am trying to do is to set the field value to the text "Yes" if it was exalated otherwise, I would like to go to have a link that the user would click on and that would force a REST connection that would force an exalate
- Mouna Hammoudi
By the way, I am synchrinzing Jira data center and Jira cloud, here are my connections for Jira cloud:
and here are my connections for Jira data center:
Add your comment...
I would like to write some code to check if an issue has been exalated in scriptrunner, I am using the following code in scriptrunner for the scripted field that I created as a custom field but it seems that I have a compilation error: I am getting the error stating that [Static type checking] - The variable [eventTypeManager] is undeclared. I am importing the appropriate packages though, how can I fix this problem. Otherwise, how can we check in scriptrunner that and issue has been exalated?
Check componentAccessor for more details.
I used the code which instantiates EventTypeManager and I get the error Cannot find matching method com.atlassian.jira.event.type.EventTypeManager#getEventType(java.lang.Object). Please check if the declared type is correct and if the method exists
EventTypeManager eventTypeManager=ComponentAccessor.getEventTypeManager()
EventType eventType = eventTypeManager.getEventType(event.getEventTypeId())
if (eventType.name.equalsIgnoreCase(EXALATED_EVENT_TYPE)) {
return "EXALATED event caught for issue ${issue.key}"
}