Repository navigation
enhancement(integrations): list versions and categories for MantisBT computed custom fields - #764
Merged
Merged
Conversation
…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.
Contributor
Author
|
🎉 This PR is included in version 1.2.10 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 categoriesVersion 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
How Has This Been Tested?
Unit tests: the MantisBT adapter suite covers the four formulas, obsolete versions, and the text-input fallback.
pnpm precommitpasses.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:
Checklist
Screenshots (if applicable)
None.
Additional Notes
Squash-merge with the PR title unchanged so this releases as a patch.