Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:01

    translatewiki on master

    Localisation updates from https… (compare)

  • Mar 02 08:58
    dregad synchronize #1744
  • Mar 02 08:53

    dregad on master

    Fix missing language string 'ed… (compare)

  • Mar 01 17:31
    dregad assigned #1744
  • Mar 01 17:30
    dregad opened #1744
  • Mar 01 13:46

    translatewiki on master

    Localisation updates from https… (compare)

  • Feb 27 00:14

    dregad on master

    Doc: improve Dev Guide Plugins … (compare)

  • Feb 25 15:20

    translatewiki on master

    Localisation updates from https… (compare)

  • Feb 24 05:34
    vboctor synchronize #1743
  • Feb 24 05:34

    vboctor on gitpod-setup

    Open browser once port 8000 is … (compare)

  • Feb 24 05:18
    vboctor synchronize #1743
  • Feb 24 05:18

    vboctor on gitpod-setup

    Add tags Update test seed data to match … (compare)

  • Feb 24 05:05
    vboctor synchronize #1743
  • Feb 24 05:05

    vboctor on gitpod-setup

    Add 3 project versions for test… (compare)

  • Feb 24 04:54
    vboctor synchronize #1743
  • Feb 24 04:54

    vboctor on gitpod-setup

    Remove Welcome message Fix syntax error with setup-db.… (compare)

  • Feb 24 04:46
    vboctor synchronize #1743
  • Feb 24 04:46

    vboctor on gitpod-setup

    Add test.sh and setup-db.sh scr… (compare)

  • Feb 24 04:17
    vboctor synchronize #1743
  • Feb 24 04:17

    vboctor on gitpod-setup

    Wait for MySQL to be ready (compare)

