Skip to content

enhancement(integrations): list versions and categories for MantisBT computed custom fields - #764

Merged
therealbrad merged 1 commit into
mainfrom
enhancement/mantisbt-computed-lists
Nov 24, 2026
Merged

therealbrad merged 1 commit into
mainfrom
enhancement/mantisbt-computed-lists

Conversation

@therealbrad

Copy link
Copy Markdown
Contributor

Description

Follow-up to #763. A MantisBT custom field can take its options from a formula instead of a fixed list. The MantisBT API returns the formula itself (for example =versions), not the values, so the create issue form offered these fields as plain text inputs.

The form now lists the options for the four formulas MantisBT ships with, using the project data the adapter already reads:

  • =versions: the project's versions
  • =released_versions: released versions
  • =future_versions: versions not yet released
  • =categories: the project's categories

Version lists leave out obsolete versions, as MantisBT's own report form does. No extra request is made.

A formula backed by a custom function added to a MantisBT installation still gets a text input, because the API does not expose its values. So does a computed list with nothing to list, such as a project with no versions.

Related Issue

None. Follow-up to #763.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • E2E tests
  • Manual testing

Unit tests: the MantisBT adapter suite covers the four formulas, obsolete versions, and the text-input fallback. pnpm precommit passes.

Manual testing: run against a live MantisBT (schema 213) whose project has a released, an unreleased and an obsolete version, with one custom field per formula plus one using an unknown formula. Each field listed the expected options, and an issue created with a value picked from each list stored those values.

Not tested: the create dialog in a browser against a real tracker (the adapter was driven directly).

Test Configuration:

  • OS: macOS
  • Browser (if applicable): n/a
  • Node version: 24.14.0

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have signed the CLA

Screenshots (if applicable)

None.

Additional Notes

Squash-merge with the PR title unchanged so this releases as a patch.

…computed custom fields

A MantisBT custom field whose values are a formula (`=versions`,
`=released_versions`, `=future_versions` or `=categories`) was offered as a
plain text input, because the API returns the formula instead of the values.
The create form now lists the project's versions or categories for those
four formulas, leaving out obsolete versions as MantisBT's own form does.

A formula backed by a custom function on the MantisBT installation still
gets a text input, since the API does not expose its values.
@therealbrad
therealbrad merged commit 65b4249 into main Nov 24, 2026
8 checks passed
@therealbrad
therealbrad deleted the enhancement/mantisbt-computed-lists branch November 24, 2026 04:41
@therealbrad

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 1.2.10 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant