-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Fix getting dependent issues #97
Conversation
…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.
I am planning on adding a test case. |
@@ -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()) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* 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.
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