Option to automatically set due-date relative to creation-date and priority on Create event

Markus Lepper
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 4, 2012

I need to implemenmt this feature:

Set the due-date depending on other factors during creation of issue.

High prio: Due-date = creation date + 1 day

Med prio: Due-date = creation date + 3 days

Low prio: Due-date = creation date + 2 weeks

Any idea on how to get this implemented? Inbuilt (4.2.2) or plugin or ...

THANKS!

2 answers

1 accepted

1 vote
Answer accepted
Jobin Kuruvilla [Adaptavist]
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 4, 2012
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 4, 2012

If it's only for "create", a post-function may be more easy to write?

Jobin Kuruvilla [Adaptavist]
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 4, 2012

Well, if it is only create, a listener is easier to write ;) It is just one Java class as opposed to 2 classes plus 2 vm and then workflow configuration!Code is the same.

If it is not just create, i.e. needed on other workflow actions, I will go for a post function.

Just my opinion. Some may find post functions easier.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 4, 2012

True, the complexity of the plugin is lower, but the code for a post-function is more simple (last time I converted a post-function to a listener, I think it was about 30 lines of post-function vs 250 in the listener). You've also got a potential load - listeners have to process all events, even if it's just to say "I don't need to do anything", where a post-function only runs when needed.

I'd also be strongly tempted to use the script runner instead :-)

Jobin Kuruvilla [Adaptavist]
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 4, 2012

code for a post-function is more simple

Not in my opinion. Listener is pretty straight forward. 30 lines of post-function vs 250 in the listener doesn't look right to me. Maybe you were using the old listeners? Also, post functions has other code underneath.

Even performance wise, listener is better because it runs in a different thread. We are capturing only the created event and the other part of doing nothing for other events is negligible. Again, my opinion only ;)

Scriptrunner is great, no doubt about that, You just need some scripting skills.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 4, 2012

Sadly, the load testing we did on 4.3 showed exactly the opposite - it was very clear that listeners impose a significantly heavier load than equivalent post-functions. Yes, they may well be in a different thread, but the numbers were very clear that post-functions are significantly lighter on the system than listeners performing the same tasks. Of course, this was for a large Jira under a heavy load, the effects aren't measurable for small-medium installations (large being >250k issues, >10k users, etc)

Jobin Kuruvilla [Adaptavist]
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 4, 2012

interesting. I can't imagine why! Maybe someone else can shed some light on this.

Thanks for sharing though. I always thought listeners were light weight.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 4, 2012

So did I, until we'd run through these load tests!

I don't know if it applies to other versions of Jira though, I never went into much detail - the important outcome of the load test was the reassurance that the internal stuff was functionally ok, and we needed to get the users to stop hitting Jira with RSS or Excel downloads with tempmax=10000000 (which they were doing because when Jira tells you the truth about your project not really going anywhere, it's easier to download a huge amount of data and do all sorts of horrid manipulations in Excel to hide the fact you're going nowhere)

Markus Lepper
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 4, 2012

Hello Jobin & Nic,

Thanks a lot for your immediate response!

I've hoped to find this functionality in some existing plugin which I could just reuse. ;)

Now I need to check how to write the required code.

Regards,
Markus

Warren McInnes
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.
January 8, 2013

Hi Guys, any further luck with such functionality? Code examples, methods, etc?

0 votes
Warren McInnes
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.
January 8, 2013

Hi Guys, any further luck with such functionality? Code examples, methods, etc?

Suggest an answer

Log in or Sign up to answer