Comments
-
Can you describe what you're trying to do here? Is it notify when an issue is added or removed from the active sprint?
-
you could try upgrading it and see if that fixes it, you're on a very old version...
-
That's all true, but your first example can be replaced with the following for simplicity (groovy truth): cfValues['selectlist1']?.value
-
please use the right tags (I did it) or you won't get answers.
-
No, it evaluates it on the edited values of all fields. You don't need to specify a field, if you leave the field blank the error message will go at the top, but selecting the field only determines where the error message if any is shown, nothing else. I think the problem is the fields are probably select lists or radio…
-
Agreed... use your real name if this is kosher.
-
It's not public anymore, but you get the source file from the jar... open it with winzip or winrar or something.
-
It's actually very simple to add something to jira's email queue. The sample code you need is here: https://bitbucket.org/jamieechlin/scriptrunner-public/src/be2bcb817137/src/main/resources/com/onresolve/jira/groovy/canned/workflow/postfunctions/SendCustomEmail.groovy#cl-241 I could pull out the relevant bits but I think…
-
They're not one website but they appear to be because of the navigation bar and cross-product search etc. Unfortunately they won't release that code.
-
This question is a bit meandering. Are you able to reproduce a problem with a simple behaviour? If so can you post it.When you disable behaviours the problem goes away?What are the versions of jira and the plugin?
-
yeah jjupin livefields I think.
-
Cheers Nic. Note there was a problem where the value of checkbox fields could be cleared if there was a behaviour on them, but that was the only field with that problem. That's fixed in 3.0.x of Script Runner (the plugins have been merged).
-
There are other ways... you could just include a link to the CreateIssue page which hard-wires a project and whatever other fields you want. But the issue collector is the sexiest way.
-
Use the jira issue collector... the javascript it requires you can put in a space include that is on every page.
-
If you click on the Edit link by the behaviour, it will show you the behaviour as XML. You can paste that in to a new behaviour on the other system. But take care with custom field IDs.
-
No, it's not part of any workflow... the same behaviour can be used across multiple different projects and workflows, which is quite a common use case. Although it's often related to a workflow, it doesn't have to be. The configuration is stored in the general morass of jira's database... so it's there if you do…
-
It's not around anywhere else, they removed it because they said it wasn't used much. BTW, when they say things like this it's based on metrics from AOD, which have very different user patterns from the hosted instances. I agree with you, I used it a lot and miss it.
-
AFAIK this needs to be first in the list of post-functions. Does it work as expected if it's first? See the red callout in the docn: https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-SetIssueSecurity
-
Depends what you want it for. If you want to query on it you can write a JQL function. If reporting maybe a dashboard gadget. Why is such a field useful?
-
import org.joda.time.Daysimport org.joda.time.LocalDateint days = Days.daysBetween(LocalDate.fromDateFields(issue.getCreated()), LocalDate.fromDateFields(new Date())).getDays() but calculated field are not good for temporal data - the value is only reindexed when the issue is updated, which means you can't query on them…
-
I would not use this to drive the board... but it worked fine for me when used as a quick filter.We'll really need the debug logging to get any further, but you'd do well to upgrade.
-
Good question... can you add version information for everything. That query can definitely be made faster I think, although if it's 2s it should be 2s in greenhopper. Bumping up the logging: https://jamieechlin.atlassian.net/wiki/display/GRV/Getting%20Help#GettingHelp-Supportrequests - and rerunning will show if it's being…
-
Simplest thing is just to add multiple post-functions.
-
If you're using the "create subtask" built-in script from Script Runner, in the "additional issue actions" block.
-
Can you mark at least one answer as accepted. It's also nice to vote up and "like comments" for the ones you found helpful.
-
Did you change the string "CustomField" in the example code? Add some logging so you can see what exactly is null...
-
The script above seems to use gmail, but you're saying that does work? And it only does not work when using some other smtp server? Anyway, there must be something in the logs. Your .printStackTrace will print the stack trace to the console, which might go to catalina.out or something. Use log.error ("some error", ex) to…
-
my example is missing a quote. I didn't test it, you need to check that braces and quotes etc align. <% if (cfValues['Other Reason'] == 'Other') { out << "value is ${cfValues['Other Reason']}" } else { out << "test" }%>
-
123<% if (cfValues['Other Reason'] == 'Other' { %>value is ${cfValues['Other Reason']} } %> <% else {%> test } %> Yeah, I don't think you can write it like that, it's unreadable apart from anything else. There seem to be two closing %> on the last line, and no closing ) on the 1st line. Try writing it like: <% if…
-
I know what AUI stands for, but I don't know what you mean still. Let's forget about an AUI. It sounds like what you want to do is add a javascript resource, and bind the click handler for that link to creating a dialog pane. Have a look at the js here: https://docs.atlassian.com/aui/latest/docs/dialog.html