Damien Regad
@dregad
Of course, running composer install would fix the problem.
andrerosamatos
@andrerosamatos
Hi, I have a question (probabily very dumb btw) how do I use https://github.com/mantisbt-plugins/Snippets ?
Damien Regad
@dregad
@andrerosamatos did you read https://github.com/mantisbt-plugins/Snippets#usage if something is not clear please ask specific questions.
Albert ARIBAUD
@aaribaud
Hello, I have the following need: allow some users to specify another user as the reporter when they create a bug, but also record who actually created the bug, in order to use it later in custom database queries. My first idea would be to modify the https://github.com/mantisbt-plugins/CustomReporter plugin so that it keeps track of actual bug authors. Now there are two main approaches to this idea: either manage a separate bug author table with two columns (bug and author IDs), or add an 'author_id' column to the bug table. Which would be preferrable?
Damien Regad
@dregad
Considering that plugins can't alter Mantis core tables, the best would probably be to create a plugin table to store author information.
CasN
@CasN
Alternative could be to add an entry into the history table, no changes to core, only add recording of history record when changing reporter.
zewar96
@zewar96
I am attempting to create a process that exports from my current ticket system to I can import it in to mantis. I have used the spec to create the XML file appropriately and that works just fine. I have thousands of tickets w/ attachments and I am trying to find a good way to get that imported in to mantis in an automated fashion. Is there a way i can automate the import process? I have played with using a script that will do http POST calls, but by having to authenticate, have session and header/cookie information, it's a royal PITA. I was wondering if there would be a way i could put the XML generated files on the mantis box and run something from the server to import those files by somehow calling the PHP to get them to import. I know it's a longshot because the import page ruins things by making you use project_id as a Posted field rather than doing something in the spec itself.
Damien Regad
@dregad
Not sure what spec you are referring to and what this XML file is, but anyway if you need to import issues you can try to use the XmlImportExport plugin (although TBH I have not used that for over 10 years so don't ask me for details). Alternatively if you are familiar with scripting, I would recommend you use the REST API rather than trying to go through the GUI via POST requests.
Damien Regad
@dregad

MantisBT 2.24.3 has just been released

This is a security release fixing 6 security issues including 3 CVEs. https://mantisbt.org/blog/archives/mantisbt/670
JoseFx
@JosefxUnis
Hello, I would like to ask why there is no event in bug_report.php so user can alter bug´s data before it is added to the database. There is one if the report is being updated.
JoseFx
@JosefxUnis
Ok, I found out there is EVENT_REPORT_BUG, but it is called after the bug´s data are inserted into database inside the IssueAddCommand execute method . Can you consider adding event before the command is executed and data are not in database yet ?
Torsten Kuehnel
@tdkuehnel
image.png
The error affects several parts of the site, the forum as well.
Damien Regad
@dregad
Yes we are aware. For the past few weeks we've been under recurring DOS attacks. Server usually goes down for a few minutes and then comes back, please try again in a few minutes
andrerosamatos
@andrerosamatos
Hello, is there a way to add the snippets plugin in the summary field?
image.png
I was able to add the option on the manage plugins by altering the Snippets.API.php
image.png
The last one in this pic is summary
But the snippet don't appear in the summary field when creating a task
Damien Regad
@dregad
I have not looked at this code for a long time, but as I recall the Javascript enables the snippets selection list only for textarea
andrerosamatos
@andrerosamatos
Isn't the summary an textarea?
Damien Regad
@dregad

MantisBT 2.24.4 has been released

Security and maintenance release, addressing 6 CVEs (XSS, SQL injection and several information disclosure issues including a critical one). Also includes a few PHP 8.0 compatibility fixes. https://mantisbt.org/blog/archives/mantisbt/675
Damien Regad
@dregad

Announcing end of PHP 5 support

The upcoming MantisBT 2.25.0 release will be the last one supporting PHP 5; starting with MantisBT 2.26.0, the minimum PHP version will be 7.0.
https://mantisbt.org/blog/archives/mantisbt/678
dregad
@dregad:matrix.org
[m]
Test posting from Element
madlittlemods (Eric Eastwood)
@madlittlemods:matrix.org
[m]
👋
Albert ARIBAUD
@aaribaud
Hello, I have the same need as described in https://www.mantisbt.org/bugs/view.php?id=12602#c40973, that is: have a custom date "resolution date" field which is kept hidden until resolving the ticket, at which point the field is displayed and mandatory and should be pre-filled with the current date. As stated in the issue I am linking, mantisbt does not behave this way: "{today}" only works on ticket creation, not in later state transitions. So my question is: how do I best go about getting this field to work as I intend it to?
Albert ARIBAUD
@aaribaud

After some testing with ticket workflow and digging in the database, I get to the following conclusions:

  1. if a custom date field has a default value and is configured to be shown on issue creation, then it is set to its default value;
  2. if a custom date field has a default value but is not configured to be shown on issue creation, then it is left unset (the default value is not applied);
  3. if a custom date field is unset but must be displayed when e.g. updating the issue, then the field is displayed empty, and if left unchanged, will remain unset;
  4. if a custom date field is required, then the user must set the field to some valid date in order for the issue update to be allowed.

The combination of the above results in the following: if an unset custom date field (due to 2) must be displayed and is required, then it will be displayed empty (due to 3) but that empty value won't be allowed (due to 4). In that precise case, I think it would make sense to apply the default value regardless of the ticket state, before displaying the field.

I am of course willing to provide a patch.

Opinions / comments welcome.

Albert ARIBAUD
@aaribaud
Patch provided as a pull request: mantisbt/mantisbt#1734
Albert ARIBAUD
@aaribaud
Issue opened at https://mantisbt.org/bugs/view.php?id=27914 at @dregad:matrix.org request
Dev-Craftsman
@Dev-Craftsman
Hello,
I am using the bugnote_add () function. For the parameter $p bugnote_text I want to insert html content. But the result in Mantis is often bad, because it uses a special Markdown syntax.
Is there a conversion function (HTML to Markdown) in the API for this use case?
Dev-Craftsman
@Dev-Craftsman
The conversion in the other direction (Markdown to HTML) is also interesting for me.
Damien Regad
@dregad
@Dev-Craftsman you are not giving any context to your intended use of bugnote_add(), but you should probably be using IssueNoteAddCommand instead.
That being said, this should not make any difference in terms of how HTML is rendered. bugnote_add() (as well as the Command) just care about storing the bugnote, whatever its content is
So your problem is with the rendering of the note, which is covered by the MantisCoreFormatting plugin; you can disable the MarkDown processing in the plugin's options
And to answer your question, the API does not, and will not as it IMO does not need to, provide functions to convert HTML to or from MarkDown.
Damien Regad
@dregad
Also consider that (with Markdown disabled only, IIRC), just a limited set of HTML tags would be processed (this is configurable) - see $g_html_valid_tags and $g_html_valid_tags_single_line
Dev-Craftsman
@Dev-Craftsman
@dregad Thank you very much for your fast answer. I will try to test the option with adaption of configuration of MantisCoreFormatting and use of IssueNoteAddCommand. 👍