JIRA Jelly Runner via Cron in v4.3.4

Dalectric
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2011

JIRA has now implemented secondary login for admin tasks (i.e. you have to enter login details again for certain admin tasks).

I have been successfully using Cron to trigger a Perl script which runs a Jelly script through a URL to send e-mails to assignees for overdue issues.

This is no longer working as that URL requires a secondary login to be able to proceed. Has anyone found a way around this yet?

4 answers

1 accepted

1 vote
Answer accepted
Andrew Ardill
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2011

Another option is to disable the websudo interface altogether.

This is done by setting the jira.websudo.is.diabled property to true in your jira-config.properties file:

jira.websudo.is.disabled = true

Dalectric
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2011

Thanks, this fixed it for me. Wonder if there's a way to make it work with the websudo interface enabled though. I'll have to leave that for another time though. Thanks again

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2014

It will not work for ON DEMAN, because you cannot disable web-sudo there.

2 votes
Brad Baker [Atlassian]
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 30, 2011

I thought you should be able to set a HTTP header on the request to subvert web sudo. But a quick check of the code reveals you cant

I have raised https://jira.atlassian.com/browse/JRA-24956

A script should really be able to subvert web sudo since web sudo is there to prevent some using your browser (either directly or via XSRF) to do actions as you.

But a script does not suffer from this since they must have a user name and password to run anyway and hence they ARE you.

This is why we allow a HTTP header overrride on XSRF checking. Its makes not sense and browser javascript cant set HTTP headers.

2 votes
justindowning
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2011

Couldn't you just use a service? You can use class com.atlassian.jira.jelly.service.JellyService and your XML formatted Jelly script for the input and a log file for the output. The only trouble with this method is you do not have the flexibility to schedule the issue on your schedule. See JRA-1865 for more information on possible workarounds for this.

Dalectric
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2011

Thanks, yeah I did that initially, but I need the flexibility the Cron job gives me of only running on weekdays so it doesn't send reminders when people are not at work on weekends.

Will check the link, thank you

1 vote
Stefan Forstmoser _beecom_
Contributor
August 22, 2012

"Send e-mails to assignees for overdue issues." is something you typically do with filter subscription.

Create a filer something like 'duedate < now() and assignee = currentUser()'

Save the filter. Subscribe everybody (jira-users) to the filter (in filter management.)

Dalectric
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2012

Yep, this is what I've done too.

Suggest an answer

Log in or Sign up to answer