Re: Changing items from different classes in an Edit action

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hi Nagy:

In message <20210831015318.057d17c9@Dell>,
Nagy Gabor writes:
>I've just realised recently, that the Edit CGI action allows us to edit
>items of different classes in one round. For example, it is allowed to
>set "task15@assignedto = ..." and do "bug8@add@files = ..." at the same
>time, even when the context is issue4. Probably this is not new to you,
>but all examples suggested me the opposite: namely, that I can only
>edit the the properties of the current context (or the properties
>of its properties etc).

Can you write up a paragraph or two to add to that section to make
this clearer.

It's sort of implied by the timelog example. Conceptually there is no
difference between:

  <input type="text" name="timelog-1@period" />

and

  <input type="text" name="timelog8@period" />

each one sets a time logs's period. The first also creates a timelog
with a negative id (-1) which indicates it needs to be created first.

>Fortunately, "Editing multiple items in an index
>view" section of the customisation guide shed some more light. :)

For a working example of index editing, go to
https://rouilj.dynamic-dns.net/demo/. Log in as demo/demo and you will
see an index page. Go to the bottom of the index page and click on
"Multi Edit" This will let you edit all the editable fields across
multiple issues.

This is of course all in the same (issue) context.

>My question is that is this well tested? (I think after my "discovery",
>I will heavily rely on the assumption that this works seamlessly.)

Yes it should work.

I use it for reverse linking. Think of the superseder link. If you put
an id in parenthesis (10) in the input box on issue1, my code changes
the form and adds name=issue10:add:superseder value=1 (: and @ are
interchangable). See: _remapForm at:

https://rouilj.dynamic-dns.net/fossil/roundup_sysadmin/file?ci=tip&name=extensions/edit2.py&ln=143

Have a great week.

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.