jira icon indicating copy to clipboard operation
jira copied to clipboard

Jira custom fields and Insight - Easier integration

Open petermcd opened this issue 5 years ago • 11 comments

Is your feature request related to a problem? Please describe. When creating an issue with an Insight custom field the API only allows you to match on an object key. Under normal circumstances, unless you are duplicating this elsewhere this would not be readily available without querying the API. As this package does not (appear to) allow you to run manual API calls the user is required to either use another package to get the Insight details or manually making those requests.

Describe the solution you'd like The solution can be either of the following:

  1. Provide a method to allow a manual API call
  2. Enhance the project by implementing the Insight API

Describe alternatives you've considered I have looked at the Jira-Insight package but this is a project created to satisfy a particular need and is not production ready (requirements.txt file was missing, querying non existant URL's etc). As the README.md states the package was created for a very specific need.

Additional context I have also created a Jira feature request Jira Insight custom field API

petermcd avatar Dec 06 '20 13:12 petermcd

I have forked and created a branch with the hope I can get it merged into master at some point:

https://github.com/petermcd/jira/tree/insight

Early days yet.

petermcd avatar Dec 06 '20 23:12 petermcd

fork disappeared ...

studioj avatar Jun 10 '21 17:06 studioj

Yeah tbh went off the boil a bit when I posted it. Had quite a few other things going on, I will likely pick this up again very soon

petermcd avatar Jun 10 '21 18:06 petermcd

I am looking to start work on this again but conflicted on wether I should modify this code directly or if I should create a seperate package that extends from this. Either way I would be looking to make sure the interaction with Insight matches Jira.

Any thoughts?

petermcd avatar Oct 29 '21 12:10 petermcd

well it could maybe be handled just as the greenhopper inclusion ... which was originally also a plugin into jira afaik As long as it integrates nicely and doesnt tamper with people not having insight installed im ok with adding it ... (although im creating an addition to this package as will which theoretically can also be integrated....)

maybe come with a proposal and then we'll look how we can integrate AND test it :-)

studioj avatar Oct 30 '21 15:10 studioj

Yes when I was looking at this before I was doing it in a similar manner as Grasshopper, I still have that code somewhere.

Testing is a problem that requires a solution since the removal of Jira Server. It was possible to have a licence for $10 a year, now it requires a Jira Data center subscription with a minimum of $42,000 a year subscription or a Jira Cloud subscription at $45 a month

petermcd avatar Oct 30 '21 17:10 petermcd

our CI system works on a free jira => https://www.atlassian.com/software/jira/free but probably without insights ...

studioj avatar Oct 30 '21 17:10 studioj

Yes Insights is a paid plugin. It isnt even on the first paid tier of cloud instead its the 2nd paid tier.

petermcd avatar Oct 30 '21 17:10 petermcd

I reached out to Atlassian on Twitter enquiring about open source to Atlassian products. They directed me to https://www.atlassian.com/software/views/open-source-license-request

Clearly this is more intended for open source projects using Jira etc as a ticketing system for open source projects but I wonder if it would be possible to apply for such access for CICD ading Insight to the current offering.

petermcd avatar Nov 01 '21 18:11 petermcd

I have reimplemented some of the code that I did previously (and this is far from complete, just acting as a demo), The code needs a significant clean-up as I used existing code as a basis and some of it doesn’t make sense in the context of Insight but the following branch gives an indication on how I would probably implement it:

https://github.com/RockProfile/jira/tree/insight

With the model used, Insight inherits from JIRA therefore has all the same available functionality and would also allow overriding methods when linking to Insight objects is required (such as custom fields) and does not cause the classes to become too large. It also has the benefit that users would not accidentally use Insight specific methods.

Another benefit of extending JIRA is that it then inherits the same behaviour for connectivity and interacting with the API just on a different URL for Insight queries. Of course this behaviour needs to be checked against a cloud instance of Jira (in case it behaves differently as I see some code was intruced for Jira Core to handle some changes)

The next question would be CICD and hinges on my previous comment, I have 1 of the old $10 Jira server licences along with the $10 Insight licences that I develop against, this is fine for development but not so great for CICD, I could always allow a remote runner to run but this is a far from ideal situation. On the other hand, if Atlassian were to provide an open-source licence to the Jira stack with Insight functionality then this could be used for CICD.

This project would have a greater likelihood in my opinion on gaining such a licence as it is an established package with history and a proven track record, if I were to release it as an extension, I think I would (at least initially) have a lesser chance of gaining such a licence to perform CICD.

Do you think this is worth pursuing, if so I will dive into the coding more, if not I can look at alternative plans (such as an extension)

petermcd avatar Nov 01 '21 20:11 petermcd

Hi, original author of https://github.com/dstengele/python-insight here.

I have just thought about building a better integration between the two libraries by e.g. trying to use the session from a initialized JIRA object instead of doing auth directly.

I agree that it would probably be best to integrate everything into this main Jira library, especially as Insight is integrated into Jira Service Management Data Center since 8.15 (and free to use in versions before that).

@petermcd Let me know, if I can help with anything!

dstengele avatar Dec 13 '21 16:12 dstengele