Skip to content

Conversation

@josh-burton
Copy link

It may be desired to not update an issue if it has (or doesn’t have) a specific status.

This commit adds a global plugin configuration where statuses to include or exclude can be defined.

Before updating an issue, it’s status will be checked, and it may be skipped.

I attempted to find a good central point at which to do this check, and it seems like the JiraClientSvcImpl class was the best fit. Very open to suggestions though.

screen shot 2017-03-02 at 3 21 18 pm

It may be desired to not update an issue if it has (or doesn’t have) a specific status.

This commit adds a global plugin configuration where statuses to include or exclude can be defined.

Before updating an issue, it’s status will be checked, and it may be skipped.
@dalvizu
Copy link
Member

dalvizu commented Mar 6, 2017

Hi @athornz - thanks for the merge request.

There are a few issues in this approach: First is that there is a redundant check in each of the individual JIRA operations. While this is not desirable from good code perspective, it is especially problematic because the jira-ext plugin was intended to be extensible - in other words another plugin could contribute their own operation, and would not benefit from your change.

I am thinking of creating a new extension point (filter issues?) which you can plug in.

However, as JIRA admin, can you not simply exclude issues from operations? For example, if you do not want to transition issues in "Blocked" status to "Done", but want to do that with "Submitted" tickets, is that not what JIRA issue schema is for? If possible I would like to maintain that there and keep the client as dumb as possible.

Could you elaborate more on your use-case? What operations are you trying to do, and why you are trying to include / exclude them.

@josh-burton
Copy link
Author

Thanks for the reply @dalvizu.

We are using jira-ext to comment on JIRA issues when a build relating to that issue has completed.

Currently comments continue to be created for issues that have been resolved, because other branches include the same commit.

Filtering out issues by status solves this.

I agree an extra extension point for filters would be perfect (or even just a JQL filter field).

@josh-burton
Copy link
Author

Hi @dalvizu, where to from here?

@dalvizu
Copy link
Member

dalvizu commented Jun 20, 2017

Going very slowly. I don't want to merge this as global configuration as I think that's the wrong direction, and if it's merged I'll have to support that forever. I do have some work in progress on making it an extension point but I haven't touched it in a while.

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.

2 participants