How to force Work Item Query Policy to refresh its cached query results?

I have enabled the Work Item Query Policy on my TFS project.  It works as expected, except when using Visual Studio 2013 with the following sequence of steps:
User selects Check in Pending Changes from the Source Control Explorer
User enters in the ID of the work item to be associated to the changeset
User clicks the Check In button
Work Item Query Policy displays message ' Work item ##### was not found in the results of stored query...'
User realizes his mistake, and modifies (and saves) the work item so that it is returned in in the query result set
User clicks the Check In button again expecting the TFS policy to accept the association
Work Item Query Policy still displays message ' Work item ##### was not found in the results of stored query...'
Removing the Work Item and re-associating it does not make a difference.  The only workaround that I have found is to close Visual Studio and reopen it.  Does any one have a better solution than this?

Our setup is different from the one you are using:
- User is using VS 2013 Update 4.
- We are running TFS 2010 SP1
The test case that you described is different from the one that is causing my problem (that scenario works fine for me as well).  I am trying to associate the check in to the same work item both times; whereas, you are associating it to a different
work item the second time.  I can consistently reproduce the error using the following steps:
1) Create a query that returns All Bugs in Active state, and set it as the query for the Work Item Query Policy
2) Create and save a new Bug
3) Run the query to confirm that the new bug does not appear in the result set
4) Checkout a file, modify it, save it
5) Check in the file and associate it to the bug from step 2)
- the Work Item Query Policy will issue an error message saying that the work item cannot be found in the associated query
6) Change the state of the bug to Active, and save
7) Refresh the query to confirm that the bug now appears in the result set
8) Check in the file again
- error message from step 5) will not go away

