Flyspray - The bug killer!

  • Status Suspended
  • Percent Complete
    50%
  • Task Type Information
  • Category Backend/Core
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version 1.0-beta
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: Flyspray - The bug killer!
Opened by Anton - 27.09.2016
Last edited by peterdd - 29.09.2016

FS#2208 - Severity "medium" by default

Hi,
Where i can change severity and priority by default?
I want change severity to “Medium” by default for group Basic
I cant find this option in the Flyspray settings.

Project Manager
peterdd commented on 29.09.2016 18:55

I fear there is no Flyspray setting yet for configuring preselected defaults for severity and priority based on user permissions (global+project group).

Examples for Flyspray v1.0-rc1:

What you can do is modifying the themes/CleanFS/templates/newtask.tpl

and replace

<?php echo tpl_options($fs->severities, Req::val('task_severity', 2)); ?>

with

<?php echo tpl_options($fs->severities, Req::val('task_severity', 3)); ?>

Setting default values based on the calculated permissions based on the user's groups (global group + project group) is possible by enhancing the template, but it is not a Flyspray core feature.

A possible approach could be to check for a specific user permission, in this example I choose the 'manage_project' permission:

<?php
# project manager default 4='high severity', other users 3='medium severity'
$defaultseverity = $user->perms('manage_project') ? 4 : 3;
echo tpl_options($fs->severities, Req::val('task_severity', $defaultseverity)); ?>

Keep in mind that you loose such customizations of themes/CleanFS/templates/*.tpl when upgrading Flyspray.

Note for FS developers: There are some defaults too defined in includes/class.backend.php in function create_task() too, that are used when the submitted form or API request does not contain some properties.

And for the cases where create_task() doesn't set values for the SQL INSERT, the database table field defaults are used (0 for task_severity currently).

Anton commented on 29.09.2016 21:43

peterdd, Thank you for your help

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing