Hello, I hope you can help…
I have a use case:
-
Each time an issue is Created or Updated, search for specific custom fields and get the values of those specific custom fields, then call a Jira REST API to do something with those values.
-
I am writing a Jira plugin, it has an event listener.
-
With this listener, I know when any issue is created or updated, etc.
-
When an issue is created or updated, I can get that issue and the fields via the Java API.
-
This all works.
But I subsequently want to call the ‘issue entity’ REST API with the issue that was just created/updated**.
No examples I’ve seen online seem to work for me using SAL, because when I run ‘atlas-package’, it fails on
import com.atlassian.sal.api.net.TrustedRequest;
import com.atlassian.sal.api.net.TrustedRequestFactory;
However, ‘atlas-package’ compiles successfully using:
import com.atlassian.sal.api.net.RequestFactory;
So should I be using SAL and just RequestFactory? or do I need the TrustedRequestFactory?
Code samples are welcome! I feel it’s a really easy thing to do and I’m somehow missing it.
Again, I just want to call Jira REST API from Jira Plugin installed on the same instance - and be authenticated/permitted to do a PUT/GET using ‘jira entities’ on the issue just created.
Thank you