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

Custom field description #758

Closed
wants to merge 8 commits into from
Closed

Conversation

cproensa
Copy link
Contributor

Add description text attribute for custom field definition, and show this description on labels for form inputs.

cf_description

Fixes #03433

@atrol
Copy link
Member

atrol commented Apr 17, 2016

No time for a deeper look or testing, but looks good at first sight.
What I don't like that much is, that we get one more thing which can't be localised, but that's another story.

Missing documentation, e.g. https://www.mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.pages.manage.customfields
https://www.mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.customize.customfields.definitions

@cproensa
Copy link
Contributor Author

No time for a deeper look or testing, but looks good at first sight.
What I don't like that much is, that we get one more thing which can't be localised, but that's another story.

i agree. I had opened #0020305 to open discuss possible solutions.

@cproensa
Copy link
Contributor Author

cproensa commented Apr 17, 2016

Missing documentation

Actually, current documentation for CF was quite outdated.
I had a revision and clean-up, and added the specific for this PR

@@ -865,6 +865,10 @@
# Enable gravatar plugin if avatars are enabled
$g_upgrade[205] = array( 'UpdateFunction', 'gravatar_plugin', array() );

# Add description field to custom field definition
$g_upgrade[206] = array( 'AddColumnSQL', array( db_get_table( 'custom_field' ), "
description XL NULL DEFAULT NULL" ) );
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to support long descriptions here? Should we use a one line for description? That would reflect on the db schema and UI.

Copy link
Member

Choose a reason for hiding this comment

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

Why not default to empty string rather than null?

@vboctor
Copy link
Member

vboctor commented Apr 17, 2016

@cproensa I haven't revised the documentation, but the rest looks ok. Thanks for refreshing the documentation.

  • single line vs. multi-line? and field time in schema
  • null vs empty string in schema

@dregad it would be good to review the schema to make sure no issues there.

@cproensa
Copy link
Contributor Author

single line vs. multi-line?

I see the use case for multi-line. Usually you wont need more that 2 or 3 lines, but the option is ther if needed.
Notice how i made the textarea 2 rows height, to encourage a short description :)

field type: long vs varchar vs xxx
null vs empty string in schema

I'm neutral on that. I replicated the description field from project table

@vboctor
Copy link
Member

vboctor commented Apr 21, 2016

👍 -- I'll leave it to @dregad to comment on the schema. I personally prefer empty over null.

@dregad
Copy link
Member

dregad commented May 15, 2016

In terms of UI consistency, I'm wondering why the CF's description is sometimes displayed, and sometimes not.

Currently, it's shown when

  • Reporting a new issue
  • Changing status to Resolved or Closed

It's missing when

  • displaying an issue (view.php)
  • updating an issue (bug_update_page.php)
  • mass-updating the custom field (bug_actiongroup_page.php)

Haven't had time to review the doc yet.

@cproensa
Copy link
Contributor Author

For the missing description:

displaying an issue (view.php)
updating an issue (bug_update_page.php)

The table based layout is not easy to accommodate the description in those pages.

mass-updating the custom field (bug_actiongroup_page.php)

That can be done with the current layout. I will review this.

@cproensa
Copy link
Contributor Author

mass-updating the custom field (bug_actiongroup_page.php)

@dregad, updated the actiongroup page.
and rebased to current head

@cproensa
Copy link
Contributor Author

I found the use case for custom fields that may have some restrictions, like min/max lenght, or regexp.
Where it's desirable to explain the valid syntax before the user submits the form (otherwise, getting an error after submit, and the risk of losing inputted data).

Using this description to explain the field restrictions can be a solution.

Add management for custom fields description attribute
Add custom field description text of form input labels
Whitespace and minor formatting changes
Revision for Custom Fields documentation, up to v1.3.0-rc1
- Remove duplicate information across different sections
- Remove obsolete information
- Add new functionality for current version
Add documentation for new custom field attribute 'description'.
Do not print HTML markup for Custom Fields description on labels,
if the description is empty.
@cproensa
Copy link
Contributor Author

null vs empty string in schema

  • changed to default '' instead of null
  • rebased to current master-1.3.x
    however, this PR is submitted against master (before changing version to 2)
    should i resubmit to proper mantis-1.3.x?

@cproensa
Copy link
Contributor Author

outdated & no progress

@cproensa cproensa closed this Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants