Skip to content

Instantly share code, notes, and snippets.

@pkordylewski
Last active November 22, 2017 08:33
Show Gist options
  • Save pkordylewski/0eb648c9ea3bfaef71defa4bc001400b to your computer and use it in GitHub Desktop.
Save pkordylewski/0eb648c9ea3bfaef71defa4bc001400b to your computer and use it in GitHub Desktop.
Userscript / Redmine Commit Title for Copy
// ==UserScript==
// @name Redmine Title Copy for Commit
// @version 0.1
// @include https://kunden.redmine.imos.net/*
// @include https://intern.redmine.imos.net/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js
// @grant none
// ==/UserScript==
var usJQ = $.noConflict(true);
if (usJQ('body.controller-issues.action-show').length) {
var mainTitle = usJQ('body.controller-issues.action-show h2:first').text();
var subTitle = usJQ('body.controller-issues.action-show div.subject h3:first').text();
usJQ('#update form div.box').append('<fieldset><legend>Redmine Title Copy for Commit</legend><pre>' + mainTitle + ' - ' + subTitle + '</pre></fieldset>');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment