Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

I have one label(ie updated status comes in this label) and two dropdown list one is developer and another is tester.

When I assign both it is working fine and if am assigning/selecting only developer it is working fine . But when i select only tester individually without selecting any developer then the other issues label status also gets changed automatically if some other issues have different status for the timing it gets changed to status=2(ie , assigned ) .

I have used procedure


SQL
ALTER procedure [dbo].[usp_assignedto]
(
@employeeid int,
@issuetrackerid int,
@testerid int
)
as
begin 
update issuesdetails set assignedto=@employeeid,status =2 , testerassign=@testerid where issuetrackerid=@issuetrackerid
end

This status =2 is because if am selecting and assigning the status label should get updated to assigned .

Hope you got the issue.

Thanks
Posted
Updated 17-Apr-13 19:47pm
v2
Comments
Mycroft Holmes 18-Apr-13 2:06am    
Looks Ok to me have you checked that your client is sending the information correctly - both must the tester and the employee ids must be sent from the client otherwise you are going to have to test to see if one of them is zero.
Member 9954101 18-Apr-13 2:15am    
If we select both developer and tester it works very fine but if suppose at present the status is 5 or anything else for one(1st) issue , and for the second it is status 3.In that case for the first 1st issue if I again select developer or tester then this particular issue should get the status=2 but it effects other issues also and everything gets status=2 automaticaly
Maciej Los 18-Apr-13 2:48am    
Member 9954101 19-Apr-13 5:44am    
ALTER procedure [dbo].[usp_assignedto]
(
@employeeid int,
@issuetrackerid int,
@testerid int
--@status int
)
as
begin
set nocount on

if (status !=1) or (status !=2)
begin
update issuesdetails set assignedto = @employeeid , testerassign=@testerid where issuetrackerid=@issuetrackerid
end
begin
update issuesdetails set assignedto=@employeeid,status =2 , testerassign=@testerid where issuetrackerid=@issuetrackerid
end


end

First of all the "if (status !=1) or (status !=2)" this condition is not working , if i pass the parameter @status It works but I am not passing any parametr from front end so I cant pass this parameter . So Please give substitute for this also .

I tried using this , the previous issue of updating the status label for all the issue is resolved but now I cant update the status , On submit click no change occur.

Please give me some solution asap

ALTER procedure [dbo].[usp_assignedto]
(
@employeeid int,
@issuetrackerid int,
@testerid int
--@status int
)
as
begin
set nocount on

if (status !=1) or (status !=2)
begin
update issuesdetails set assignedto = @employeeid , testerassign=@testerid where issuetrackerid=@issuetrackerid
end
begin
update issuesdetails set assignedto=@employeeid,status =2 , testerassign=@testerid where issuetrackerid=@issuetrackerid
end


end

First of all the "if (status !=1) or (status !=2)" this condition is not working , if i pass the parameter @status It works but I am not passing any parametr from front end so I cant pass this parameter . So Please give substitute for this also .

I tried using this , the previous issue of updating the status label for all the issue is resolved but now I cant update the status , On submit click no change occur.

Please give me some solution asap
 
Share this answer
 
v2
Answer has been provided here: Update query for stored procedure[^]
 
Share this answer
 
Comments
Member 9954101 18-Apr-13 3:29am    
this is another issue , that is resolved .
Maciej Los 18-Apr-13 3:33am    
If issue was resolved, then mark it as "solved" (green button) - formally.
Member 9954101 18-Apr-13 3:41am    
If you are talking for accept solution , M already done with dat.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900