Issue Key Extractor is not compatible with multi-line messages

Description

The regular expressions used to locate issue keys within a commit message seems to be limited to single-line messages.

See review from the Marketplace

Hi,
We have a problem with multi line comment when the issue key is not in the first line. e.g.:

GitSource: jira test commit #1
DBO-1232
Change-Id: I6689890f26b5e47aeed91db6d21898577b24686b

In this case the plugin cannot associate the jenkins build with the appropriate JIRA issue, however if the issue key (DBO-1232) is in the first line than it works. e.g.:

GitSource: jira test commit #1 DBO-1232
Change-Id: I6689890f26b5e47aeed91db6d21898577b24686b

Any help is appreciated. Thanks Imre

Environment

Every JIRA and Jenkins version is effected

Activity

Show:

Mark Rekveld July 9, 2015 at 12:26 PM

Oke thanks. It may be that just like the commit Id the message is also different per changeset implementation.
I'll have a loot into this.

Imre Rácz June 17, 2015 at 3:40 PM

I have found the cause of the problem. When you fill the changeSet from the json result in RestCommunicator class msg field is used instead of comment field.

changes needed:
s/build.getChangeSet().add(new ChangeSet(commitId, optJsonString(item, "msg")));/build.getChangeSet().add(new ChangeSet(commitId, optJsonString(item, "comment")));

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Zoom

Open Zoom
Created June 10, 2015 at 9:36 PM
Updated November 12, 2015 at 5:12 PM
Resolved November 12, 2015 at 2:00 PM
Zoom