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 ...
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.
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 :-)
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.
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)
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)
The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs