View Issue Details

IDProjectCategoryView StatusLast Update
0009268mantisbtrsspublic2019-12-13 18:06
Reporterswellnuts Assigned Todregad  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Summary0009268: When RSS feeds are sorted on last_update, is it possible to tell what has changed?

I use the issues RSS feed to keep track of my development team. The feed is currently sorted on last_update.
This means that when (for example) a bug_note is added, the related bug is at the top of the list. However, it is not possible to tell from the feed why the bug is now at the top of the list. It could be a bug-note, a status change, a re-assignment, anything.

I'd like to know how the bug was recently updated, like an activity report.



related to 0005502 closedvboctor Implement an RSS feed for issues 
related to 0003893 closedvboctor Aggregate not only site news, but also changes in issues into RSS-Feed 




2008-06-15 22:20

reporter   ~0018097

Last edited: 2008-06-15 22:36

This is related to bug 0005502 and 0003893



2008-07-15 11:28

manager   ~0018549

It seems like email notifications are more suitable to the scenario you are mentioning. With RSS you may have an issue come to the top of the list due to more than one action, where the last is least important. However, with email notifications you will get an email per action.



2008-07-15 22:23

reporter   ~0018576

Actually, since I raised that bug, I've become more comfortable with the code, and I've made the change myself.

I added to config_inc.php
$g_rss_days_of_history = '5'

And to history_api.php:


# Returns an HTML string containing the last n days of bug history in reverse date order
function history_get_history_string( $p_bug_id, $p_days, $p_user_id = null) {
    $t_bug_history = history_get_events_array( $p_bug_id, $p_days, $p_user_id );

    # get current date/time and modify to represent midnight last night
    $t_now = getdate();
    if( $t_now['mday'] <= $p_days ) {
        $t_now['mon'] --;
        $t_now['mday'] = cal_days_in_month(CAL_GREGORIAN , $t_now['mon'], $t_now['year']);
    else {
        $t_now['mday'] -= $p_days;
    # now turn that into a unix timestamp
    $t_cutoff = mktime  ( 0, 0, 0, $t_now['mon'], $t_now['mday'], $t_now['year'] );

    $t_history_string = &quot;<br><br><b>Activity for last $p_days days:</b>&lt;table border=1>&quot;;
    foreach ( array_reverse($t_bug_history) as $t_item ) {
        $t_history_date = strtotime($t_item['date']);

        if($t_history_date &lt; $t_cutoff) {

        $t_history_string .= &quot;&lt;tr>&quot;;
        $t_history_string .= &quot;&lt;td>&quot; . $t_item['date'] . &quot;&lt;/td>&quot;;
        $t_history_string .= &quot;&lt;td>&quot; . $t_item['username'] . &quot;&lt;/td>&quot;;
        $t_history_string .= &quot;&lt;td>&quot; . $t_item['note'] . &quot;&lt;/td>&quot;;
        $t_history_string .= &quot;&lt;td>&quot; . $t_item['change'] . &quot;&lt;/td>&quot;;
        $t_history_string .= &quot;&lt;/tr>&quot;;
    $t_history_string .= &quot;&lt;/table>&quot;;
    return $t_history_string;

And to issues_rss.php:
$t_days_of_history = config_get( 'rss_days_of_history' );
$description = string_rss_links( $t_bug->description
. (history_get_history_string( $row['id'], $t_days_of_history)));

And it works a treat. Really, all I wanted was to know what had caused the bug to be included in the RSS feed, without having to open the bug link in the browser.

As an aside, I'd be happy to contribute this code somewhere, but I'm not sure how...



2008-07-19 11:07

reporter   ~0018616

this is exactly the reason why mantisbot on the IRC channel sometimes looks on crack...

anyway, we have some documentation for contributing patches here:



2019-12-03 10:25

developer   ~0063182

I think this requirement is covered by the Timeline feature, introduced in 1.3, so I'm resolving this issue as "no change required".

Feel free to reopen the issue if you disagree.

Issue History

Date Modified Username Field Change
2008-06-15 22:18 swellnuts New Issue
2008-06-15 22:20 swellnuts Note Added: 0018097
2008-06-15 22:36 swellnuts Note Edited: 0018097
2008-07-15 11:25 vboctor Relationship added related to 0005502
2008-07-15 11:25 vboctor Relationship added related to 0003893
2008-07-15 11:28 vboctor Note Added: 0018549
2008-07-15 11:28 vboctor Status new => feedback
2008-07-15 22:23 swellnuts Note Added: 0018576
2008-07-16 01:45 vboctor Tag Attached: patch
2008-07-19 11:07 giallu Note Added: 0018616
2019-12-03 10:25 dregad Assigned To => dregad
2019-12-03 10:25 dregad Status feedback => resolved
2019-12-03 10:25 dregad Resolution open => no change required
2019-12-03 10:25 dregad Note Added: 0063182
2019-12-13 18:06 atrol Status resolved => closed