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?
Description

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.

Tagspatch

Relationships

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 

Activities

swellnuts

swellnuts

2008-06-15 22:20

reporter   ~0018097

Last edited: 2008-06-15 22:36

This is related to bug 0005502 and 0003893

vboctor

vboctor

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.

swellnuts

swellnuts

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 = "<br><br><b>Activity for last $p_days days:</b><table border=1>";
    foreach ( array_reverse($t_bug_history) as $t_item ) {
        $t_history_date = strtotime($t_item['date']);

        if($t_history_date < $t_cutoff) {
            continue;
        }

        $t_history_string .= "<tr>";
        $t_history_string .= "<td>" . $t_item['date'] . "</td>";
        $t_history_string .= "<td>" . $t_item['username'] . "</td>";
        $t_history_string .= "<td>" . $t_item['note'] . "</td>";
        $t_history_string .= "<td>" . $t_item['change'] . "</td>";
        $t_history_string .= "</tr>";
    }
    $t_history_string .= "</table>";
    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...

giallu

giallu

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:
http://www.mantisbt.org/wiki/doku.php/mantisbt:howto_submit_patches

dregad

dregad

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.