- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 09:59 AM
When in a Story form, we have a 'Project' field that is a Lookup List and currently it pulls all Projects, no matter what state the Project is in.
We need to exclude any Projects that are in a 'Closed Complete', 'Closed Incomplete' and 'Closed Skipped' states.
Here is the Story Form:
Here is the Field Label:
Here is the current Dictionary Entry:
Here is the table info for the 'Project' field:
I'm not a developer or experienced scripter, but can manage basic administration/configuration tasks, so any assistance with detailed info would be appreciated.
Solved! Go to Solution.
- Labels:
-
Agile Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 11:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 10:09 AM - edited 11-22-2022 10:10 AM
Hi @Roberta B,
Just go to Projects table in list view and apply the required filter with state field.
State -- Is not one of -- 'Closed Complete', 'Closed Incomplete' and 'Closed Skipped' states.
Run the filter and copy the query by right clicking on it.
Now go to any Story record and configure the Project field and in Advanced reference qualifier or override advanced reference qualifier add the copied query as-
javascript:"copied_query";
OR - you may apply the same query in simple reference qualifier in project field as dictionary level as
State -- Is not one of -- 'Closed Complete', 'Closed Incomplete' and 'Closed Skipped' states.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 10:39 AM
Hi @Sagar Pagar -
I went to the Projects in List View and set the filter to exclude projects with "Closed Complete', 'Closed Incomplete' and 'Closed Skipped' and copied this query:
I updated the Advanced Reference qual on the 'Project' field from this:
javascript:ScrumSecurityManager.getStoryDotProject(current);
to this:
javascript:ScrumSecurityManager.getStoryDotProject(current);sys_class_nameINjavascript:getValidProjectClasses()^stateNOT IN3,4,7
And went back to a Story and it is still showing all projects in all states.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 11:20 AM
Thank you for your responses @Sagar Pagar .
I followed the solution presented by Mike_R below and it worked.
I appreciate you trying to assist!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 10:43 AM
Hello,
Looking at the screenshot it seems you already have a custom script in the reference qualifier:-
javascript:ScrumSecurityManager.getStoryDotProject(current);
So you will have to first check what exactly is the script include really returning and you probably have to add the extra query in the script include itself.
If you need help with the code i would suggest go to the script include named:- ScrumSecurityManager
Then in the script include there will be a function called :- getStoryDotProject
Paste the complete function over here then it would be easier to assist you.
Thanks.