Item10342: Failure in comparison of users, states and groups

pencil
Priority: Enhancement
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: WorkflowPlugin
Branches:
Reported By: MarceL
Waiting For:
Last Change By: CrawfordCurrie
In our Wiki we got the Problem that the states, users and groups cannot be compared. We always get the exception "No action available...". It seems that the Foswiki itself added some whitespaces. I could solve this by trimming the strings: $currentState, $thisUser and $allowed in the Workflow.pm with "s/^\s+//" and "s/\s+$//" -- MarceL - 11 Feb 2011

MarcelL - I recently had to trim whitespace elsewhere, so I'm thinking it's happening in core somewhere.

Can you please post an example of a comparison that (wrongly) fails? Thanks!

-- AaronFuleki - 22 Feb 2011

Hi Aaron, yes I think you are right. The Problem should be somewhere in the Core functions I think. Let me show you an example: In the Workflow.pm I made a debug output of the variable $currentState after the line: my $currentState = $topic->getState(); and there I get the output " CURRENTSTATE " - please take care of the whitespaces before and after the current state. It doesn't matter which action, state or user, except of the admin, I used. Everytime I got the problem. Therefore I trimmed the strings as mentioned here at this task. I hope you can understand what I mean here.

-- MarceL - 23 Feb 2011

MarceL - I think this should be fixed as of WorkflowPlugin:3db8c4677cca. Can you try the latest SVN version of WorkflowPlugin, or provide STR so that I can try it?

-- AaronFuleki - 23 Feb 2011

Hah - looks like we commented at the same time! I committed the improved regex that BryanThale suggested in Tasks.Item10356, which should fix this, I think.

-- AaronFuleki - 23 Feb 2011

Also, feel free to join #foswiki on irc.freenode.net to discuss.

-- AaronFuleki - 23 Feb 2011

Thanks - We will check when we do the next update in our Wiki. For the moment it works with my workaround. Thanks a lot for the information and commiting the fix in the repository.

-- MarceL - 23 Feb 2011
 

ItemTemplate edit

Summary Failure in comparison of users, states and groups
ReportedBy MarceL
Codebase
SVN Range
AppliesTo Extension
Component WorkflowPlugin
Priority Enhancement
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r6 - 01 Aug 2017, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy