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

Add Jira Issue update step to pipeline #101

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

aatarasoff
Copy link

@aatarasoff aatarasoff commented Jun 14, 2016

Similar as JiraIssueUpdateBuilder, but for pipeline


This change is Reviewable

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 48.215% when pulling 69621d8 on aatarasoff:pipeline-jira-issue-updater into a79b0fd on jenkinsci:master.

@oleg-nenashev
Copy link
Member

Looks good to me as a code.
But I'm not sure what's the problem with the original JiraIssueUpdateBuilder. It implements SimpleBuildStep, hence it should be available in Pipeline

@aatarasoff
Copy link
Author

I don't know how builder will look in pipeline, but I think that notation like:

jiraIssueUpdate(
  jqlSearch: jql,
  workflowActionName: action,
  comment: "Some comment"
)

is really easier for use. Could you provide an example with JiraIssueUpdateBuilder?
And in pipeline syntax help I didn't see this builder.

@aatarasoff
Copy link
Author

Add new pipeline steps. One for updating issue field and one for strict workflow process, cause issue updater set build only Unstable, but not Failure.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.0%) to 48.712% when pulling da4fac3 on aatarasoff:pipeline-jira-issue-updater into a79b0fd on jenkinsci:master.

/**
* Created by aleksandr on 04.07.16.
*/
public class IssueFieldUpdateStepTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add class description

@rantoniuk
Copy link
Contributor

I'll take a look at this tomorrow because it looks like some of the code is duplicated from the original JiraIssueUpdateBuilder class which as @oleg-nenashev pointed out should be usable already as a Pipeline step.
On the other hand, I would warmly welcome the IssueFieldUpdateStep functionality as a separate PR!

import com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder;
import com.atlassian.jira.rest.client.api.domain.input.TransitionInput;
import com.atlassian.jira.rest.client.api.domain.input.VersionInput;
import com.atlassian.jira.rest.client.api.domain.input.*;
Copy link
Member

Choose a reason for hiding this comment

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

can you please replace wildcard imports?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming this is an automatic IDE feature (in IDEA) replacement, that when > 5 imports, wildcards are automatically incurred. Personally this is still debatable for me:
http://stackoverflow.com/questions/147454/why-is-using-a-wild-card-with-a-java-import-statement-bad
Any good reason in Jenkins case about not using wildcard imports that we should maybe put in the README guidelines?

Copy link
Member

Choose a reason for hiding this comment

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

i just looked through few random classes in jenkins core repo and can't see wildcard imports used. it would be better to add checkstyle plugin to build rather than put it in README

@z00dev
Copy link

z00dev commented Sep 8, 2016

Please finish work on this so it can be merged, it would enable pipelines for our organization. This is the missing step.

@rantoniuk
Copy link
Contributor

@eskobaba what about #101 (comment)? did you try this one?

@z00dev
Copy link

z00dev commented Sep 14, 2016

I need pipeline compatibility to post a value to a customfield
Have i overlooked something?

@rantoniuk rantoniuk force-pushed the master branch 3 times, most recently from d9721e7 to 0edb38f Compare October 24, 2016 10:45
@rantoniuk rantoniuk added the feature Release Drafter label label Jun 10, 2020
@rantoniuk
Copy link
Contributor

@aatarasoff

I don't know how builder will look in pipeline, but I think that notation like:

jiraIssueUpdate(
  jqlSearch: jql,
  workflowActionName: action,
  comment: "Some comment"
)

is really easier for use. Could you provide an example with JiraIssueUpdateBuilder?
And in pipeline syntax help I didn't see this builder.

This argument is quite convincing for me, but this PR needs a rebase.
Would you have some time for it? if not, I'll try to take it over.

@rantoniuk rantoniuk added the needs-rebase Waiting for contributor action label Jun 10, 2020
@rantoniuk
Copy link
Contributor

@aatarasoff are you still using this construct? if so, could you rebase it to the current version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Release Drafter label needs-rebase Waiting for contributor action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants