Comments
-
It's not straightforward, if you have script runner you can use: issueFunction in issueFieldMatch("project = JRA" , "summary", "UN-\\d*") See https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-issueFieldMatch(subquery,fieldname,regexp)
-
The way Answers works is that people ask questions, not post requirements and expect someone to knock it out for you. But let's put that down to language or cultural differences. It sounds like you want a post-function on Create, that should check for links of a specific type. Impediment is just a custom field type, which…
-
You can't get attachments like this, because they are not available to the attachment manager until the transition has completed. IIRC you will need to check the current HttpRequest, which I don't have the code for off the top of my head.
-
I don't think it is, but there was a question about this previously here. If you have a look at cwd_user table it might be obvious. You could try atlassian support...
-
It will put them in the internal directory if it can't find them in LDAP, using the parameters defined in your osuser.xml. Does that account for the 1/4? The only way to move users between directories at the moment appears to be with using the API, or db hacking. Also you seem to have a missing twelth...
-
Both of those values are milliseconds, so you can just sum them Subtasks is just iterating each subtask and adding. Getting structure sub-issues is more complex, there is an example of how to query structures…
-
To make the another field mandatory if components has Policyt it would be:! issue.components.name.contains('Policy') || cfValues["Some other field"]The field name in the form is just where the message is shown, it has no bearing other than that. There are several examples here that should help:…
-
Can you paste the full script or attach a screenshot?
-
What i said below is correct, brackets make no difference for the example above, however with the code in the question they may well make a logical difference. If you're not sure whether to use brackets, use them.
-
It should be issue.components*.name.contains('...') because Issue.getComponents returns a Collection. Note the * - the spread-dot operator. This calls getName on every element in the collection, returning a List. Whether you use brackets or not as in Wolfgang's answer makes no odds, they're optional in groovy unless they…
-
The transition will happen... you can test this by adding a post-function that just has: Thread.sleep(60_000) The UI will timeout though, you get a message like "we don't know the result of the transition". This is not specific to script runner scripts, any post-function that runs too long can do this. > Also, is there a…
-
Yes, write it using any(<closure>). I don't see any obvious reason why the original code is not working, but if you do it like Henning suggests it will be a lot more succinct and more obvious if there is a bug.
-
You're pinging from the server right? Seems odd that you can ping them, unless you're doing this from home. Anyway, can you look in your system info page for properties like http.proxyHost, perhaps you are pointing to a bad proxy (which is set in your setenv.sh or in the environment).
-
cool, looks proper...
-
> ScriptRunner's example code use of directly accessing values such as "issue.id" and "it.statusObject.name" instead of using accessor methods to get these values It's proper, it's the groovy way... I did a quick google and found this which sums it up quite nicely:…
-
I have code floating around that will create new drafts of every workflow and make some change, and then publish them, but I don't really recommend that approach unless you're pretty confident. You could also update the descriptor column of the jiraworkflows table... and then restart. That might be ok if you have two or…
-
Take a look at https://studio.plugins.atlassian.com/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Sendacustomemail - use it as a listener, then for you condition you can do "cfValues["MyCheckBox"]" You don't need to write any code...
-
Why would you want that? You can get it via screenscraping... jquery or xpath expressions.
-
You can't do this in JQL. ScriptRunner has issueFieldMatch, which you can use like this: issueFunction in issueFieldMatch("", summary, "\\[QC TASK\\].*") The first parameter is a JQL function to narrow down the issues where the regex will be run on the summary field.
-
I cannot think if an easy way to do it with Script Runner JQL functions. I want to be able to do: issueFunction in expression("issuetype in subTaskIssueTypes()", "updated > parentObject.updated") but that doesn't work. I created an issue because this has come up before: https://jamieechlin.atlassian.net/browse/GRV-587 You…
-
Hrm... an intermittent problem is going to be hard to solve. All I can say is, if you can, upgrade both jira and the plugin.
-
CR - it depends on the type of user directory. If it's delegated with the checkbox "copy user on first logon" checked then yes, they need to log in first. If it's a synchronising directory then when the sync runs you will be able to see the user and add them to groups. So to clarify, what type of directory is your ldap in…
-
NB - you don't have to do it like the code Rambanam posted - both ways are valid, and both will produce the same result.
-
Oh, and REST api ;-) Certain external plugins are going to be broken, eg jira client, mylyn, ecliptic, etc etc. I agree that it is good for a no-code solution... just seems like it could be better.
-
Curious if you actually use this pattern? Sounds like massive annoyance for users, just to avoid an issue that happens only once in a blue moon. Also you need some kind of service to clear the "lock", because presumably people will forget to hit the "end editing" action. And what about the SOAP API, people need to manage…
-
There are a few surveying plugins for confluence from the simple and cheap to complex and commercial. You could create a confluence page per issue and have users vote using confluence. Jira's voting is too simplistic for what you are after.
-
Exactly. And the other way, you do stuff with jira down, while explaining to people what's going on and when they can expect it back.
-
The Apache way might not be the easiest to implement but it's by far the best. Removing global permissions will lead to permission denied error messages and disconcerted users.
-
Yeah sorry, so it turns out this not that simple, I created GRV-511. Normally I would say you just the additional code section to unset the labels like: import com.atlassian.jira.issue.MutableIssue issue.setLabels([] as Set) unfortunately that doesn't work in this case. You could try adding a post-function to the workflow…
-
Thanks Colin. If Atlassian is listening this really blows. Internally the Atlassian stack may go up against Github FI, and it's not going to look good at all imho.