Forums » Development »
Ability to highlight updated issues?
Added by Jacky Ho about 8 years ago
Hi,
I would like the issues to be highlight up after updated, the highlight will be live within 24 hours then return to normal state.
See my attached picture.
In the picture mention that if the updated date time equal the current date => issue will be highlighted as red color, after 24 hours issue will be returned to normal state as white color.
May anybody help me?
highlight.png (21.3 KB) highlight.png |
Replies (2)
How about jQuery and View Customize Plugin? - Added by Akiko Takano about 8 years ago
Hello.
I think you can do above request with using jQuery.
// I’m sorry this may be not elegant example....
$(function() {
const HOURS_AS_LATEST = 24;
var updates = $('tr.issue td.updated_on');
var today = new Date();
var diff = 60*60*1000*HOURS_AS_LATEST;
updates.each(function(i,issue) {
var t = new Date($(issue).text());
var msDiff = today - t;
if (msDiff <= diff) {
$(issue).parent().css('background-color', '#ffa0a0');
}
}
);
});
Please NOTE:
Please note if you try above approach, date format needs follow IETF RFC 2822 Date and Time Specification. If date format you use is different format, date parse function might not work correctly. When following ISO 8601, some browser such as IE also does not work correctly.
I recommend you to use View Customize plugin, if you could install additional plugin :)
This plugin allows you to customize the view for the Redmine, with using additional css / JavaScript.
To define additional css / Javascript, you don't have to edit Redmine’s CSS or JS files on filesystem directly.
You can input and register them from Administration Web form.
- https://redmine.org/plugins/redmine_view_customize
- https://github.com/onozaty/redmine-view-customize
Followings are sample screenshots.
I hope this would be any help.
viewcustomize.png (97.8 KB) viewcustomize.png | Administration screen on ViewCustomize Plugin | ||
applied-jquery.png (86.5 KB) applied-jquery.png | Sample issues list |
RE: Ability to highlight updated issues? - Added by Matthew Paul about 6 years ago
I really like this unread_issues plugin. Every user has their own 'view' of the issues as follows -
green - new issue
blue - updated issue