MantisBT: master eb533693

Author Committer Branch Timestamp Parent
vboctor master 2004-05-08 22:24 master 1c25fff3
Changeset

Enh 0003808: Ability to sponsor (fund) a bug or feature request.

This commit includes the implementation of the core support for issue sponsorships.

M bug_assign.php

  • Make sure that the current user can assign sponsored issues.
  • Make sure that the handler can handle sponsored issues.

A bug_set_sponsorship.php

  • All adding/deleting/updating of a sponsorship. Supports the case where the current user is the sponsor.

A bug_sponsorship_list_view_inc.php

  • The sponsorship section that is included in both simple/advanced view of the issues.

M bug_view_advanced_page.php
M bug_view_page.php

  • Included bug_sponsorship_list_view_inc.php

M bugnote_view_inc.php

  • Adjusted the check for bug_is_readonly()

M config_defaults_inc.php

  • New Config: enable_sponsorship (default OFF). Whether to enable/disable the whole issue sponsorship feature.
  • New Config: sponsorship_currency (default US$). Currency used for all sponsorships.
  • New Config: view_sponsorship_total_threshold (default VIEWER). Access level threshold needed to view the total sponsorship for an issue by all users.
  • New Config: view_sponsorship_details_threshold (default VIEWER). Access level threshold needed to view the users sponsoring an issue and the sponsorship amount for each.
  • New Config: sponsor_threshold (default REPORTER). Access level threshold needed to allow user to sponsor issues.
  • New Config: handle_sponsored_bugs_threshold (default DEVELOPER). Access level required to be able to handle sponsored issues.
  • New Config: assign_sponsored_bugs_threshold (default MANAGER). Access level required to be able to assign a sponsored issue to a user with access level greater or equal to 'handle_sponsored_bugs_threshold'.
  • New Config: minimum_sponsorship_amount (default 5). Minimum sponsorship amount. If the user enters a value less than this, an error will be prompted.
  • New Config: mantis_sponsorship_table (default mantis_sponsorship_table). Name of table containing issue sponsorship information.

M view_all_inc.php

  • Added sponsorship total column to view bugs page (if sponsorship is enabled).

M admin/upgrades/0_18_inc.php

  • Added 'mantis_sponsorship_table' table.
  • Added 'sponsorship_total' in 'mantis_bug_table' and added an index on it.

M core/bug_api.php

  • (bug_is_readonly): The return value was reversed.
  • (bug_delete): Delete all sponsorships associated with an issue when the issue is deleted.
  • Added support for 'sponsorship_total' field.

M core/constant_inc.php

  • Added constants for the implementation of sponsorships.

M core/email_api.php

  • (email_sponsorship_added): send notices when an issue is sponsored
  • (email_sponsorship_updated): send notices when a sponsorship is modified
  • (email_sponsorship_deleted): send notices when a sponsorship is deleted
  • (email_build_visible_bug_data): prepare visible data related to sponsorships.
  • (email_format_bug_message): include sponsorships information in message body if visible.

M core/history_api.php

  • (history_localize_item): Added support for BUG_ADD_SPONSORSHIP, BUG_UPDATE_SPONSORSHIP, and BUG_DELETE_SPONSORSHIP

M core/lang_api.php

  • (lang_get): print string name in the string not found error message.

A core/sponsorship_api.php

  • APIs for sponsorship support.

M core/user_api.php

  • (user_get_name): Small correction in function documentation.

M lang/strings_english.txt

  • All strings relating to sponsorship support.
  • Changed string for "string not found" to include the string name that is not found.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2517 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9

mod - core/user_api.php Diff File
mod - core/history_api.php Diff File
mod - core/constant_inc.php Diff File
mod - bug_assign.php Diff File
mod - admin/upgrades/0_18_inc.php Diff File
add - bug_sponsorship_list_view_inc.php Diff File
mod - lang/strings_english.txt Diff File
mod - bugnote_view_inc.php Diff File
mod - view_all_inc.php Diff File
mod - config_defaults_inc.php Diff File
add - bug_set_sponsorship.php Diff File
mod - doc/ChangeLog Diff File
mod - core/email_api.php Diff File
mod - bug_view_page.php Diff File
mod - bug_view_advanced_page.php Diff File
mod - core/bug_api.php Diff File
mod - core/lang_api.php Diff File
add - core/sponsorship_api.php Diff File