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 symbol for DescriptionColumn #24

Merged
merged 1 commit into from
Jul 21, 2021
Merged

Add symbol for DescriptionColumn #24

merged 1 commit into from
Jul 21, 2021

Conversation

basil
Copy link
Member

@basil basil commented Jul 20, 2021

DescriptionColumn currently doesn't work with the Dynamic DSL in Job DSL. Attempting to use it with

descriptionColumn {
  displayName false
  trim true
  displayLength 7
  columnWidth 0
  forceWidth false
}

yields the following error:

ERROR: Found multiple extensions which provide method descriptionColumn with arguments […]: [jenkins.plugins.extracolumns.DescriptionColumn, jenkins.branch.DescriptionColumn]

To solve this I added a symbol to disambiguate DescriptionColumn. I named it projectDescriptionColumn because in the UI the relevant column is called "Project Description".

I verified that with this patch the following syntax works:

projectDescriptionColumn {
  displayName false
  trim true
  displayLength 7
  columnWidth 0
  forceWidth false
}

CC @fredg02

@fredg02
Copy link
Member

fredg02 commented Jul 21, 2021

Thanks for your pull request. Is this the only column that needs an extra symbol? Have you tested any other columns with the JobDSL plugin?

@basil
Copy link
Member Author

basil commented Jul 21, 2021

Thanks for your pull request.

You're welcome!

Is this the only column that needs an extra symbol?

I believe that it is.

Have you tested any other columns with the JobDSL plugin?

I've tested buildDescriptionColumn with the Dynamic DSL and it works fine without a symbol. I haven't tested the others, but all of these show up in the Dynamic DSL API viewer, which means they are available for use:

buildDescriptionColumn
buildDurationColumn
buildParametersColumn
configureProjectColumn
cronTriggerColumn
disableProjectColumn
jobTypeColumn
lastBuildColumn
lastBuildConsoleColumn
lastBuildNodeColumn
lastJobConfigurationModificationColumn
scmTypeColumn
slaveOrLabelColumn
testResultColumn
userNameColumn
workspaceColumn

Note that descriptionColumn was not in this list prior to this PR. But with this PR, it shows up in the API viewer as projectDescriptionColumn.

@fredg02 fredg02 merged commit 0a39c95 into jenkinsci:master Jul 21, 2021
@fredg02
Copy link
Member

fredg02 commented Jul 21, 2021

Cool. Thanks for the quick reply. Let's merge this PR then.

@basil basil deleted the symbol branch July 21, 2021 22:58
@basil
Copy link
Member Author

basil commented Jul 23, 2021

Thanks for merging this, @fredg02! Would it be possible to get a release in the coming weeks?

@fredg02
Copy link
Member

fredg02 commented Jul 23, 2021

I'll try to do a release next week.

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