Jump to content
We've recently updated our Privacy Statement, available here ×

Possible Minor Bug: Calendar Re-occurance


scottward

Recommended Posts

In JI 1.1:

 

If you change the hours and minutes on a previously saved schedule and hit "Save" everything goes through fine except that the Next Fire Time is not updated.

 

You have to click "No Re-occurance" then click back to "Calendar". The hours and minutes will be reset to 0, but if you fill in the new hour and minutes and save the schedule, the Fire Time will update.

 

Not a huge issue, but a bit tedious if you have to change a few.

 

Or am I missing something?

 

Scotty

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

This was indeed a bug in JI: the trigger update was not properly detected and the Quartz job was not rescheduled. It has been fixed now.

 

Until the next release is out, you can either continue to use the workaround you found or, if you're interested, I could post some instructions on how to patch JI to fix the bug.

 

Regards,

Lucian

Link to comment
Share on other sites

The patch would consist of extending HibernateReportJobsPersistenceService:

Code:

public class PatchedHibernateReportJobsPersistenceService extends HibernateReportJobsPersistenceService {

public ReportJob updateJob(ExecutionContext context, final ReportJob job) {
return (ReportJob) executeWriteCallback(new DaoCallback() {
public Object execute() {
HibernateTemplate hibernateTemplate = getHibernateTemplate();
PersistentReportJob persistentJob = findJob(job.getId(), true);
persistentJob.copyFrom(job, hibernateTemplate);

persistentJob.cascadeSave(hibernateTemplate);
hibernateTemplate.update(persistentJob);
hibernateTemplate.flush();//force version updates

ReportJob clientJob = persistentJob.toClient();

if (log.isDebugEnabled()) {
log.debug("Updated report job " + clientJob.getId());
}

return clientJob;
}
});
}

}

and changing the reportJobsPersistenceHibernateService from applicationContext-report-scheduling.xml to the extended class:

Code:
[code]
<bean id="reportJobsPersistenceHibernateService" class="com.jaspersoft.jasperserver.api.engine.scheduling.hibernate.PatchedHibernateReportJobsPersistenceService">
<property name="sessionFactory" ref="sessionFactory"/>
<property name="securityContextProvider" ref="securityContextProvider"/>
</bean>

 

For your convenience, I've attached a jar containing the compiled HibernateReportJobsPersistenceService class.

 

Regards,

Lucian [file name=jasperserver_api_impl_path.jar size=3533]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/jasperserver_api_impl_path.jar[/file]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...