Parent backlog item into a Sprint - tfs-workitem

When I create multiple product backlog items linked to each other ( parent and child ) – then further I am not able to add Parent backlog item into a Sprint . Is there a way to add both parent and child PBI in Sprint the way they get displayed in Backlog items

It is possible for you to put one backlog item into one specific Sprint via setting the Iteration. For example, the following screenshot shows that the "PBI Parent" work item is put into Sprint 1.

Related

Reselect item on Select2 multi-value select list

I use plugin Select2 on Apex.
I have scenario like this:
I have three tables: ROOM, MASTER_STUDENT and MAP_STUDENT_ROOM
One ROOM can have many STUDENT
User can select more than one student(with Select2 from MASTER_STUDENT) when create ROOM
When user edit ROOM, previously selected student show in Select2 item(selected item by MAP_STUDENT_ROOM), so user can remove or add more Student
How to achieve point number 4, item Select2 list of values is MASTER_STUDENT but with default selected by MAP_STUDENT_ROOM?
I found this documentation, but i dont know how to apply it.
I'm not familiar with the Select2 plug-in.
Have you considered using the built-in Popup LOV, which since APEX 19.1 now allows multiple selection.
Whether you're using the Select2 plug-in or the built-in Popup LOV, the issue will be the same. You have a form on ROOM, that's trying to take into account an item that isn't part of the ROOM table (its values are stored in MAP_STUDENT_ROOM). The trick is to populate the item correctly during page load so that the item can correctly display the currently assigned students.
How is the item's Source configured? If it's not, set Type to SQL Query (return colon separated value). Assuming you have a primary key item on the page for the room (e.g. P1_ID), enter a query like the following:
select student_id
from MAP_STUDENT_ROOM
where room_id = :P1_ID
Then set Used to Always, replacing any existing value in session state.
This should get the item to display correctly when the page loads. However, you'll still have to figure out how to map the values back to the MAP_STUDENT_ROOM table correctly when the page is submitted. You'll need to add some logic that first deletes rows from the room (P1_ID) that are not in the selection (e.g. P1_ASSIGNED_STUDENTS). You can use APEX_STRING.SPLIT_NUMBERS to help:
delete from map_student_room
where room_id = :P1_ID
and student_id not in (
select column_value
from apex_string.split_number(:P1_ASSIGNED_STUDENTS, ':')
)
Then you can insert rows that are in the selection but not already in the room.
insert into map_student_room (
room_id,
student_id
)
select :P1_ID,
column_value
from apex_string.split_number(:P1_ASSIGNED_STUDENTS, ':')
where column_value not in (
select student_id
from map_student_room
where room_id = :P1_ID
)
I've not tested any of this code, but it should get the points across.
Another option would be to use an Interactive Grid instead of a list of values item. This is a classic master/detail scenario where students could be added and removed below the form region (typically only done after create).

How to include Tree and Master Detail in same page

I am new to Oracle Apex. I am trying to create a 3 column page with 3 regions for tree structure, master detail screen and customized buttons respectively. I was able to create Tree in one page and Master-Detail in different page. When I bring them into one page, tree is not displayed.
When I click on any node of tree I am redirected to master-detail page and data is shown. But I need to display Master-Detail in same page where my tree is present but in a new region instead of redirecting to new page.
SQL Query of tree:
select case
when connect_by_isleaf = 1 then
0
when level = 1 then
1
else
-1
end as status
,level
,name as title
,null as icon
,id as value
,null as tooltip
,'f?p='||:APP_ID||':'||4||':'||:APP_SESSION as link
from (
select to_char(d.DEPARTMENT_ID) id
,to_char(null) parent_id
,d.DEPARTMENT_NAME name
from DEPARTMENTS d
union all
select t.DEPARTMENT_ID || '_' || task_configuration_id
,to_char(t.DEPARTMENT_ID)
,t.TASK_NAME
from TASK_CONFIGURATION t
)
start with parent_id is null
connect by parent_id = prior id
The same query works when creating a tree as new page, but doesn't work when included in Master-Detail page(made 'NULL' as Link in select list). Am I missing any configuration! please help..
Also, any help on creating the 3rd column for including custom buttons region will be a great help.
the problem might be the branch or leave
the answer = is leaf 5 or more
= is branch 5 or more
this the answer might be
when connect_by_isleaf = 5 then
when connect_by_isbranch = 5 then
that might conclude my opininion or suggestion

How to get the values in items without refreshing the page in apex

I have an item to enter email id, and two more items to get the values of first/last name and department of that user which we have given without refresh the page or without enter.
Item 1: ex : a...z#gmail.com (text field)
Item 2 : ex Mechanical (display only)
Item 3 : ex Abinnaya Moorthy (display only)
This should happen when we have given the email id and as soon as the cursor is out from email id the two item values should display.
I have used dynamic action but not getting exact output, please let me know.
On Item 1 make a following dynamic action:
Event: Change (I would recommend 'change', although based on your question, you might also be interested in 'Mouse Leave', although it would trigger DA even when no change in item value occurred, for example when someone just clicked on it and clicked away)
Selection Type: Item
Item: your Item 1
First true action: Execute PL/SQL Code
inserting values into your items Item 2 and Item 3, while using your Item 1 as a condition in WHERE clause
Page Items to Submit: your Item 1
Page Items to Return: your items Item 2 and Item 3
Second true action: Refresh
Selection Type: Item(s)
Item(s): your items Item1 and Item2
Let's say I have 1 field like an email field above. Then I have 50 display only fields that values are coming from (Source) SQL queries that depends on email field. How to refresh this fields without refreshing page, but also without Setting its value manually? I would only like to trigger them to perform their Source SQL query and refresh values on the page.
Setting their values by SetValue action will result in having same queries in Dynamic Action and in Source SQL Query for each field. Also for 50 fields DA would have hundreds of SQL lines and would become not maintainable.
assuming you are working on page 9, and the email field is :P9_EMAIL_ITEM, and the name fields are :P9_FNAME_ITEM and :P9_LNAME_ITEM
The email field is a text field (it doesn't matter what the source is)
The name fields should be display only, and in properties the setting "Based On" should be "Page Item Value", set the source property to type Null.
On the email text field, create a new dynamic action, set the When properties to: Event -> Change, Selection Type -> Item(s), Item(s) -> P9_EMAIL_ITEM
Under the dynamic actions you'll have a "New" event, with a "True" folder, and inside it a new action (probably "Show"). Change its action to "Set Value".
change the setting property so that "Set Type" will be "SQL statement", and write a statement with the following structure:
select FNAME_COLUMN, LNAME_COLUMN
from RELEVANT_TABLE
where EMAIL_COLUMN = :P9_EMAIL_ITEM
Under "Items to submit" select the P9_EMAIL_ITEM.
in the Affected Elements properties set Selection type -> Item(s) and Item(s) -> P9_FNAME_ITEM, P9_LNAME_ITEM
In "Execution Options" select NO for Fire on Initialization
what we did on step 5 is "refreshing" the relevant items, without refreshing the page
I just tested it out and here's what works very well:
On Item 1, create a DA on 'Loose Focus'
Create two true actions for 'Set Value', for both Item 2 and Item 3.
Select Settings > Set Type as SQL Statement.
Write query to fetch item 2 and item 3, base on item 1 (I suggest comparing lower cases of both to make it case in-sensitive.)
Items to Submit -> Item 1
And viola, it's done!

How to pass data between fields in Oracle APEX 5.1?

This is a VERY basic question. Sorry for not providing any code I have NO IDEA how to even start tackling the problem
I have lets say two fields... One is a date selector field and the other a regular text field. What I want is when I select a date (or type a date), the value comes in the second field... Just that...
I'm on APEX 5.1.4
Since you have stated that the second item is a text field, you could do this with the help of a dynamic action that sets the value of the second item when there is a change in the value of the first item ( date field).
The following would be the steps, if you are using component view:
Create Dynamic Action
When
Event : Change
Selection : Item(s)
Item : First Page Item
Condition : is not null
True Action
Action : Set Value
Fire on Page Load: No
Set Type: You can choose how you want to set the value of the second item on the page.
If you have the flexibility to change the second item to be a select list and you have a list of values that goes with a date, you could do this much simpler, with a Cascading LOV
On Second Item's - Under List of Values section
Cascading LOV Parent Item(s) : First Item
Page Items to Submit: First Item
List of Values definition: Here you can define the query.
Hope this helps.
There are a few different ways to do this, probably the easiest way is as follows.
Assume your two items are P1_ITEM1 and P1_ITEM2.
Create a dynamic action which fires on change of item P1_ITEM1.
The true action of this should be action:set value, set type:PL/SQL Expression, item::P1_ITEM2, items to submit P1_ITEM1.

Trigger a process (SQL update) when leaving an APEX page

This is a very odd question but i wondered whether it was possible to trigger a process that runs an SQL UPDATE when the user leaves this specific page, either by clicking on the breadcrumb, tabs or back button?
I did setup the process to run on the 'Back' button; however i ran into the problem of: What if s/he clicks on the breadcrumb or a tab instead.
I have searched the net and posting this question was a last resort. I wondered if anyone can point me in the correct direction?
UPDATED POST
Page 1:
Includes a text field and a button. The user enters the category into the text field and clicks on the button to proceed to the next page. The button passes the value in the text field to a text field on Page 2.
Page 2:
Two regions on the page. One region holds information about the category - Category name from the previous page, category description, and the category revision number (which is what i'm trying to get working). The second region is a report that pulls the item name and number that are listed under the category in the category text field. A 'View' link is used on the report to load the edit page for the specific item selected. The 'View' link passes the 'category name' (from the category text field) and the 'item number' from the report to page 3.
Page 3
Two regions are used, first region: Lists the Item number which came from page 2 and name of the item (which i use a simple query to retrieve). In the second region: A report is used with two columns: a list of item properties in column 1, and a text field next to each item property in column 2 to hold the value that can be updated. The 'Apply Changes' button has some PlSql behind which looks for changes and updates where required. It updates the relevant fields that have changed, and it then takes the user back to Page 2 (Page showing user the items listed for the category intitally entered).
I cant increase the category revision on the 'apply changes' button on page 3 because the user may complete edits for items under the same category. So i dont know where i can increase the category revision by 1 per vist to a category. P.s I already increment the revision number for each item by 1 if the info has been changed using the 'apply changes' button on page 3.
One way of doing this is by updating the session state of the page items (without submitting the page as normal) via ajax and by calling an Application Process which updates the table, when called by a javascript onbeforeunload.
Create an Application Process to fire On Demand, named UpdatePageXOnExit or something. In the PL/SQL block of that Application Process, use SQL update commands with the item state of each item on the page that you wish to update; something like the following:
BEGIN
UPDATE table_name SET col1 = :PX_ITEM_1, col2 = :PX_ITEM_2, col3 = :PX_ITEM3, col4 = :PX_ITEM_4, col5 = PX_ITEM_5
WHERE (condition... I would suggest ROWIDs to simplify changes to the
fields of the PK; otherwise you will have to create additional
page items for each field of the PK, then set those items to
the values of the PK when the page loads using a before
header page process, and then use those values in this where
clause like this: where col1 = :PX_ORIGINAL_PK_FIELD_1 AND col2 =
:PX_ORIGINAL_PK_FIELD_2 );
END ;
Go to the page settings for that particular page, and in the JavaScript: Execute On Page Load section, write something like the following:
window.onbeforeunload = updateOnExit;
And in the JavaScript Function and Global Variables Declaration, write something like the following:
function updateOnExit() {
var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=UpdatePageXOnExit',&APP_PAGE_ID.);
get.add('PX_ITEM_1',$x('PX_ITEM_1').value)
get.add('PX_ITEM_2',$x('PX_ITEM_2').value)
get.add('PX_ITEM_3',$x('PX_ITEM_3').value)
get.add('PX_ITEM_4',$x('PX_ITEM_4').value)
get.add('PX_ITEM_5',$x('PX_ITEM_5').value)
gReturn = get.get();
get = null;
// Comment out the following line or not, as per the note in the following paragraph
return 'Are you sure you would like to leave the page?';
}
This last piece is the AJAX that updates the session states of the page items on the page that have been changed on the user's end but that haven't been uploaded to the servers end which normally occurs during page submission. Note: If you comment out the return statement, than there will be no warning box that will allow the user to stay on the page. If that is what you prefer, go for it. If you chose to use the warning box, the ajax will execute the page process even if the user chooses to stay on the page.