OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Strange highlightCopyediting behavior

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Strange highlightCopyediting behavior

Postby marchitelli » Tue Jul 16, 2013 10:22 pm

Hi,
in the list of "Submissions in Editing" i found that all submissions are highlighted in the color for "An action is required in the copyediting stage", also when (look at the image):
1. I have notified all CE and author about assignement
2. I have acknowleged both authors and CE
3. CE and authors have completed thei tasks
4. CE uploaded a file for step 3

CE.png
Screenshot of Copyediting
CE.png (17.1 KiB) Viewed 531 times


Wich is the event that passes the submission to the next step (An action is required in the layout editing stage)?

Ciao,
andrea
marchitelli
 
Posts: 119
Joined: Tue May 22, 2007 12:44 am

Re: Strange highlightCopyediting behavior

Postby asmecher » Wed Jul 17, 2013 4:00 pm

Hi Andrea,

Could you step through the code in classes/submission/sectionEditor/SectionEditorSubmisison.inc.php in the getHighlightClass() function to see what condition is being met to trigger the highlight?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Re: Strange highlightCopyediting behavior

Postby marchitelli » Wed Jul 17, 2013 10:07 pm

Hi Alec,
here is the code

Code: Select all
         // COPYEDITING

         // First round of copyediting
         $initialSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $this->getId());
         $dateCopyeditorNotified = $initialSignoff->getDateNotified() ?
            strtotime($initialSignoff->getDateNotified()) : 0;
         $dateCopyeditorUnderway = $initialSignoff->getDateUnderway() ?
            strtotime($initialSignoff->getDateUnderway()) : 0;
         $dateCopyeditorCompleted = $initialSignoff->getDateCompleted() ?
            strtotime($initialSignoff->getDateCompleted()) : 0;
         $dateCopyeditorAcknowledged = $initialSignoff->getDateAcknowledged() ?
            strtotime($initialSignoff->getDateAcknowledged()) : 0;
         $dateLastCopyeditor = max($dateCopyeditorNotified, $dateCopyeditorUnderway);

         // If the Copyeditor has not been notified, highlight.
         if (!$dateCopyeditorNotified) return 'highlightCopyediting';

         // Check if the copyeditor is overdue on round 1
         if (   $dateLastCopyeditor &&
            !$dateCopyeditorCompleted &&
            $dateLastCopyeditor + $overdueSeconds < time()
         ) return 'highlightCopyediting';

         // Check if acknowledgement is overdue for CE round 1
         if ($dateCopyeditorCompleted && !$dateCopyeditorAcknowledged) return 'highlightCopyediting';

         // Second round of copyediting
         $authorSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_AUTHOR', ASSOC_TYPE_ARTICLE, $this->getId());
         $dateCopyeditorAuthorNotified = $authorSignoff->getDateNotified() ?
            strtotime($authorSignoff->getDateNotified()) : 0;
         $dateCopyeditorAuthorUnderway = $authorSignoff->getDateUnderway() ?
            strtotime($authorSignoff->getDateUnderway()) : 0;
         $dateCopyeditorAuthorCompleted = $authorSignoff->getDateCompleted() ?
            strtotime($authorSignoff->getDateCompleted()) : 0;
         $dateCopyeditorAuthorAcknowledged = $authorSignoff->getDateAcknowledged() ?
            strtotime($authorSignoff->getDateAcknowledged()) : 0;
         $dateLastCopyeditorAuthor = max($dateCopyeditorAuthorNotified, $dateCopyeditorAuthorUnderway);

         // Check if round 2 is awaiting notification.
         if ($dateCopyeditorAcknowledged && !$dateCopyeditorAuthorNotified) return 'highlightCopyediting';

         // Check if acknowledgement is overdue for CE round 2
         if ($dateCopyeditorAuthorCompleted && !$dateCopyeditorAuthorAcknowledged) return 'highlightCopyediting';

         // Check if author is overdue on CE round 2
         if (   $dateLastCopyeditorAuthor &&
            !$dateCopyeditorAuthorCompleted &&
            $dateLastCopyeditorAuthor + $overdueSeconds < time()
         ) return 'highlightCopyediting';

         // Third round of copyediting
         $finalSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_FINAL', ASSOC_TYPE_ARTICLE, $this->getId());
         $dateCopyeditorFinalNotified = $finalSignoff->getDateNotified() ?
            strtotime($finalSignoff->getDateNotified()) : 0;
         $dateCopyeditorFinalUnderway = $finalSignoff->getDateUnderway() ?
            strtotime($finalSignoff->getDateUnderway()) : 0;
         $dateCopyeditorFinalCompleted = $finalSignoff->getDateCompleted() ?
            strtotime($finalSignoff->getDateCompleted()) : 0;
         $dateLastCopyeditorFinal = max($dateCopyeditorFinalNotified, $dateCopyeditorUnderway);

         // Check if round 3 is awaiting notification.
         if ($dateCopyeditorAuthorAcknowledged && !$dateCopyeditorFinalNotified) return 'highlightCopyediting';

         // Check if copyeditor is overdue on round 3
         if (   $dateLastCopyeditorFinal &&
            !$dateCopyeditorFinalCompleted &&
            $dateLastCopyeditorFinal + $overdueSeconds < time()
         ) return 'highlightCopyediting';

         // Check if acknowledgement is overdue for CE round 3
         if ($dateCopyeditorFinalCompleted && !$dateCopyeditorFinalAcknowledged) return 'highlightCopyediting';
marchitelli
 
Posts: 119
Joined: Tue May 22, 2007 12:44 am

Re: Strange highlightCopyediting behavior

Postby asmecher » Thu Jul 18, 2013 9:04 am

Hi Andrea,

Thanks; what I was hoping you could do is determine which of the cases in that snippet of code is applying. You can do this by adding a second class to the return statements, i.e. where you see...
Code: Select all
return 'highlightCopyediting';
...add something else...
Code: Select all
return 'highlightCopyediting caseOne';
...with the added piece being different for each case. Then load the submission list again, inspect the HTML to find out which case applied, and then we can examine it more closely.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Re: Strange highlightCopyediting behavior

Postby marchitelli » Sun Jul 21, 2013 11:40 pm

Hi Alec,
I modified the code as you suggested. For the screenshot above, the highlight case is "caseNine".

Condition are shown below:
Code: Select all
// Check if acknowledgement is overdue for CE round 3
if ($dateCopyeditorFinalCompleted && !$dateCopyeditorFinalAcknowledged) return 'highlightCopyediting caseNine';


As you can see in the screenshot I uploaded here the editor aknoledged the CopyEditor some days ago.

Andrea
marchitelli
 
Posts: 119
Joined: Tue May 22, 2007 12:44 am

Re: Strange highlightCopyediting behavior

Postby marchitelli » Sun Jul 28, 2013 7:36 am

Alec,
is it possibile that the problem is on a non (or wrong) definition of the variable $dateCopyeditorFinalAcknowledged in /classes/submission/sectionEditor/SectionEditorSubmission.inc.php

Seems working adding this definition:
Code: Select all
$dateCopyeditorFinalAcknowledged = $finalSignoff->getDateAcknowledged() ?
   strtotime($finalSignoff->getDateAcknowledged()) : 0;


Andrea
marchitelli
 
Posts: 119
Joined: Tue May 22, 2007 12:44 am

Re: Strange highlightCopyediting behavior

Postby asmecher » Mon Jul 29, 2013 9:23 am

Hi all,

Thanks, Andrea, good spotting! See http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8343.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests