Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Querying the FishEye data

Albin Abraham March 2, 2015

Hi,
We have installed the FisheEye and is using SQL Server 2012 as the backend database. Fisheye is also interfaced to Subversion to get the commit history.

When a user makes a commit and put the "JIRA issue key" to the text, Fisheye will index it against the JIRA issue.  Users can see the commit details from within JIRA. All good until this stage.

I want to write a report using SQL Server Reporting Services, which needs to get the information "Commit comments for a JIRA issue".

Is there anyway I can pull this data from FishEye database? If not, what is the best way to get this information to SQL Server Reporting Services?

 

Thank you all!

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Piotr Swiecicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 2, 2015

Hi @Albin Abraham,

I'm afraid the data you are after is not stored in SQL db.  FishEye uses Apache Lucene to offer text search over changeset comments, Lucene indexes are stored in the filesystem under FISHEYE_INST folder.

If you need to find list of changesets containing particular text in the changeset comment (e.g. JIRA issue key), you may want to use REST API.   Take a look at /rest-service-fe/search-v1/crossRepositoryQuery or /rest-service-fe/changeset-v1/listChangesets call.  For example the crossRepositoryQuery expects 3 parameters

  • query - phrase to search changeset comments for, e.g. JIRA issue key
  • repository - name of the repository to limit searching to this repository only.  All repositories will be searched if not provided
  • expand - set to "changesets" to get list of matching changesets only

For example GET request to https://fisheye2.atlassian.com/rest-service-fe/search-v1/crossRepositoryQuery?query=OGM-752&repository=HibernateOGM&expand=changesets URL will return all changesets matching "OGM-752" issue key from HibernateOGM repository.

You may retrieve data in either XML format, e.g.:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<results expand="changesets">
  <changesets>
    <changeset>
      <repositoryName>HibernateOGM</repositoryName>
      <csid>9e78695c45970cf6db228074e8a80b3240937d69</csid>
      <date>2015-02-26T12:48:10Z</date>
      <author>Sanne Grinovero <sanne@hibernate.org></author>
      <branch>4.2</branch>
      <comment>OGM-747 Update documentation to reflect the Java 7 requirement
</comment>
      <revisions size="1"/>
    </changeset>
    <changeset>
      <repositoryName>HibernateOGM</repositoryName>
      <csid>c7c3f4e70d58c62bf6955ce47a8881189207498e</csid>
      <date>2015-02-26T12:04:40Z</date>
      <author>Sanne Grinovero <sanne@hibernate.org></author>
      <branch>4.2</branch>
      <comment>OGM-747 Require Java 7 for the build and runtime
</comment>
      <revisions size="1"/>
    </changeset>
  </changesets>
</results>

or in JSON format, e.g.:

{
  "expand": "changesets",
  "changesets": {
    "changeset": [
      {
        "repositoryName": "HibernateOGM",
        "csid": "9e78695c45970cf6db228074e8a80b3240937d69",
        "date": 1424954890000,
        "author": "Sanne Grinovero <sanne@hibernate.org>",
        "branch": "4.2",
        "comment": "OGM-747 Update documentation to reflect the Java 7 requirement\n",
        "revisions": {
          "size": 1,
          "revision": []
        }
      },
      {
        "repositoryName": "HibernateOGM",
        "csid": "c7c3f4e70d58c62bf6955ce47a8881189207498e",
        "date": 1424952280000,
        "author": "Sanne Grinovero <sanne@hibernate.org>",
        "branch": "4.2",
        "comment": "OGM-747 Require Java 7 for the build and runtime\n",
        "revisions": {
          "size": 1,
          "revision": []
        }
      }
    ]
  }
}

Hope that helps, 
Piotr 

0 votes
Albin Abraham March 2, 2015

Thank Piotr. That’s helpful. 

 

Cross Repository search is very useful. I need one additional information in the XML results.

1.  Issue Key

2. Commit comments

3. File name -- (name of the file the commit comment is made against)

 

Which will be best way to get the information below from a REST search? Thanks J

TAGS
AUG Leaders

Atlassian Community Events