Comments
-
I think you just want: currentUser.name == "username" for the condition. If you want to compare the full name, which is not really advisable, you could use: currentUser.displayName == "Mr. A User"
-
You should always test things like this in another instance. Even if jira checked for closing tags and so on, it couldn't catch all logic errors. A simple check would just give a false sense of security.
-
> and unchecked the "Copy only if not set" in order to force udpate This is not something in script runner...? Are you actually trying this with script runner, or are you just saying it's installed so you have that as an option?
-
you want something like: issue.setIssueTypeId(3) ... etc Ah... I think I maybe understand what you are asking. You should be able to get the selected target project key using: static import com.onresolve.scriptrunner.canned.jira.utils.AbstractCloneIssue.FIELD_TARGET_PROJECT params[FIELD_TARGET_PROJECT] (untested).
-
No worries, hope you get it working.
-
I see no code where you are setting a custom field value... something like issue.setCustomFieldValue(cf, "new value"). Your last line doesn't actually modify the issue. Also see https://answers.atlassian.com/questions/124545/script-runner-post-function-create-issue-custom-field-value?page=1#124570 You might be better off…
-
Hi Jozef... yes, I just tried this on a naked 6.0.7 and don't see the problem. Presumably some packaging/plugins cockup on my behalf.
-
Ah, just saw in the L&F section there is a "Show Site Title" checkbox that I never noticed before. Unchecked it, all good. I'm embarrassed to admit how long this took me :-(
-
The only difference there is getting the current user, vs hardcoding the name "tim", I don't see why that would not work. Can you explain how it doesn't work? ie error, wrong result etc. I would consider using: def groupManager = ComponentAccessor.getComponent(GroupManager)def currentUser =…
-
Oh you want to remove the original changeitem/changegroup... that's going to be harder but probably possible. I don't see that there's anything you can do in java here that you can't do in groovy, it's not like you can't access some of the API with groovy, but up to you.
-
You will have to experiment a bit, but you should be able to just do issue.assigneeId = "xyz" issue.store() You will probably also need to flush the issue cache and reindex... indexManager.reIndex(issue); Have a search for sample code on those lines.
-
This page may also be useful: https://scriptrunner.adaptavist.com/latest/jira/recipes/jelly-migration.html
-
I think I understand what you are asking, but it would be helpful if you could create a new question, preferably in English to get the most viewers.
-
Hi Normann,Thanks for that. I entirely agree that logging/reporting from escalation services could be much better.The crontab thing... it should be the same as elsewhere it's used in jira, eg a scheduled filter subscription.I hear you on the other points, but don't have anything useful to say on that subject right now, but…
-
I don't think I ever did a direct translation. The "no programming" alternative is https://jamieechlin.atlassian.net/wiki/display/GRV/Escalation+Service.
-
Hi Mirek, They did discuss it with me. Personally I can understand their reasoning... they have to maintain a lot of code for jelly when very few people (in percentage terms and absolute numbers) use it. You can do anything with jelly (if you have a masochistic tendency), and equally you can do anything with groovy. I…
-
You need a context provider. This makes additional variables available to the URL. There's a full example here: https://answers.atlassian.com/questions/43888344
-
No problem, no offence taken.
-
Did that work? I'm sure you can understand why I do not do private support consultations for people, unless they are paying.
-
I don't have skype, sorry. Use this: issue.summary = "[Text] " + event.issue.summary
-
transientVars is only available in workflow functions, you should use "event.issue.summary".
-
can't find anything attached, can you paste to gist.github.com or pastebin.com
-
And the logs say...?
-
Not really sure what you're trying to do. But when i put issue.summary = "[Text]" then sub-task with [Text] summary is created. is not valid code, I would assume you haven't actually put that, but it's in the screenshot as well. If the code is invalid (additional script is compiled to code) there will be errors in the log…
-
I tested this and it did work - try putting your function last in the list of post-functions.
-
It's a bit ugly but this is the correct code: issue.summary = "[Text] " + transientVars["originalissueobject"].summary
-
They are separate applications. Proxy both jira and fisheye through port 80 using Apache or IIS, so jira is accessible at /jira, fisheye at /fisheye. Lots of info on this on atlassian's and this site.
-
You shouldn't change jpm.xml, otherwise you'll lose your changes on app update. Instead you should modify <home>/jira-config.properties (create the file if it doesn't exist): jira.lf.logo.url = /url/to/mylogo.gif jira.lf.logo.width = 423 jira.lf.logo.height = 54 But the other bits of the above answer are correct, you need…
-
I'm marking your answer as correct. One person agrees with me so we must be correct.
-
I'm certain it's not allowed in ondemand... and from now on it's not allowed in my instances either. To be honest mostly I used it to create a docn theme before such a thing existed, now it's not required anymore. Yes, JS based hackery should at least fail in a more obvious way. My problem was that there was zero…