https://owasp.org/www-community/OWASP_Validation_Regex_Repository
common regexp use-cases
https://owasp.org/www-community/OWASP_Validation_Regex_Repository
common regexp use-cases
(note : this works with most version of JIRA available as of now, Janvier 2017)
Instead of staying in the current view, you can use the following tricks to make your JIRA SERVER / DATACENTER redirect directly to the recently created issue.
The trick here is to disable the "popup" with the create screen, hence going to the "full create screen" which opens the page afterward.
<script type= "text/javascript" > AJS.$( "#create_link" ).removeClass( "create-issue" ); $( "#announcement-banner" ).hide()</script> |
cf. : https://confluence.atlassian.com/jirakb/how-to-disable-create-issue-popup-300813780.html
The following plugin aims at the same :
Excerpt from the source :
AJS.$(document).on( 'DOMNodeInserted' , function (event) { if (event.target.id == 'aui-flag-container' ) { console.log( 'issue-quick-start: Got post-it note!' ); AJS.$(event.target).on( 'DOMNodeInserted' , function (event) { console.log( 'issue-quick-start: Post-it HTML: ' + event.target.innerHTML); var postItLink = AJS.$(event.target.innerHTML).find( 'a' ); var postItPath = postItLink.attr( 'href' ); if (postItPath && postItLink.attr( 'data-issue-key' )) { console.log( 'issue-quick-start: Going to new issue path ' + postItPath); window.location = postItPath; } }) } }); |
cf. https://scriptrunner.adaptavist.com/4.3.7/jira/fragments/WebItem.html#_redirects
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.label.LabelManager import com.atlassian.sal.api.ApplicationProperties import com.onresolve.scriptrunner.runner.ScriptRunnerImpl import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate import groovy.transform.BaseScript import javax.ws.rs.core.MultivaluedMap import javax.ws.rs.core.Response @BaseScript CustomEndpointDelegate delegate def labelManager = ComponentAccessor.getComponent(LabelManager) def applicationProperties = ScriptRunnerImpl.getOsgiService(ApplicationProperties) def issueManager = ComponentAccessor.getIssueManager() labelIssue(httpMethod: "GET" ) { MultivaluedMap queryParams -> def issueId = queryParams.getFirst( "issueId" ) as Long def issue = issueManager.getIssueObject(issueId) /** def label = labelManager.getLabels(issueId) if (! label) { labelManager.addLabel(null, issueId, "approved", false) } **/ Response.temporaryRedirect(URI.create( "${applicationProperties.baseUrl}/browse/${issue.key}" )).build() } |
var jsonDescriptionText= function(){/*
[
{
"cat": "Categ1",
"links": [
{
"txt": "text1",
"url": "http://url",
"title": "mouseover field"
}
]
}
]*/}.toString().slice(14,-3);
Note 1 :
This avoids using concatenation for each line :
var longString2="string part1" +
"string part2"or even escaping the new lines :
var longString2="string part1\
string part2"
var htmlString = `Say hello to
multi-line
strings!`;
"