Skip to content

[Feature]: Default required attributes #2817

Open

Description

@objecttothis

Background information

IMPORTANT: If you choose to ignore this issue report template, your issue will be closed as we cannot help without the requested information.

Please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:

  • Reporting an issue of an unmodified OSPOS installation
  • Checked open and closed issues and no similar issue was already reported (please make sure you searched!)
  • Read README, WHATS_NEW, INSTALL.md and UPGRADE
  • Read the FAQ for any known install and/or upgrade gotchas (in specific PHP extensions installed)
  • Read the wiki
  • Executed any database upgrade scripts if an upgrade pre 3.0.0 (e.g. database/2.4_to_3.0.sql)
  • Aware the installation code is in bintray (see README), and GitHub master is for developers only and therefore not complete nor stable

Installation information

OSPOS Installation Info: 3.3.2 - 9d2fd1

Language Code: en-US

Extensions & Modules:
» GD: Enabled ✓
» BC Math: Enabled ✓
» INTL: Enabled ✓
» OpenSSL: Enabled ✓
» MBString: Enabled ✓
» Curl: Enabled ✓

User Configuration:
.Browser: Firefox
.Server Software: Server
.PHP Version: 7.4.4
.DB Version: 5.7.29-log
.Server Port: 80
.OS: FreeBSD 11.3-RELEASE-p7

File Permissions:
» [application/logs:] - 0770 | Writable ✓
» [public/uploads:] - 0770 | Writable ✓
» [public/uploads/item_pics:] - 0770 | Writable ✓
» [import_customers.csv:] - 0640 | Not Writable ✗

New Feature

An optional checkbox in the /views/attributes/form.php which when checked will make that attribute automatically appear when editing or creating an Item. It will be marked as a required field. If not filled, the form will not submit.

Goal: This will require users of the application to enter attributes into the application that the administrator deems that every item must have when creating new items or editing legacy items that formerly did not have this enabled. This will also streamline the adding of attributes that users use every time since it will not require that users click the dropdown to find the attribute and then add it.

I will implement this feature, but I'm posting this here as an RFC on how it be implemented and to provide a space for objections. As per usual, the feature will not be enabled unless the administrator checks the box on the attribute form.php view to make that attribute a required attribute.

Activity

  1. self-assigned this
    on May 5, 2020
  2. added this to the 3.4.0 milestone on May 5, 2020
  3. objecttothis commented on May 5, 2020

    @objecttothis
    MemberAuthor

    One decision that needs to get made is how to best store the value in the database as to whether the attribute is required. The most straightforward from the database perspective is to add a column to the attribute_definitions table called "required" as a tinyint(1) which would give us our 0/1 boolean value, but perhaps there is a better way to store this that I'm not seeing.

  4. jekkos commented on May 6, 2020

    @jekkos
    Member

    tinyint(1) sounds good to me.

  5. modified the milestones: 3.4.0, 3.5.0 on Dec 10, 2022
  6. changed the title [-]Feature: Default Required Attributes[/-] [+][Feature]: Default required attributes[/+] on Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions