Search found 28 matches

by pollevr
21 Mar 2021, 13:39
Forum: Help
Topic: How to format a numeric custom field?
Replies: 1
Views: 90

Re: How to format a numeric custom field?

I found a solution, in bug_view_inv.php: # Custom Fields if( isset( $t_issue['custom_fields'] ) ) { foreach( $t_issue['custom_fields'] as $t_custom_field ) { $t_def = custom_field_get_definition( $t_custom_field['field']['id'] ); echo '<tr>'; echo '<th class="bug-custom-field category" col...
by pollevr
21 Mar 2021, 12:33
Forum: Help
Topic: How to format a numeric custom field?
Replies: 1
Views: 90

How to format a numeric custom field?

Hi all,
I created a numeric float custom field like this:
custom_field_config.png
custom_field_config.png (19.19 KiB) Viewed 90 times
My custom field was displayed like this:
custom_field_formatted.png
custom_field_formatted.png (3.07 KiB) Viewed 90 times
but I would print this custom filed on a custom format like this:
custom_field_orig.png
custom_field_orig.png (2.68 KiB) Viewed 90 times
How can I do it?

Thanks.
by pollevr
01 Aug 2020, 14:21
Forum: Help
Topic: How can use custom fields in search?
Replies: 5
Views: 1122

Re: How can use custom fields in search?

Thank you cas,

I intended that I can't search a value in the search box:
mantisbt-searchbox.png
mantisbt-searchbox.png (27.16 KiB) Viewed 1114 times
Why I can't find any value of custom fields?
How I can to do this?

Thank you, bye.
Cristian
by pollevr
01 Aug 2020, 13:34
Forum: Help
Topic: How can use custom fields in search?
Replies: 5
Views: 1122

How can use custom fields in search?

Hi all,

I'm using MantisBT v.2.24.1 and I can't search custom field value in search box.

Why this?

There is a way for use search for custom fields values?


Thank you, bye.
Cristian
by pollevr
01 Aug 2020, 12:23
Forum: General Plugin Discussion
Topic: Reminder plugin, doesn't show due date in filter fields
Replies: 2
Views: 1069

Reminder plugin, doesn't show due date in filter fields

Hi all,

how I can show due date field in the search filters box?
due date filter box
due date filter box
due_date_filter_box.png (35.51 KiB) Viewed 1069 times



Thank you, bye.
Cristian
by pollevr
11 Jul 2020, 16:50
Forum: General Plugin Discussion
Topic: Calculate value for custom field on updating issue
Replies: 6
Views: 2566

Re: Calculate value for custom field on updating issue

Found it!

For custom fields I call a new function for event EVENT_UPDATE_BUG, so the custom fields will save.

Thank you for your support.


Bye,
Cristian
by pollevr
11 Jul 2020, 16:03
Forum: General Plugin Discussion
Topic: Calculate value for custom field on updating issue
Replies: 6
Views: 2566

Re: Calculate value for custom field on updating issue

Hi Starbuck, now I understood, and my code is: function updateBugData( $p_event, $p_bug_data_updated, $p_bug_data_original ) { var_dump($p_event); //print the EVENT var_dump($p_bug_data_updated); //print the NEW data structure var_dump($p_bug_data_original); //print the ORIGINAL data structure ... r...
by pollevr
10 Jul 2020, 17:40
Forum: General Plugin Discussion
Topic: Calculate value for custom field on updating issue
Replies: 6
Views: 2566

Re: Calculate value for custom field on updating issue

Hi Starbuck, thanks for your patience. Your logical reasoning is correct, but my problem is technical. If my code is: function init() { plugin_event_hook( 'EVENT_UPDATE_BUG_DATA', 'updateBugData' ); } function updateBugData( $p_bug_data_updated, $p_bug_data_original ) { error_log("^^^original s...
by pollevr
09 Jul 2020, 15:43
Forum: General Plugin Discussion
Topic: Calculate value for custom field on updating issue
Replies: 6
Views: 2566

Re: Calculate value for custom field on updating issue

Sure,

so I'm expect that before it saves the record and after call my custom function update, so I get the old value and I can put the new value.

No?
by pollevr
30 Jun 2020, 11:55
Forum: General Plugin Discussion
Topic: Help for configuration parameter Reminder plugin
Replies: 1
Views: 1391

Help for configuration parameter Reminder plugin

Hi all, in Mantis 2.24.1 I'm trying Reminder 2.16 plugin. I need some explanation for setting correct parameter. If I set a gmail account sender: E-mail address of sender: <my_gmail_address> the result is a message security problem from Google: gmail-message.jpg If I set an other provide account sen...
by pollevr
30 Jun 2020, 08:26
Forum: Help
Topic: Calculate value for custom field on updating issue
Replies: 4
Views: 1390

Re: Calculate value for custom field on updating issue

I found it:

Code: Select all

function update( $p_issue_id, $p_bug_data, $p_bugnote_text ) {...}
$p_issue_id = EVENT_UPDATE_BUG
$p_bug_data = <my_id_issue_that_I_updated>

Thank you,
Cristian
by pollevr
30 Jun 2020, 07:22
Forum: Help
Topic: Calculate value for custom field on updating issue
Replies: 4
Views: 1390

Re: Calculate value for custom field on updating issue

Hi atrol, I took a small step forward. Now my code is: function init() { plugin_event_hook( 'EVENT_UPDATE_BUG', 'update' ); } function update( $p_issue_id, $p_bug_data, $p_bugnote_text ) { $t_id = custom_field_get_id_from_name('<my_custom_field_name'); //custom_field_set_value( $t_id , $p_issue_id, ...
by pollevr
30 Jun 2020, 06:45
Forum: Help
Topic: Calculate value for custom field on updating issue
Replies: 4
Views: 1390

Re: Calculate value for custom field on updating issue

Hi atrol, thank you for your suggestion, but unfortunately doesn't work. I don't understand the difference between your an my code. my code: function hooks(){ return array( 'EVENT_MYPLUGIN_UPDATE' => 'update', ); } function events() { return array( 'EVENT_MYPLUGIN_UPDATE' => EVENT_UPDATE_BUG, ); } f...
by pollevr
29 Jun 2020, 20:02
Forum: General Plugin Discussion
Topic: Calculate value for custom field on updating issue
Replies: 6
Views: 2566

Calculate value for custom field on updating issue

Hi all, in Mantis v. 2.24.1 I'm trying to write a plugin for setting a value calculated automatically, based on the values of other fields or custom fields. In my plugin there are following code: class MyPluginPlugin extends MantisPlugin { function register() { ... } function hooks(){ return array( ...