Similar Messages

  • How to stop workitem complete or how to keep work item in inbox based on conditions even if it completed

    Hi,
    my requirement is to call webdyn pro screen from workflow..
    i am calling webdynpro screen by using FM :CALL_BROWSER from workflow.
    when webdyn pro screen is called user will enter some values . if user closed webdyn pro screen with out entering any values we need show this workitem in his inbox. so that user can again open it and enter values in the webdyn pro screen.
    Please help how to stop work item complete based on conditions.
    Thanks,
    phani

    Hi,
    As per my understanding, this is not a proper approach toy call web dynpro using FM CALL_BROWSER. is the web dynpro screen being called when user clicks on the work item from portal UWL OR from SAP SBWP ?
    if you are calling web dynpro screen from portal UWL when user clicks on work item link, better you achieve it using SWFVISU tcode. in SWFVISU tcode you can maintain which web dynpro. application to call when particualr work item task come in user's inbox. in your web dynpro code, then you can write your buisiness logic when user clicks for example SUBMIT/SAVE button. on action submit/save button you can use FM SAP_WAPI_WORKITEM_COMPLETE to complete the worktiem once the user clicks on final submit/save button. in this way the workitem will get removed from user inbox only upon clicking on submit/save button.
    You can refer below link for web dynpro for workitem:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70648e99-4cc1-2c10-879d-9c61003c69d6?QuickLink=index&…

  • In GP how to get work items in outlook inbox

    Hi,
    Any one can explain me how to send work items to Outlook Mail. This option is there in ABAP work flow. I need solution in GP.
    Please give any sloution.
    Thanks,
    Sunil

    Hi Jonathon,
    in our last project, we faced the same problem and resolved it with a standard notification CO:
    - we put a notification CO (+ action) in front of the action you mentioned (that one that generates the UWL's workitem and provides the CO for manual processing)
    - the notification's addressee will be the current processor, who is also the guy to do the manual processing
    - the notification email contains a link to the process' current workitem, which is the action you mentioned (e.g. a webdynpro form or whatever the manual processing is)
    The result is, that there will be an automatically sent notification, followed by the normal manual processing. And our client was happy to be able to customize every single email.
    See this link for email administration: http://help.sap.com/saphelp_nw04s/helpdata/en/43/f9097d1b607061e10000000a1553f6/frameset.htm
    Best regards
    Daniel

  • How to send work item?

    Can any one please tell me how to send work item ? will it be through the use of user decision or through the activity task? moreover where to provide the description and the subject of the work item?

    What do you mean by "send the work item"?
    If you mean "send information to a user that there is a work item waiting to be executed", read the FAQ and/or search this forum for RSWUWFML2.
    If you mean "send the work item to the correct recipient", your best choice is to learn how to use rules and set possible agents. Read the FAQ and/or search the forum or SAP documentation at <a href="help.sap.com">help.sap.com</a>.
    If you mean something else, then please try again to explain what you are trying to do.

  • How to run work item manualy

    Hi Experts,
    This is Chakri. How to run work item Manually ? I don't no exactly workflow.Basically i am working on EP.
    Regards,
    Chakri

    Hi Chakri,
    If you are after running a workitem manually then just go to txn swia give that workitem number and execute from there.
    or
    you can go technical details of it and complete manually.
    steps: 
    go to technical details
      click on the workitem (line)
      goto menu - technical details
      change menu
      complete manually.
    Cheers
    VJ

  • How to insert the select query result into table?

    How to insert the select query result into table?
    SELECT  top 20 creation_time  
            ,last_execution_time 
            ,total_physical_reads
            ,total_logical_reads  
            ,total_logical_writes
            , execution_count 
            , total_worker_time
            , total_elapsed_time 
            , total_elapsed_time / execution_count avg_elapsed_time
            ,SUBSTRING(st.text, (qs.statement_start_offset/2) + 1,
             ((CASE statement_end_offset 
              WHEN -1 THEN DATALENGTH(st.text)
              ELSE qs.statement_end_offset END 
                - qs.statement_start_offset)/2) + 1) AS statement_text
    FROM sys.dm_exec_query_stats AS qs
    CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st
    ORDER BY total_elapsed_time / execution_count DESC;
    Thanks,
    Tirumala

    1. SELECT INTO
    Below method will create table when data is inserted from one table to another table. Its useful when you need exactly same datatype as source table.
    Use AdventureWorks2008R2;
    Go
    ---Insert data using SELECT INTO
    SELECT AddressLine1, City
    INTO BothellAddresses
    FROM Person.Address
    where City = 'Bothell';
    GO
    ---VERIFY DATA
    Select AddressLine1, City
    FROM BothellAddresses
    ---DROP TABLE
    DROP TABLE BothellAddresses
    GO
    2. INSERT INTO SELECT
    Below method will need table to be created prior to inserting data. Its really useful when table is already created and you want insert data from
    another table.
    Use AdventureWorks2008R2;
    Go
    ---Create Table
    CREATE TABLE BothellAddresses (AddressLine1 NVARCHAR(60), City NVARCHAR(30))
    ---Insert into above table using SELECT
    INSERT INTO BothellAddresses(AddressLine1, City)
    SELECT AddressLine1, City
    FROM Person.Address
    where City = 'Bothell';
    ---VERIFY DATA
    Select AddressLine1, City
    FROM BothellAddresses
    ---DROP TABLE
    DROP TABLE BothellAddresses
    GO
    Regards,
    Vishal Patel
    Blog: http://vspatel.co.uk
    Site: http://lehrity.com

  • How to delete work items

    Hi,
    I'm using XI 3.0 and am trying to delete some Work Items that are sitting in Error status.
    I've tried following OSS note 807906 but cannot see the menu items mentioned (specifically the Edit=>Change option) - can someone explain more clearly how to delete them?
    Thx
    Here is summary of OSS Note:
    "First make sure that the process is actually 'irretrieveably lost', that is, that it has not simply encountered a temporary error (for example, the failure of synchronous sending and so on).
    If you are certain that the process is no longer required, call the log of the affected process (using the process selection (SWF_XI_SWI1)) or the SXMB_MONI, ... and display the work item of the process (Workflows).
    Go to the technical work-item display (if this is not displayed by default) and then select Edit => Change there.
    Under 'Services for Administration', select the 'Logical Deletion' function.
    This function is used to set the process to the 'Logically Deleted' status and to delete all outstanding correlations. The process has then reached its final status and can also be archived"

    brian
    are u luking into deleting error messages. If yes then,
    SXMB_ADM --> Schedule/Delete Jobs
    Delete Messages SXMB_MONI

  • How to Edit work item in Workflow

    Hi all,
    I have a requirement like this .....
    I have to process the Error Idoc  to the respective Sap Business workplace based on the Position assgigned.
    Now my question is...I am able to send the IDOC to the Business workplace as work item. But the USER wants to Edit the Idoc and process it further...Please guide me how to approch it.
    Thanks in advance
    Chakri

    Hi,
    I am after processing the Idoc to Work item...
    Double click on the work item which in turn takes to the "Display Record"...in the screen itself..Menu bar
    we have EDIT --> Foreground Processing   ---> Visible
                                 Foreground from Error    ---> Visible
                                 Background Processing  ---> Visible
                                 Set delete Indicator          ---> Visible
                                 End process                                    ---> Disable
                                 Continue Despite syntax error        ---> Disable(Want this to show in Visible )   
    Please help me on this case.
    Thanks in advance
    Chakri

  • How to pass work item id from  workitem to webdynpro form

    hi ,
    im working on  webdynpro. when the agent executes  the  workitem  it has to open one form designed with webdynpro screens. here i have to get the workitem id from workitem and basing on the workitem id , i will get other data , that i have to dispaly in the lay out of a view..
    how to pass this work item id to my view and how to display this...?
    Raghu

    Hi,
    Application parameters can be used for this accessed directly only in the Window. Follow these steps;
    1. get the application url using the following code,
    par_wrkitm is the application parameter ( which should also be declared in the HANDLEDEFAULT method of the window as importing parameter and aslo appended in the URL )
    g_wrkitm is a Component Controller attribute
    Data: my_url TYPE string.
    *Get the URL of the Application
    CALL METHOD cl_wd_utilities=>construct_wd_url
    EXPORTING
        application_name = 'ZWDRC_NEW_APP'
    IMPORTING
       out_absolute_url = my_url.
    2. Now pass the required parameter ( i.e in this case Workitem id ) to this URL
    3. In your webdybpro applicatio, Goto Application parameters and create a parameter for workitem id with the same name as used in the URL.
    4. In the HANDLEDEFAULT method of the window, create Importing parameters with same names as that of your application parameter.
    5. Now this variable will contain your workitem id.
    If you want to acess the variable in your views;
    2. create a attribute in the Component Controller( Component Controller->Attributes Tab; mark it as public )
    3. Now in the HANDLEDEFAULT method of the window, assign your application parameter values to the component controller attributes directly as shown below,
    wd_comp_controller->g_wrkitm = par_wrkitm
    Regards,
    Radhika

  • How to transfer work items from one user's inbox to other user,s inbox(UWL)

    Hello All
    We need to transfer existing  but  open work items from one user's inbox to other user,s inbox(UWL)
    How to go about it?
    These are the items from backend  R3.
    Thanking you
    Rajendra

    Hi Rajendra,
    Usually in R/3 if you want to transfer the workitems to other user , you can just select the workitem and then click on "Forward" button. This will pop-up a box to enter the "User" ID of the other user to whome you want to transfer the Workitem. A Similar button is available in UWL as well.
    So, in UWL when you click on the Workitem, it will should give you a button "Forward" and by clicking on that you should be able to transfer the workitem you the other user.
    I hope this helps you. Let me know if you need any more help.
    Regards,
    Gopal.

  • How to reassing Work items to another user?

    Hi SDN
    We have a situation where we need to extract, from one approver inbox, all the work items he has to approved, and re-assign them to another approve, who has the same level of approval.  I know we could only ask the 1st approver to go in Change mode and re-assign Approver #2, but Approver #1 is not available.
    Can you please explain me how to extract the list of work items sitting in Approver #1 inbox, and re-assign them to Approver #2 using some of the WF t-code available for EBP Administrator?
    Thanks for your usual collaboration!
    Eric L.

    Did you try the FM SWW_WI_FORWARD
    To get a particular user inbox workitems you have FM SAP_WAPI_CREATE_WORKLIST which will rertun you all the workitems that are in the ready status.
    BY using the FM SWW_WI_FORWARD you can forward the workitems.
    Suppose if we have 2 users UA and UB and you need to send all the workitems of UA to UB and when you send the workitems , what ever the workitem that you send to  UB that workitem will not be available in UA if you use the FM SWW_WI_FORWARD

  • How to get work item details programatically ?

    Hi All,
    I have a list of work items (process instances) and I want to retrieve each item details such as: attachments, notes, id, ...
    All the items are filtered and represented as Fuego.Papi.Instance:
    Fuego.Papi.Instance[] inst = busProcess.getInstancesByFilter(filter : instFilter);
    But the work item details are inherited from Fuego.Lib.ProcessInstance. So, how to get the item details from inst[] ?
    Would appreciate any help, may be Dan will have an advise ?
    Regards,
    Kim

    If you have instances returned by your filter, you could extract variable information for each instance by doing something like this:
    for each inst in getInstancesByFilter(ps, filter : instF) do
        // here's how to get the value inside a primitive instance variable
        orderAmtObj as Object = getVar(inst, var : "orderAmount")
        // here's how to get the value of attributes inside a complex BPM Object instance variable
        //    - in this case this is an "order" object with two attributes (customerName and amount)
        orderObj as Object = (getVar(inst, var : "order"))
        xmlObject = Fuego.Xml.XMLObject(createXmlTextFor(DynamicXml, object : orderObj, topLevelTag : "xsi"))
        logMessage "The value of the order object's customer name is: " +
               selectString(xmlObject, xpath : "customerName")
        logMessage "The value of the order object's order amount is: " +
               selectNumber(xmlObject, xpath : "amount")
        // here's a rather uninspired way to retrieve who the participant is that was assigned the instance
        logMessage "The participant assigned to this instance is: " + inst.participantId
    endInside the above "for" loop, you could retrieve these predefined variables (this example assumes you use "inst" in your "for" loop):
        objRet as Any
        objRet = inst.getVar(var : "PREDEFINE_ACTIVITY")
        logMessage "Activity name = " + objRet using severity = DEBUGSubstitute "PREDEFINE_ACTIVITY" in the above logic to get this information:
    PREDEFINE_PRIORITY (priority)
    PREDEFINE_ACTIVITY_DEADLINE (activity.deadline)
    PREDEFINE_CREATION_TIME (creation.time)
    PREDEFINE_PROCESS_DEADLINE (deadline)
    PREDEFINE_DESCRIPTION (description)
    PREDEFINE_PROCESS (process)
    PREDEFINE_RECEIVED_TIME (receptionTime)
    PREDEFINE_PARTICIPANT (participant)
    PREDEFINE_COPY (id.copy)
    PREDEFINE_STATUS (status)
    Similarly, you might want to try to get instance information using the Fuego.Papi.VarDefinition object a try. Never used it, but the logic might be as simple as:
        logMessage "who created? = " + inst.getVar(Fuego.Papi.VarDefinition.CREATOR_ID) using severity = DEBUG
        logMessage "does it have attachments? = " + inst.getVar(Fuego.Papi.VarDefinition.HAS_ATTACHMENTS) using severity = DEBUG   
        logMessage "does it have notes? = " + inst.getVar(Fuego.Papi.VarDefinition.hasnotes) using severity = DEBUGDan

  • How can I export the query result into access(*.mdb) file?

    Dear all:
    I want to export the query result displayed in jsp into excel file
    and access file. And I have exported the result into excel format successfully, only one line should be added in the head of Jsp:
    <%@ page contentType="application/vnd.ms-excel; charset=gb2312" %>
    But how can I export it in access(*.mdb) file? I have replaced "excel"
    with "access". But it can't achive my goal.
    What should I do to achieve my goal?
    Thanks!

    The only reason your Excel export works is that Excel knows how to interpret comma separated values as an input file format. Access has no such beast.
    If you absolutely must provide info in an mdb, one solution would be to create an ODBC datasource pointing to an empty mdb, then push data into it using the jdbc:odbc bridge, then make a copy of the file and stream it down to the browser. You may run into some ugly file locking items here - set the ODBC connection so it is not shared, and that might help.
    This one is going to be ugly.
    I suppose another approach would be to write a simple VB applicatin that uses automation to create an MDB, then stream that file down to the browser from your servlet. That would almost certainly be faster than the ODBC approach.
    - K

  • How to get the dynamic query result

    If in one query, there is the amount range dimension, based on different dimension value combination, the customer revenue should be refreshed into different range, how to make it by cube?
    eg.
    Customer Store    Material  Month    Amount
    C001     M & S    Tennis    2005/01   "10"
    C001     Douglas  Tennis    2005/02   "60"
    C002     M & S    Soccer    2005/01    "1"
    C002     M & S    Soccer    2005/02    "50"
    C002     M & S    Tennis    2005/02    "50"
    C003     Douglas  Tennis    2005/01    20
    Query condition:
    Time Customer Amount Range     Amount
    2005 C001     0~50_____________0
    2005 C001     51~100___________70
    2005 C001     100 +____________0
    2005 C002     0~50_____________0
    2005 C002     51~100___________0
    2005 C002     100+_____________101
    2005 C003     0~50_____________20
    2005 C003     51~100___________0
    2005 C003     100+_____________0
    However, if I drill down Time into month, the result is total different, I only list the result related to customer C001
    Time     Customer  Amount Range    Amount
    2005/01  C001      0~50____________10
    2005/01  C001      51~100__________0
    2005/01  C001      100 +___________0
    2005/02  C001      0~50____________0
    2005/02  C001      51~100__________60
    2005/02  C001      100 +___________0
    Any good solution on that? Thanks for any input.
    Message was edited by: Lei Shao

    Hi, Sen,
    I used your solution in my infocube and query, where I created a structure with 'between'. However, it is still the simple summation in different amount range.
    Just like the following:
    Sales ORG / Sales Office / Sales Rep / Amount
    East      / Atlanta      / 1001      / 3
    East      / Atlanta      / 1002      / 4
    So the query result is the same:
    S-ORG / S-Office / S-Rep / Amount Range / Amount
    East  / Atlanta  / 1001  / 0~5          / 3
    East  / Atlanta  / 1001  / 5+           / 0
    East  / Atlanta  / 1002  / 0~5          / 4
    East  / Atlanta  / 1002  / 5+           / 0
    When I remove 'drill down' for Sales Rep, the result is:
    S-ORG / S-Office / Amount Range / Amount
    East  / Atlanta  / 0~5          / 7
    East  / Atlanta  / 5+           / 0
    However our expection for the result is different, because in business traction, if we remove sales rep, the sales org and sales office will get the sub-total like this: (we can image it with ABAP program sub-total)
    Sales ORG / Sales Office / Amount
    East      / Atlanta      / 7
    So our expection for the result is:
    S-ORG / S-Office / Amount Range / Amount
    East  / Atlanta  / 0~5          / 0
    East  / Atlanta  / 5+           / 7
    Therefore, any good suggestion for this?
    Thanks a lot
    Regards,
    LS

  • How to get the sql query result?

    Hi,
    Currently I am using LV2012 to connect a Oracle database server. After the installations/settings for Oracle Express and Oracle ODBC driver done.
    I am sucessfully to use the SQL command to query the data through my window command prompt. 
    Now the problem is, how I do the same task in Labview by using the database connectivity toolkits?
    I have build a VI for query as attached, but i have no idea what pallete to use to get the query result.
    Please help me ~~
    Solved!
    Go to Solution.
    Attachments:
    Query.vi ‏9 KB

    Here is a piece of code I use to test SQL commands, you can use the part that retrieves sql results.
    It is also possible to get the column headers back, but that is for next lesson!
    Attachments:
    RunSQLCommand.vi ‏30 KB

Maybe you are looking for