Flyspray - The bug killer!

  • Status New
  • Percent Complete
    10%
  • Task Type Feature Request
  • Category User Interface
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version 1.0-rc
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: Flyspray - The bug killer!
Opened by Dominik Meyer - 07.12.2016
Last edited by peterdd - 07.05.2019

FS#2322 - Mention System

Hello together,

it would be nice, if you could mention user in your ticket or comment which are not following the task.
for example when i will type @nickname, the user “nickname” should be get a e-mail that he is mentioned in the ticket.

(if we are “fancy” then we can print a automcomplete after the @-sign ist typed)

Admin
peterdd commented on 07.12.2016 23:36

Mmh, there is the Notifications tab where you can add a user as listener to a task.

An implementation of this feature require implementation for both dokuwiki and HTML/CKeditor syntax.

How do you want avoid misusage of that feature (spamming users for instance)
–> use of an existing permissions?

The autocomplete feature could use the same as the current autocompleter used in Flyspay + a javascript listener that reacts whenever the typing starts with a '@' or

\s+@

(regular expression) is typed (like in github.com)

If a user is mentioned in a task or comment, should that user be added to the notification list if he is not yet there?

That would mean:

  • For dokuwiki description/comment must be parsed when saving serverside, not only on output.
  • For HTML/CKeditor the HTMLpurifier configuration must be used or extended (avail since FS 1.0-rc4)

Before implementing, the Flyspray notification system should be reviewed. So probably not before FS1.1

Dominik Meyer commented on 08.12.2016 08:07
If a user is mentioned in a task or comment, should that user be added to the notification list if he is not yet there?

hm when i compare it to other systems, then a mention would not add him to the notification list. i think it is the decision of the user to go to the list. or when the user want this user explicit in this list. i would only send him one notification when he is added to a task or a comment.
when the task/comment will be edit he dont get a e-mail.

something pseudo code like this:

if($aclAllowMentions) {
foreach(preg_match($userFromRegex == REGEX \s+@, $_POST['xyz'])  {
   $hasMention = (bool)$db->select('SELECT ID from ticket/comment where ID = $ticketID AND content LIKE "%@.$userFromRegex%"');
 
  if(!$hasMention) {
     notify::send('you go mentionted by user xyz in ticket/coment xyz (content preview)';
  }
}
}

the dokuwiki/HTML/CKeditor can we do in a second step.

(if you want i can implement it)

Project Manager
peterdd commented on 07.05.2019 04:14

At least added now a mention plugin for Flyspray dokuwiki syntax that turns @username into a link to user profile. ( https://github.com/Flyspray/flyspray/tree/mentionlink )

Maybe a starting point.

Project Manager
peterdd commented on 07.05.2019 04:44

Having a mention notification system requires tracking it in db tables, so whenever a comment or task is edited again, only new first time mentioned users of that task/comment are notified, right?

<table name="mention_user_task">
  <field name="user_id" type="I"><NOTNULL/></field>
  <field name="task_id" type="I"><NOTNULL/></field>
  <field name="created" type="T or D"></field>
  <field name="notified" type="T or D"></field>
  <index name="mention_user_task">
    <UNIQUE/>
    <col>user_id</col>
    <col>task_id</col>
  </index>
</table>
<table name="mention_user_comment">
  <field name="user_id" type="I"><NOTNULL/></field>
  <field name="comment_id" type="I"><NOTNULL/></field>
  <field name="created" type="T or D"></field>
  <field name="notified" type="T or D"></field>
  <index name="mention_user_comment">
    <UNIQUE/>
    <col>user_id</col>
    <col>comment_id</col>
  </index>
</table>

Maybe the datetime fields are not needed, just thought of a user had disabled mention notifications, then enables mention notification again, then a summary of time between last received mentions and now could be received. (meanwhile you were mentioned 1234 times in task and comments since you disabled notifications .. lol, or a list of tasks)

Project Manager
peterdd commented on 09.05.2019 14:55

One more thing: How to handle (or prevent?) username retaken by other user after a user deleted himself or was deleted by admin?

Example

  • 2019 someone registers with username usera. This user had activity in the system and also some mentions of that users made by other users.
  • 2020 that user deleted his account or admin deleted the account.
  • 2021 another user tries to register with that username usera (usera username is not in user table anymore). Suddenly this new user would inherit the mentions of that deleted user.

What solutions are possible?

  • Keep a list of all deleted usernames. They are also checked by register form validations in addition to user table entries.
  • Only keep a list of all deleted usernames who have a mention in task description or comment text or any other dokuwiki syntax powered text fields.
  • Do not care about it. (Not a bug, it's a feature.)

Currently it is intentional not possible in the user interface to change a username. But as the username is stored only in user table, it would be simple to change with an sql query and everything is fine again. (unique field)

With the introduction of a mention link system this would be harder. It would mean not only to change username in user table, but also replace every mention of that username in all tasks and comments. As there should be no replacements in code section of task descriptions/comments or similiar portions, this cannot be done by simple search&replace in the database, but requires using of dokuwiki parser when dokuwiki is in use.

Another also complex way would be replacing

@username

with something like

[@userid]

(just idea example) when saving task/comment, because userid is unique regardless if user get deleted and reregister with same username.
And on output or edit it is replaced back to its

@username

form or when user not exist anymore … na forget that idea.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing