Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getting dependent issues #97

Merged
merged 2 commits into from
May 3, 2016

Conversation

J-cztery
Copy link
Contributor

@J-cztery J-cztery commented May 1, 2016

As stated on the plugin Wiki: "By taking advantages of Jenkins' fingerprint feature, when your other projects that depend on this project pick up a build with a fix, those build numbers can also be recorded in JIRA".
Selecting dependent issues currently does not work. This pull request is to fix it.
This change depends on #95


This change is Reviewable

…low to update JIRA issues based on jobs associated with changes.

Other changes:
1. Refactor selectors. Break down methods in DefaultIssuesSelector so that it is easier to reuse. Side effect is that DefaultIssueSelector now will be fully recursive (once the other problems are fixed).
2. Fix resources (DefaultUpdaterIssueSelector/config.jelly->selectors/DefaultIssueSelector/config.jelly).
It probably would be better if it used IssueSelector of dependent build rather than applying Selector from current build.
@J-cztery
Copy link
Contributor Author

J-cztery commented May 1, 2016

I am planning on adding a test case.

@coveralls
Copy link

Coverage Status

Coverage increased (+2.9%) to 47.571% when pulling 826488e on J-cztery:FixGettingDependentIssues into e23c778 on jenkinsci:master.

@@ -128,7 +128,7 @@ protected void addIssuesFromCurrentBuild(Run<?, ?> build, JiraSite site, TaskLis
*/
protected void addIssuesFromDependentBuilds(Run<?, ?> build, JiraSite site, TaskListener listener,
Set<String> issueIds) {
for (DependencyChange depc : RunScmChangeExtractor.getDependencyChanges(build.getPreviousBuild()).values()) {
for (DependencyChange depc : RunScmChangeExtractor.getDependencyChanges(build).values()) {
Copy link
Contributor

@rantoniuk rantoniuk May 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change.. For me this is exactly as it was before, but previousBuild extraction is moved to RunScmChangeExtractor. Did you get NPE on the previous code in this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously it was getting dependency changes between previous build and ... previous build.
Now it is taking dependency changes between current and previous build.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rantoniuk rantoniuk merged commit 826488e into jenkinsci:master May 3, 2016
rantoniuk added a commit that referenced this pull request May 3, 2016
* upstream/pr/97:
  Fix dependent builds handling. It probably would be better if it used IssueSelector of dependent build rather than applying Selector from current build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants