Reporting with native JQL

Subversion ALM supports a very powerful and flexible reporting based on:

  • JQL
  • Commit Calendar View

The JQL functions provided by Subversion ALM allows searching issues filtering by Subversion attributes like author, date range, commit range, words in comment, files and subdirectories, etc. while the Commit Calendar View shows commits in an interactive calendar.

JQL functions

Several JQL functions are supported by Subversion ALM allowing users to search issues on JIRA by using Subversion attributes like the commit author, commit date range, committed files and directories, any words in the commit message, etc.


All the Subversion ALM JQL functions:

  • Start with the svn prefix.
  • Show a useful quick guide on JIRA when some parameter has an invalid value.
  • Support the following two parameters:
  1. repoId: it restricts the search the repository with the provided Id (Id>0). An Id with the zero value always means all the repositories.
  2. limit: It is very important understanding that the JIRA JQL engine always re-orders the JQL results by some Issue attribute (priority, status, …). Therefore, is not possible displaying on JIRA the issues sorted by any Subversion attribute like the revision number, commit date, etc. To deal with this, when the limit filter is set, the results are internally sorted by the commit day before they are sent back to JIRA. A limit = 10 means the 10 issues related to the latest (newer) commits matching the query, but they will be re-ordered by JIRA when they are displayed. Regardless they are re-sorted by JIRA you can be confident about they are the most recent issues.

To quick start working with the Subversion ALM JQL functions type the query below in the JIRA Issue Advanced Search:
issue in svn
Currently the Subversion ALM JQL functions are grouped into two main groups:

  • Attribute functions: they allow searching issues on JIRA by using Subversion attributes:
    • svnCommitNumberRange
    • svnCommitDateRange
    • svnAuthor
    • svnItem
  • Aggregation functions: they allow searching issues on JIRA by aggregating (counting/amount) some Subversion attribute:
    • svnMultiCommit
    • svnMultiAuthor
    • svnMultiProject
    • svnMultiRepository


Attribute JQL functions

svnCommitNumberRange







It returns the issues related to commits between a revision range on an specific repository







#

Name

Type

Required

Values

Description

1

repoId

Integer

Yes

>0

The repository Id

2

start

Integer

No

>=0

The start revision of the range

3

end

Integer

No

>= 0

The end revision of the range

4

limit

Integer

No

>=1

Limits the number of returned issues


Example:
issue in svnCommitNumberRange(5,4364,"",10)
Meaning:
It returns maximum 10 issues related to the latest commits from the 4364 (included) revision to the HEAD in the repository Id=5.

svnCommitDateRange







It returns the issues related to commits between a date range on all the repositories







#

Name

Type

Required

Values

Description

1

repoId

Integer

Yes

>=0

Zero means all the repositories.

2

start

String

No

yyyy-MM-dd

The start date of the range

3

end

String

No

yyyy-MM-dd

The end date of the range

4

limit

Integer

No

>=1

Limits the number of returned issues


Example:
issue in svnCommitDateRange (0,"2013-02-01","",99)
It returns maximum 99 issues related to the latest commits on any repository from the February, 1st 2013.

svnAuthor






It returns the issues related to commits made for an specific user






#

Name

Type

Required

Values

Description

1

username

String

No

Any

An empty string means no username (null).

2

repoId

Integer

No

>=0

Zero means all the repositories.

3

limit

Integer

No

>=1

Limits the number of returned issues


Example:
issue in svnAuthor ("sally",0,1)
It returns one issue (if any) related to the latest Sally's commit on any repository.


svnItem






It returns the issues related to commits modifying a file or subdirectory






#

Name

Type

Required

Values


1

Item

String

Yes

Path

A path or file name

2

Action

String

No

A,M,D,R,""

The action on the item

3

repoId

Integer

No

>=0

Zero means all the repositories.

4

limit

Integer

No

>=1

Limits the number of returned issues


Examples:

  1. issue in svnItem("myfile.txt","D",3)
  2. issue in svnItem("/foo/myfile.txt","",3,5)
  3. issue in svnItem("/foo","A",3)
  4. issue in svnItem("/foo/","",3,10)


  1. It returns all the issues related to the commit which deleted a "myfile.txt" file in the repository 3 regardless the file location. As no path is set, it will search for the file in all the branches.
  2. It returns the issues related to the latest 5 commits changing the exact "/foo/myfile.text" file in the repository 3. As the path is set to "/foo" it will look for the file in that exact branch.
  3. It returns all the issues related to the commit which created the exact "/foo" branch. Notice that the branch name does not end with a slash "/" character, so the subdirectories are ignored.
  4. It returns 10 issues related to all the commits modifying something under the "/foo" branch. Notice that the branch name ends with a slash "/", hence all the subdirectories will be taken in consideration during the search.


Aggregation JQL functions

Sometimes managers want to track some potential risks. Subversion ALM supports some useful JQL functions in order to help them:

svnMultiCommit






It returns issues related to a minimal amount commits






#

Name

Type

Required

Values


1

count

Integer

Yes

> 0

Minimal amount of commits

2

limit

Integer

No

>=1

Limits the number of returned issues


Example:
issue in svnMultiCommit (5, 10)
What are the most recent 10 issues which have been related to 5 or more commits on any repository?

svnMultiAuthor






It returns issues with commits from several authors






#

Name

Type

Required

Values


1

count

Integer

Yes

> 0

Minimal amount of different authors

2

limit

Integer

No

>=1

Limits the number of returned issues


Example:
issue in svnMultiAuthor (3, 10)
What are the 10 most recent issues which have commits from more than 3 different users?

svnMultiRepository






It returns issues with commits on different repositories






#

Name

Type

Required

Values


1

count

Integer

Yes

> 0

Minimal amount of different repositories

2

limit

Integer

No

>=1

Limits the number of returned issues



Example:
issue in svnMultiRepository (2)
What are all the issues having commits on 2 or more repositories? (Cross repository issues are not allowed in this company).

svnMultiProject






It returns issues with commits affecting to different JIRA projects






#

Name

Type

Required

Values


1

commits

Integer

Yes

> 0

A path or file name

2

limit

Integer

No

>=1

Limits the number of returned issues


Example:
issue in svnMultiProject (2, 10)
What are the recent issues that have commits on 2 on more JIRA projects?

Commits Calendar Report

The Commits Calendar Report allows visualizing the commits related to the issues returned by any filter.
Prior to use it, a JQL query has to be saved:


From the top menu: Subversion > SVN Filter Report


Click on the Select Filter… link:

Select a filter and click on the Next button:

This page shows:

  • a calendar at the top of the page displaying the commits related to the JIRA issues along the time
  • a bar chart at the middle showing the amount of commits vs time. By default the commits are displayed grouped by day, although they can be re-grouped in weeks: there is an interactive thumbnail view below allowing to select a range of days.
  • a pie chart at the bottom with the contribution of each author.

You can click on any day on the top calendar as well as on the authors' names links in the pie chart to see the issues on JIRA: