I am creating a plugin which will have a scheduled job inside periodically synchronizing jira database with 3rd party software. So all the routines will be performed in background.
It will be required to perform the following set of tasks:
1) Search for issues / projects / versions / jira users by certain search criteria
2) Create new / Update existing issues / projects /versions / jira users
All the changes performed by the plugin should be visible in "Recent Activity" like it was done directly by users.
Which internal Jira API(s) I need to use within my plugin to achieve the goals? Which is the best practice to perform this task?
I agree with Jamie. Use OfBizDelegator only when you know all the DB Entity relations. It is advised to use manager classes if possible and use delegator only if that is not an option.
Thanks Jamie for clarification, this definitely makes sense for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
By writing to the db I mean using OfBizDelegator to store values directly in the DB. Sometimes it's ok, but for the things you're talking about, it's not. Unless you want to tear your hair out dealing with problems involving the caches and referential integrity. Really, there is only one way to do this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't want to be writing to the database directly, so if you need to create <anything> in jira, the managers etc are the only choice you have.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But what about Jobin's OfBizDelegator - seems quite competitive alternative.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Jamie and Jobin for the hints. The picture is getting clearer now.
So as far as I see I have 2 ways:
1) Use OfBiz Entity Manager to work directly with jira database
2) Use Managers for every kind of JIRA data I need to deal with
Could you, please, highlight the biggest pros and cons of both approaches as I am on crossroads and need to choose the best way or it may cost much if I will discover some restriction in the middle of the road.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In that case, ProjectManager, ProjectVersionManager, and UserManager/UserAccessor. Of course, you can go direct to the DB as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're unlikely to get a good answer with such a broad question. Start with JqlQueryBuilder, IssueService, etc etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use OfBizDelegator. You will find all the methods in the Java docs. There is a chapter for working with DB in JIRA Development Cookbook.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well I do not need too detailed explanations. I would like to find out if there is a separate API for Jira DB manipulation and where can I read for this. I.e. which can provide me the interface to access all jira entities.
As for example you mentioned JqlQueryBuilder and IssueService but I don't only need to deal with issues but also with projects, versions and users.
I searched over the docs and questions database but can't find anything suitable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.