Not getting the result.

#Get User Name, User Logon and User Phone Number.

my $userName = $session->GetUserFullName();
my $userLogin = $session->GetUserLoginName();
my $userLogin1;#= $session->GetUserLoginName();
my $userLogin2;#= $session->GetUserLoginName();
#my $userLogin2=$entity->GetFieldValue("Status")->GetValue();
my $userPhone = $session->GetUserPhone();

#actual Validation same person shoul not be able to move the defect in
#"To Dev" & "Dev Review"

if(($myEntityName eq "Defect") && ($myActionName eq "Modify") && ($myCurrentStatus eq "To Dev") &&
(($myOriginalStatus eq "New") || ($myOriginalStatus eq "Review") || ($myOriginalStatus eq "To Design") || ($myOriginalStatus eq "Design Done") || ($myOriginalStatus eq "Failed")))
{
{
$Owner1= $entity->GetFieldValue("Owner")->GetValue();

}

}
if(($myEntityName eq "Defect") && ($myActionName eq "Modify") && ($myCurrentStatus eq "Dev Review") && ($myOriginalStatus eq "To Dev"))
{
{
$Owner2= $entity->GetFieldValue("Owner")->GetValue();

}

if ($Owner1 eq $Owner2)
{
return "Permission denied same person can't move $Owner1 eq $Owner2 ";
}


#####the problem is that the value of owner1 is not persting in the ##second loop where the comparision is being made between Owner1 & ##Owner2...is there any way to pass the value of owner1 to the second ##loop.

Comments

  • : #Get User Name, User Logon and User Phone Number.
    :
    : my $userName = $session->GetUserFullName();
    : my $userLogin = $session->GetUserLoginName();
    : my $userLogin1;#= $session->GetUserLoginName();
    : my $userLogin2;#= $session->GetUserLoginName();
    : #my $userLogin2=$entity->GetFieldValue("Status")->GetValue();
    : my $userPhone = $session->GetUserPhone();
    :
    : #actual Validation same person shoul not be able to move the defect in
    : #"To Dev" & "Dev Review"
    :
    : if(($myEntityName eq "Defect") && ($myActionName eq "Modify") && ($myCurrentStatus eq "To Dev") &&
    : (($myOriginalStatus eq "New") || ($myOriginalStatus eq "Review") || ($myOriginalStatus eq "To Design") || ($myOriginalStatus eq "Design Done") || ($myOriginalStatus eq "Failed")))
    : {
    : {
    : $Owner1= $entity->GetFieldValue("Owner")->GetValue();
    :
    : }
    :
    : }
    What are the extra pair of curlies doing there? Don't think that's the problem, but it's confusing.


    : if(($myEntityName eq "Defect") && ($myActionName eq "Modify") && ($myCurrentStatus eq "Dev Review") && ($myOriginalStatus eq "To Dev"))
    : {
    : {
    : $Owner2= $entity->GetFieldValue("Owner")->GetValue();
    :
    : }
    :
    Notice you open two of them here, but only close one.

    : if ($Owner1 eq $Owner2)
    : {
    : return "Permission denied same person can't move $Owner1 eq $Owner2 ";
    : }
    :
    You never actually reach this condition unless the second condition is true.

    :
    : #####the problem is that the value of owner1 is not persting in the ##second loop where the comparision is being made between Owner1 & ##Owner2...is there any way to pass the value of owner1 to the second ##loop.
    :
    I'm confused because I see no loops here. But I think the problem maybe isn't that $Owner1's value doesn't persist. I can't see where you've declared that variable, too...

    Jonathan


    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion