I have resolution screen with 'log work' fields (time spent, remaining estimate), which appears on the 'Resolve' transition. Also I have added post-function to 'Resolve' transition setting remaining estimate to 0h. But the problem is that post-function works before log work fields values are stored into database. More specifically, remaining estimate is updated automatically based on 'original estimate' and 'time spent' values after it was flushed by post-function.
Is there a way to make my post-function work after resolution screen fields update?
Edit: here is the screenshot of post-functions ordering:
on your resolution screen (default) there should appear "Remaining Estimate"....isn't this set to "Adjust automatically" ?
i just tried...
created an issue and set due to tomorrow...
if i click resolve and leave "remaining estimate" on "adjust auto..." the worklog shows "Remaining: 0m"
i wonder what you're tryin to achieve
maybe the postfuction that purges Remaining Estimate is the wrong step
yes you're right...
remaining estimate will be the value ("original Estimate" reduced by "time spent")
i just added original estimate and the remaining estimate is set that way
that is not the solution you want?
do you want remaing estimate to be set to 0h when the issue gets resolved?
I think you're trying to do too much in the one step. The data submitted as part of the form, doesn't get saved until the end. So if you have apost function which finds the issue, it's probably pulling data from the database (which hasn't been updated yet with the data submitted in the form).
Any kind of function to over-write data entered by the suer will have to go just before the fire issue post function and it will also have to manually perform a re-index. Just be careful, if you use high level helper functions, to do the update, you could end up also firing an update event as well as your issue resolved event.
The other option is that you create a loopback transition (Resolved -> resolved) that has condition that will only let it happen if the remaining estimate != 0, then you make it an automatic transition by exporting it xml and adding the auto attribute
In this transition, you would put the custom post function which would just wipe remaining estimate. So when a user triggers resolved transaction and estimate !=0, it auto fires
Mind you sounds like a lot of fuss to do soemthing not very conventional either. Why not leave the data in place and use it to improve estimate
Hm, maybe is a question of the tool used to do this ...
Try this one:https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.jjupin
create a post function, put it at the end, edit it and just write as the postfunction body:
estimate = "0h"
That should do the trick.
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