Skip to content

Conversation

@ericcitaire
Copy link

@ericcitaire ericcitaire commented Nov 10, 2021

See JENKINS-56935.

image

Proposed changelog entries

  • Fixes JENKINS-56935

Submitter checklist

  • JIRA issue is well described
  • Changelog entry appropriate for the audience affected by the change (users or developer, depending on the change).
    * Use the Internal: prefix if the change has no user-visible impact (API, test frameworks, etc.)
  • Appropriate autotests or explanation to why this change has no tests

@ericcitaire
Copy link
Author

Can I have feedback on this please ?

ping @fcojfernandez @bitwiseman @alecharp

@fcojfernandez fcojfernandez requested a review from a team December 23, 2021 08:05
Copy link
Member

@jtnord jtnord left a comment

Choose a reason for hiding this comment

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

this would be incorrect as the code is setting the internal value to -1 when the value is empty. by allowing 0 the internal field would no longer be using -1 and the quick deletion would no longer work.

If the behaviour is unclear I would suggest a change to the inline help and documentation rather than code

@jtnord jtnord changed the title Fixes JENKINS-56935 [JENKINS-56935] Multibranch pipeline orphaned item strategy can't be set to 0 Jan 4, 2022
@ericcitaire
Copy link
Author

this would be incorrect as the code is setting the internal value to -1 when the value is empty. by allowing 0 the internal field would no longer be using -1 and the quick deletion would no longer work.

If the behaviour is unclear I would suggest a change to the inline help and documentation rather than code

Yes, the behaviour is unclear.
From what I observe, my understanding is that an empty value or -1 basically means ignore this criteria, while a 0 value means don't keep anything.

Also, this is just a matter of UX because the 0 value is actually accepted, despite the displayed error message.

@ericcitaire ericcitaire requested a review from jtnord January 12, 2022 09:27
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