mantisbt-plugins / Announce

Announcements plugin for MantisBT, lets privileged accounts create and post announcements that can be shown to users on a global or per-project basis, and allow users to dismiss individual messages.
MIT License
20 stars 14 forks source link

Possibility for more control over dismissability of banner #32

Open luzpaz opened 6 years ago

luzpaz commented 6 years ago

Currently at the top of the FreeCAD mantisbt we use the announce plugin (as an intrusive banner) to educate users how to open tickets. It's cut down immensely on crap tickets that are hastily opened and hopelessly incomplete. The problem is that users can dismiss this banner and then forget in the future to follow the directions. If we make the banner indissmissable, then all the power users are subject to this enormous banner taking up screen real-estate.

The ask: Would it be possible to create a rule that makes the banner indismissable to reporters, and dismissable to everyone with a higher permission ?

dregad commented 6 years ago

It would certainly be feasible to transform the "dismissable" flag to an access level. It would require a schema change and some UI adjustments.

That being said, based on your use-case description, I'm wondering whether the Announce plugin is really the right tool for the job though. It seems to me that a more targeted message, appearing only on the MantisBT bug report page, would be more appropriate.

luzpaz commented 6 years ago

That being said, based on your use-case description, I'm wondering whether the Announce plugin is really the right tool for the job though. It seems to me that a more targeted message, appearing only on the MantisBT bug report page, would be more appropriate.

Perhaps, but psychologically I want to prepare the user to know what it means to make a bug report. I don't want to, last minute, for the user to be surprised by what hoops we're asking them to jump through. That is why I'd rather have 'reporters' see it on every page of the bugtracker instead of just the bug reporting page

vboctor commented 6 years ago

@luzpaz I was thinking about the same feature, but the solution I had in mind was more inline with how Github solves this. Basically, to do be able to configure default values for description, additional info, and steps to reproduce. Such configs can be set globally via config/config_inc.php or on a per project basis. Such templates would apply to all access levels.

atrol commented 6 years ago

@vboctor for what you want, the Snippets plugin could be extended (e.g. additional propertyautofill_field for snippets + move global snippet settings to individual snippets)

vboctor commented 6 years ago

@atrol I think this is better handled in core, since it not a snippet and it would be consistent with ability for core to default other native fields.

luzpaz commented 6 years ago

@luzpaz I was thinking about the same feature, but the solution I had in mind was more inline with how Github solves this. Basically, to do be able to configure default values for description, additional info, and steps to reproduce. Such configs can be set globally via config/config_inc.php or on a per project basis. Such templates would apply to all access levels.

I think the config/config_inc.php method also makes sense. It would add another nice customization option for projects that would like to use this type of functionality.

vboctor commented 6 years ago

Turns out that steps to reproduce and additional info already supported defaulting. I have added support for defaulting description via the following PR:

https://github.com/mantisbt/mantisbt/pull/1320

luzpaz commented 6 years ago

Awesome. I look forward to testing this when it's merged. Any idea on the ETA ?

luzpaz commented 6 years ago

Great, it's been merged. Thank you. Just need to wait till the next mantis release to test it.

luzpaz commented 6 years ago

Running MantisBT 2.13.1 with most up to date Announce plugin.

Just tested it. I added an options for each role as per the screenshot: image

When I pressed 'Edit' to finalize i get this error:


APPLICATION ERROR #401

Database query failed. Error received from database was #1062: Duplicate entry '2-0-header' for key 'idx_plugin_announce_context' for the query: INSERT INTO mantis_plugin_Announce_context_table
(
message_id,
project_id,
location,
access,
ttl,
dismissable
) VALUES (
?,
?,
?,
?,
?,
?
).
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Edit:
This error also occurs when submitting more than 1 entry

dregad commented 6 years ago

This has obviously NOTHING to do with the feature requested here.

Please create a separate issue to track your problem instead of hijacking your own thread, and kindly include detailed steps to reproduce the problem. Thank you.

luzpaz commented 6 years ago

@dregad are you sure it has nothing to do with it?

dregad commented 6 years ago

Yes, I'm quite sure.

Just read the title and your initial post - you're requesting to enhance the Announce plugins to allow more control over dismissability of banner, which has not been implemented.

This is what this thread is about, despite some digression, as you discussed a feature in MantisBT core with vboctor.

Finally you report an issue that is not related to either subject...

I'm not saying there's no problem with Announce plugin, just that it is not related to the current thread, and asking you to create a separate issue for it.

luzpaz commented 6 years ago

@dregad Got it. Created a new ticket in https://github.com/mantisbt-plugins/Announce/issues/35