0
Answered

Updating job deadline by macro

Dennis Rosenbaum 3 years ago in Something Else updated 8 months ago 13

I would like to update the job deadline by a macro.

But when I change this through something like $activity.setDeadline(Date), the database value is being updated, but it doesn't show on the screen.


So I thought of executing the ChangeJobAssignmentDeadlineManuallyCommand(xxx,Some(Date)) function, exactly as the XTRF system does. But I cannot find a generic commandbuilder that I can use or execute. 


How can I manage to execute such command through a macro?


Under review

Hi Dennis,


I am afraid that macros in Smart Projects are not going to work at all. These are just not designed for such environemtent.


But there are many options which could help - could you please describe an issue you are having? The better request understanding we'll have, the better answer we'll come up with.

Dear Olaf,

I do not totally agree with you on this. I already use macro's to do any kind of stuff and it seems to have a real deep integration with your complete codebase. As I use the xtrf-6.0.40 javadocs with a lot of possibilities in there. And there is also an AbstractCommandBuilder that has different implementations (though not the ChangeJobAssignmentDeadlineManuallyCommandBuilder as expected). Therefore I expect there should be a possibility to execute this command through the Macro system.


The issue that I have is slightly complicated, but let me try.


This is the situation: we have a process with a Translation step and a Preparation step (5). The PM will enter a volume (1). The Preparation step gets a date assigned automatically (this has been configured in the Process Template). After that we start the Preparation step (5) which will trigger our API subscription and will then execute a macro in order to create the receivables. 


The problem occurs here: the step has to be in 'Accepted' state before the Start 1 Job(s) (4) becomes red. And I want my PM to spend the least time. So I don't want the PM to change the status from Opened to Accepted. Therefore I need some automated process to set the Preparation step to Accepted.


The only way I can hook in with some macro or code is by the subscription API on the creation of the quote. So our software is being triggered, this could then execute some API calls or a Macro. As the API calls aren't sufficient for this job I expected the macro could bring some magic. So the macro is executed. And then the macro should change the Planned start date (2) and Planned Deadline (3) so that the macro can execute the status change from Opened to Accepted.

I hope you understand the problem, if you have questions, please ask.

Dear Olaf,


Is there any way to achieve this? Preferably with macro's. 

Searching answer

Dennis, thanks for poking it up. 


I think that macro is not necessary in such case, as we have a defaul feature called Automatic Job Scheduling, which does exactly what you ask for - changes the status to Accepted.


To do so, you must meet some conditions.


  • Language pair must be set up
  • Vendor must be chosen
  • Volume filled

So one of these is missing in this case. I suspect the language pair, being more precise - probably you did not select the language you use in the paralell process in the Target Language field. So the system leaves the whole forked process, as it has nothing to hang on. Try adding it, and macro should not be needed.


Hope that helps.

Dear Olaf,

Thank you for this clear explanation. I am aware of the Automatic Job Scheduling which in most cases works fine. But in the case of our process template it doesn't. The process step (number 5 in the picture) is set to have language pair Tajik, some language we will never use. So the Automatic Job Scheduling will not be executed for this job, that is why I would like to do it some other way around.

Answered

Dennis,

Have you tried changing that status by using our Home Portal API? (The link leads to our demo instance, please map it to yours before use.)


But really, your request looks like an automation idea for future development since we really discourage the use of macros with the Smart Projects.

Hi Lukasz,

I am aware of changing the job status through the API. But before this API call can be done, the deadline has to be set or the volume has to be set and currently I can only use the Quote created Subscription as a trigger to execute some code. Now that I think of it, I could set the volume of the quote through the API and then change the job status. I'll try that first.

Concerning the macro's, as you discourage the use of macro's with Smart Projects, I do not agree with this. There are a lot of examples that a macro can be very effective to automate things. Because the development time from XTRF could sometimes take a while as we need the functionalities most of the time as soon as possible.


Therefore I would still love to know how to execute commands like ChangeJobAssignmentDeadlineManuallyCommand(xxx,Some(Date)) as they can be very effective to automate some steps by virtually executing them.

I was wondering if it is still impossible to update the job deadline by either a macro or through the API?
Classic projects seem to have this option within the API, but I think I cannot use this option for SMART projects.


The reason I need to update the job deadline is because we have a different system where we enter the job deadline, it needs to be copied into XTRF so no human mistakes can be made and it takes away the time spent from the project managers.

Thank you, I do have tried that, but this will change the project deadline, and I would like to change the specific job deadline. For instance, if I have 2 jobs, I would like to be able (programatically) to change them into different values.

A change to the API would have to be made. Currently, updating dates is not available.

Will notify you when it makes it to the roadmap.

I see. Then you should wait for the API development for the best solution. With macro I think you can update that. The big deal is how the macro can find out the correct dates. To understand your situation better we should continue this in skype.

@XTRF What is the status on the API for setting Job Deadlines?
We currently need to update the Job Deadlines in order to automate adding automatic payables.